cancel
Showing results for 
Search instead for 
Did you mean: 

Interrupts with C++

ybenharim10
Associate II
Posted on December 28, 2008 at 04:48

Interrupts with C++

6 REPLIES 6
ybenharim10
Associate II
Posted on May 17, 2011 at 12:57

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 ...

16-32micros
Associate III
Posted on May 17, 2011 at 12:57

Hi,

What is your compiler/Linker ?

Cheers,

STOne-32.

ybenharim10
Associate II
Posted on May 17, 2011 at 12:57

I am using IAR5 IDE.

16-32micros
Associate III
Posted on May 17, 2011 at 12:57

Hi,

refer to this link :

http://www.st.com/mcu/forums-cat-6124-23.html

This may be helpful. The best is to contact your IAR local support.

Cheers,

STOne-32.

picguy
Associate II
Posted on May 17, 2011 at 12:57

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.

ybenharim10
Associate II
Posted on May 17, 2011 at 12:57

Thanks, it seems that adding the extern ''C'' to the definitions in stm32f10x_vector.c solves the link problem