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.

Compiler/MSP432P401R: Coding Startup file in ASM

Part Number: MSP432P401R

Tool/software: TI C/C++ Compiler

Hi,

I'm trying to code the startup_msp432 C file in assembly (for academic purpose).

I'm able to migrate the vector able and include the necessary directives to get the reset handler working.

c_stack pointer seemed to be correctly inserted and C env correctly initialised because the C functions in the main routine seemed to be called correctly.  

But I can't quite figure out how to reference other interrupt handlers whose ISR is coded in C in another file. I tried to use .ref in the asm file and explicitly delcare the funcions in the respective C files but still get unresolved symbols error when linking the project.  I must have missed something here so appreciate if anyone could give some insights.

A side question: 

The samplel startup_MSP432p401r_ccs.c fiel has the CSTACK pointer in the vector table as "(void (*)(void))((uint32_t)&__STACK_END)",

Why is there a need to dereference the __STACK_END?

Thanks!

Below is an extract of the startup.asm file

;========startup.asm==========

 .ref __STACK_END
 .ref _c_int00
 .ref _SysTick_Handler
 .ref _EUSCIA0_IRQHandler
 .ref _PORT1_IRQHandler
 .retain ".intvecs"
 .sect ".intvecs"
 .word __STACK_END
 .word Reset_Handler
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word _SysTick_Handler  ;Systick Handler
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word _EUSCIA0_IRQHandler
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word 0
 .word _PORT1_IRQHandler


 .text
Reset_Handler:
  b.w     _c_int00

;======= end ===========

Regards

OHL

**Attention** This is a public forum