This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using SES to flash a hex, not an elf file

SES will produce both hex and elf files when building. I can flash any old hex file with Target -> Download File -> Download Intel Hex File... But I can't actually have SES focus on the hex file and ignore the elf file when debugging.

The reason I want to use the hex file is that I have a bunch of post build commands using mergehex. Rather than flash one file for each hex (Soft device, Application, Bootloader, Bootloader settings), I want to merge them all into one, flash that, and debug it. This catches any problems with overlapping flash regions at build time, not runtime. I'm also seeing errors at runtime when using SES that I don't see when building a monolithic hex file using make and debugging with gdb directly.

Using Debug -> Go in SES will force it to check the downloaded code is up to date and for that it refuses to use the hex file. I've tried deleting the elf file as a post build command to ensure it's not being used. SES complains it can't find it. You can change the "Load file type" and even the file itself ("Load file") in the solution options - it doesn't make any difference. A search in the SES manual has also drawn a blank.

Parents Reply Children
Related