Part Number:MSP430F5328
Tool/software: TI C/C++ Compiler
Hello,
I am working on a project with a custom build bootloader.
The bootloader is placed in a specific section flash and must call only functions in that part of the flash.
So the flash of the program can be erase and then is the bootloader still working.
The bootloader contains the functionality to erase and write the program flash.
When the bootloader is programmed in the MSP the bootloader will never be updated.
During testing we found out that the bootloader is calling the following functions:
- __mspabi_mpyi_f5hw (hardware multiplier)
- __mspabi_mpyl_f5hw
- __mspabi_srll_8 (logical shift)
- __mspabi_slll_8
These functions where still placed in the program flash section.
These functions are used by the bootloader and also by the main program.
So to keep the bootloader working stand alone these functions should also be placed in the bootloader section.
But when the program is compiled with a newer compiler and that compiler have a different implementation of those functions it will go wrong.
Because the program with the new compiler and implementation of those functions jumps to the bootloader with the old implementation when those functions are called.
How can I solve this problem?
If these functions can be placed inline it should solve the problem. Then the bootloader has it's own and the program has it's own.
Or is it possible to disable the hardware multiplier for a specific part of code?
Because in the program the hardware multiplier is needed for the speed but in the bootloader the speed is less important.
Then only the use of the logical shift functions should be solved.
Best regards,
Jeroen