cancel
Showing results for 
Search instead for 
Did you mean: 

C++ interrupts from cubeMX generated project

Inverse Inductor
Associate
Posted on May 25, 2018 at 04:37

I have discovered that renaming stm32f4xx_it.c to stm32f4xx_it.cpp in sw4stm32 causes interrupts to no longer work even after converting the project to C++.

I have attached a minimum project for sw4stm32 that demonstrates the problem Don't let the size fool you, there are around 5 lines of user generated code in there.

To build in C++, you need to exclude the .c version of the file (such as main.c) and rename it to have a .cpp extension in order to get everything to co-operate. I did this procedure with the stm32f4xx_it file, but no luck.

From my rudimentary understanding of how this programming stuff works, I believe that this is a problem with the linker. I'm just not sure how. The directories that these files are in are included by default, so they should build just fine as far as I understand.

#interrupts #c++ #sw4stm32 #cubemx
0 REPLIES 0