AnsweredAssumed Answered

Errors in startup_stm32f429xx.s when converting a project to C++

Question asked by Kevin Flanagan on Aug 10, 2017
Latest reply on Aug 10, 2017 by Valentin

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): 

First project for STM32 with HAL in C++ - Stack Overflow 

OpenSTM32 Community Site | Converting to C++ 

Exclude Source Files from Build in Eclipse | MCU on Eclipse 

Standard C++ 

OpenSTM32 Community Site | mbed C++ code to add in an existing C project 

*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, Eclipse Community Forums: C / C++ IDE (CDT) » STM32 library undefined reference 

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