if I build my mbed project for arm, I do get my .elf, .bin and .hex file.
If I want to point openocd to firmware binary, ‘$SOURCE’ evaluates to firmware.bin
In my main.py I have set PROGSUFFIX to .elf
=> How can I make $SOURCE point to firmware.elf ?
The platform’s builder/main.py code decides that.
For the STM32 platform, since upload_source = target_firm and target_firm = env.ElfToBin(..), the converted bin file is uploaded. Otherwise one would have to say upload_source = target_elf.
upload_source = target_firm
target_firm = env.ElfToBin(..)
upload_source = target_elf
For uploading, if the conversion was correct, using the .bin or .elf files are equivalent, no problems should arise from that.