Our project has a customer bootloader.
* The FLASH is partitioned to support both the bootloader and application.
-- The bootloader starts at 0xE000. The bootloader and FLASH vectors are fixed
-- The application starts at 0x8000
* A vector table is created in RAM and the FLASH vector table points to the RAM vector table.
-- This way, the bootloader and application can overwrite the RAM vector table to suit each executable's requirements (ISR handlers).
* When the bootloader has finished loading or verifying the applicaiton it jumps to 0x8000 to run the application
-- The linker command file for the application includes this to place the start of the application at 0x8000
.boot > 0x8000
{
-l rts*.lib<boot_special.obj > (.text)
}
* The issue I am having is that the application vector table is getting placed at address 0x8000.
-- This means that the the jump to 0x8000 from the bootloader is now running an ISR vector which is not good.
-- The expectation is to place the executable start of the application at 0x8000.
-- Oddly, this is legacy code and is working in some older products. This may be an artifact of moving from "CCS7.x/16.9.2LTS" to "CCS11.2/21.6.0LTS."
* I find the documentation on the linker command file to be poor
-- I have looked at the primer @:
software-dl.ti.com/.../sdto_cgt_Linker-Command-File-Primer.html
-- I also have SLAU132Y – "MSP430 Optimizing C/C++ Compiler v21.6.0.LTS"
-- Here are some questions that is not covered in the documentation:
# What is -l (shown above)?
# The primer page shows an example using --library=Sinewave_lib.lib(.text).
+ When are double-dashes used?
+ Where is the list of double-dash syntax options (such as --libary)?
+ Where is the list of single-dash syntax options (such as -l)?
+ My example shows rts*.lib<boot_special.obj the primer shows Sinewave_lib.lib.
% What are the requirements here?
% Is the .lib format the same as a .obj?
+ Where is a list of parameters that can be installed in the <angle brackets>?
% My example has boot_special.obj. Is this an intrinsic thing? How do I find the list of these things?
% I found this about boot_special.obj. No help. What is this?
$ e2e.ti.com/.../how-to-force-the-msp430-start-address-in-ccsv6
$ Also from SLAA685, page 30 (this formatting seems different that the documentation)
:: rts430x_lc_rd_eabi.lib : boot_special.obj
:: (.text:_isr:_c_int00_noargs_noexit)
:: : isr_trap.obj
:: (.text:_isr:__TI_ISR_TRAP)
* Can you please provide a comprehensive list and explanation of all linker command file options, flags, syntax, abbreviations, etc.?
* So, how do I get the application start correctly at 0x8000?