Errors in startup_stm32f429xx.s when converting a project to C++
- August 9, 2017
- 4 replies
- 2944 views
This question is going to be a bit long winded, I apologize.
I am using an ST144 Nucleo 429zi and need to do the firmware in C++. (by edict of management)
I have been digging around on how to convert ST CubeMX C projects to C++ projects inside of Atollic TrueSTUDIO for ARM V7.12 and feel I am so close.
Specifically I have referenced the following articles (and the comments in them):
https://stackoverflow.com/questions/35288808/first-project-for-stm32-with-hal-in-c
http://www.openstm32.org/forumthread1244
https://mcuoneclipse.com/2014/07/22/exclude-source-files-from-build-in-eclipse/
https://isocpp.org/wiki/faq/mixing-c-and-cpp
http://www.openstm32.org/forumthread539
*Subtle note, to get the HAL linked in you also need to duplicate the Project Properties->Path and Symbols->Symbols between GNU C and GNU C++ (That's not in the articles, but similar to what you do with the Project Properties->Path and Symbols->Includes).
Well, this almost works, I am down to five errors, all in the generated file startup->startup_stm32f429xx.s
undefined reference to '_ebss' (line 106)
undefined reference to '_estack' (line 80)
undefined reference to '_sbss' (line 98)
undefined reference to '_sdata' (line 93)
undefined reference to '_sidata' (line 87)
I find this strange,
I did find a reference to unchecking 'exclude unused' on the MCU for Eclipse,
https://www.eclipse.org/forums/index.php/t/1065128/
I have not found where that setting is in true Studio.
I am open to suggestions on what is causing the error, and the best way to go about fixing this problem.
I have repeated the steps for converting to C++ on both my project and a blank shell using the 429zi defaults from a project generated by CubeMX v4.21.0. They both compile fine as C projects and generate the same 5 errors when converted to C++. I have attached a .zip of the shell project and some screen shots.
Again, thanks in advance, hope it was not to, too long winded...
-Kevin
#429zi #c++