2008-12-27 07:48 PM
Interrupts with C++
2011-05-17 03:57 AM
I generated the UART interrupt example and it worked OK.
Since I want to write C++ code, I changed the project's language to Extended C++. Now I have the following problems: 1. when building the project, the compiler produces in file stm32f10x_vetor.c: warning: variable ''__vector_table'' was declared but never referenced. 2. when linking, the map file does not link the stm32f10x_vector.o and the stm3210x_it.o. The .intvec section is mapped to cstartup_M.o ...2011-05-17 03:57 AM
Hi,
What is your compiler/Linker ? Cheers, STOne-32.2011-05-17 03:57 AM
I am using IAR5 IDE.
2011-05-17 03:57 AM
2011-05-17 03:57 AM
I was unable to create C++ mangled symbols in IAR's assembler. Thus you are forced to use C++ to generate the vector table. Or better, simply make your C++ ISR entry point “C� style. That's what I did in a similar situation.
2011-05-17 03:57 AM
Thanks, it seems that adding the extern ''C'' to the definitions in stm32f10x_vector.c solves the link problem