Hello, I am having issues implementing the ISR routine on the CORTEX-M3, this exact setup works when I use it with RTX but not as standalone code. When I compile it says cancpp.axf: Error: L6218E: Undefined symbol GPI_ISR (referred from startup.o). But no issues when I build with RTX OS selected.
This is a snip-it of code: GPI_ISR should be the function it branches to.
****************************************************************************** ; ; The vector table. ; ;****************************************************************************** EXPORT __Vectors IMPORT GPI_ISR ;[WEAK] __Vectors DCD StackMem + Stack ; Top of Stack DCD Reset_Handler ; Reset Handler DCD NmiSR ; NMI Handler DCD FaultISR ; Hard Fault Handler DCD IntDefaultHandler ; MPU Fault Handler DCD IntDefaultHandler ; Bus Fault Handler DCD IntDefaultHandler ; Usage Fault Handler DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD 0 ; Reserved DCD IntDefaultHandler ; SVCall handler DCD IntDefaultHandler ; Debug monitor handler DCD 0 ; Reserved DCD IntDefaultHandler ; PendSV Handler DCD IntDefaultHandler ; SysTick Handler DCD GPI_ISR ; GPIO Port A
.
in the main.c I have
void GPI_ISR (void) { }
Thanks Westermark. Although I have read many C++ books ( I honestly don't recall seeing that in them), I have never had the need to mix C++ and C functions directly, until now. The libraries always had the extern "C" in them, and I never paid attention to it much. But thanks for taking the time to explain.