Skip to main content
endlessFancy
Associate II
Apr 2, 2019 7:29 AM UTC
Solved

Pack IAP and application in same binary

Hi,

Want to be able to flash the target device( an STM32F446) using a propritary CAN interface. EI not use the bootloader default CAN flashing method.

As i understand it I must first make a IAP binary and flash using the bootloader by SWD. To then add the application I MUST use the IAP interface over CAN.

Is this correct?

Or is there a method to flash both IAP and application over SWD at the same time? And have them both in the same project in Atollic?

Also can I do a adress jump to the IAP from the application?

Hope anyone can give me some pointers.

This topic has been closed for replies.
endlessFancy
endlessFancyBest answer
Associate II
Apr 3, 2019 5:11 AM UTC

Thank you both for the pointers.

I found this presentation at Atollic: http://info.atollic.com/hubfs/Whitepapers/Atollic_Develop_Debug_BootloaderApps_ARMCortex.pdf

That describe how to setup bootloader and application in the trueStudio and how to flash/debug using SWD.

3 replies

Tesla DeLorean
Guru
Apr 2, 2019 11:08 AM UTC

You should be able to combine binaries into a singular monolithic image, or merge hex files.

The processor can jump to any location you tell it, in C consider function pointers.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
After Forever
Senior III
Apr 2, 2019 12:34 PM UTC

Are you using the GNU toolchain? You should be able to create a padded binary for your bootloader (use the --pad-to address command line option for objcopy when generating a binary from the ELF), then just combine the bootloader binary and the application binary using "cat" or your favorite method of combining files.

For hex, I remember using a tool named Hexmate for joining Intel hex files. If you are on Linux, srec_cat will do the job too.

endlessFancy
endlessFancyAuthorBest answer
Associate II
Apr 3, 2019 5:11 AM UTC

Thank you both for the pointers.

I found this presentation at Atollic: http://info.atollic.com/hubfs/Whitepapers/Atollic_Develop_Debug_BootloaderApps_ARMCortex.pdf

That describe how to setup bootloader and application in the trueStudio and how to flash/debug using SWD.