Closed microbuilder closed 9 years ago
This is implemented now with the --program-bin
or -b
option. For example --program-bin foo.bin 0x80001000
(hex address), --program-bin foo.bin 1234567890
(decimal address), or even --program-bin foo.bin 0777654
(octal address, has a preceding 0).
AdaLink currently accepts .hex files, which we generate with objcopy and other tools, but it might be useful to add support for .bin files to AdaLink as well since these are sometimes easier to generate and work with, although we need to specify a second 'address' parameter to know where to start writing the file in flash memory.
The JLink supports this via two commands:
I'd propose a new optional parameter set as follows:
adalink nrf51822 --binfile filename.bin --binaddress 0x80001000
--binfile | -b
: A single binary file to flash--binaddress | -a
: The starting flash address to flash the binary file, accepting either a hex or a decimal valueAlternatively, we can simplify this by detecting file extensions on the current
--program
argument, and if we detect a .bin file, we can use a mandatory--address | -a
field to write that file, though we'll have to throw an error when more than one file is provided to the program argument.Perhaps the latter is easier to keep the number of parameters in check?