But how to program the board with something different from the .elf file?
In this example I’m using the NXP Kinetis Design Studio, but is applicable to any other Eclipse distribution with the GNU ARM Eclipse plugins. So it works fine e.g. with Segger J-Link or P&E Multilink.
For example I have generated in my project settings to generate a S19 (S-Record) file:
There are several ways to generate an S19 file. The simplest way is to produce it as a by-product-build with the GNU ARM Eclipse plugins. For this I have enabled ‘Create flash image’ in the project settings:
The output format (e.g. S-record) is specified in a different page:
So how to download that generated file instead of the .elf file? The answer is very simple: specify that S-Record file in the debug configuration instead of the .elf file:
To program something else than the .elf file, I can specify that file in the debug configuration. It might be confusing that the ‘Search project…’ button in that configuration does not show something else than the elf file, but any file can be selected.
Actually I can specify any S-Record (or binary file), it does not to be the one built by that project: the debugger will take the binary and program it to the board. That way I’m can program binary files for which I do not need the project and sources.
Happy S-Recording 🙂