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.

msp430t5418: trying to set reset vector to asm address in mixed asm/c environment`

I am trying to write a self-contained loader which will run between the BSL and the c_int00_xxx function called from boot.c.

The self-contained loader is written in assembler so that it will not need to link in any C libraries. It is meant to sit at 0x5c00 and copy app images from extended flash to base flash at 0x9600 where they will run. It is linked with an app which is written in C.

There is more but I don't think it is germane.

What I am trying to do is get the linker to allow me to put my asm function's address in the reset vector, but since the linker notices that this program is not assembler only, it insists on putting boot.obj (c_int00_noexit) into the reset vector. I want to call c_int_noexit or something like it that I write after I am done with my code.

If I try to force it with

begin:   <asm code>

;-------------------------------------------------------------------------------
;           Interrupt Vectors
;-------------------------------------------------------------------------------
           .sect   ".reset"                ; MSP430 RESET Vector
           .short  begin                   ;

It gets mad and complains about error: placement fails for object ".reset",
   size 0x4 (page 0). , which I understand is due to me and the linker both creating .reset entries.

How can I force the linker to let me put what I want in the reset vector?

**Attention** This is a public forum