This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430G2755: Setting the reset vector to point at a specific address (i.e. set entry point in linker)

Part Number: MSP430G2755

Hello,

I have been looking for a way to set the program entry point on a MSP430G2755 in CCS. So far I have been reading in the MSP430 linker users guide to use the "--entry_point=my_global_entry_point_function_symbol", without any success as the linker gives the warning I have seen other posts on E2E mention:

warning #10063-D: entry-point symbol other than "_c_int00" specified:  "my_global_entry_point_function_symbol"

Even though this would seem like a warning that the default entry point has been overwritten, it still keeps pointing the reset vector to the _c_int00  function (placed at a linker decided memory address) and not my_global_entry_point_function_symbol.

I have also read in the MSP430 Optimising C/C++ Compiler under "4.3.7 Specifying the Type of Global Variable Initialization" about the --rom_model and --ram_model options that apparently force the use of the _c_int00 as entry point. However, when I remove that flag (--rom_model) from the linker command the guide specifies that it required will default to set the entry point  to address 0, however, it still defaults to using the _c_int00 entry point.

The main issue that I have is that the _c_int00 is not placed at fixed and user determined memory address, i.e. if I change the code it may move to a different address.

I have seen several other posts where the replies recommend against writing a bootloader on such as small single flash memory sector device, but that is what I am doing right now.

What I am asking is if I can specify a specific function as the entry point OR if I can place _c_int00 at a specific memory address. Either one works.

Best regards,

Felix.

  • This seems like a wasted effort. In order for the program to work, you are going to have to deal with the interrupt vectors. Which means that it is just as much work to find the reset vector. You can't program that into its usual location but you can stash it somewhere. Then use it during power up when the bootloader decides to run the target.

    If that doesn't work for you, an alternative would be to reserve a couple of words at the start of the target program area for a branch. Then program in a branch to the starting address. Now you have a fixed entry point. Pretty much the same except for the hassle of editing the linker script to reserve that space.

  • Thank you both for your suggestions,

    However, I ended up just overriding the reset vector by nullifying the output sector containing the reset vector in the linker script and then writing my own retained constant at the same place. I wanted to avoid having to do it this way, but I have not found any other suitable option. All I wanted was to just set my own reset vector, and this seems by far to be the easiest option.

    Regards,

    Felix.

**Attention** This is a public forum