This Technical Note discusses how to create a bootloader for MSP430.
There are different ways to create a bootloader and application for MSP430. With IAR Embedded Workbench for MSP430, we recommend creating two separate projects:
One project for the bootloader and one for the application.
After that, it is possible to "merge" the bootloader and application projects for downloading, using the "--image_input" linker option.
To merge the bootloader code into the main application, you can use the --image_input and -g linker options, similar to (example):
In the linker configuration file, add:
When the main application is built, a single output file including the bootloader (but without debug info) is generated.
One of the reasons for creating separate projects for the bootloader and the application is that the compiler uses "support functions" (for example "?DivMod16u", "?ShiftLeft32"), and these functions cannot easily be manually placed or suppressed.
See "--image_input" in Help -> IAR Linker and Library Reference Guide
This option corresponds to the "Raw binary image" option in Project -> Options -> Linker -> Config.
To load debug info, use Project -> Options -> Debugger -> Images -> Download extra image (Debug info only).
...debugging with the Simulator OR the FET Debugger Driver.
Both drivers are able to download Extra Images. (This is used in the following steps).
All product names are trademarks or registered trademarks of their respective owners.