C++ Startup file and linker script for STM32F407VG - Eclipse

Asked by Emile Castelnuovo

Hello, I have a project written in c/c++ and would like to use the ARM-GCC toolchain in Eclipse.
At the moment I am using the codesourcery lite that does not enable me to use hardFP andI have some problems to understand how to port my project to use the ARM-GCC toolchain.
It seems that the linker script and startup files are configured to use only C so my code compiles but does not run on my F4.
Is anybody able to provide me with a correct set of files to start working in this environment?
I am new to all this so please excuse my poor knowledge.

Thank you,
Emile

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Freddie Chopin
Solved:
Last query:
Last reply:
Revision history for this message
Joey Ye (jinyun-ye) said :
#1

I can't help without more information of your setting up, like what startup file are you using; what's the error message.

Revision history for this message
Terry Guo (terry.guo) said :
#2

If possible, you can try CooCox CoIDE at http://www.coocox.org/index.html. This IDE can be easily configured to use our tool chain to build your project. In addition, the IDE provides all required startup files and link script. It's a good place to learn something.

Revision history for this message
Best Freddie Chopin (freddie-chopin) said :
#3

Download complete example for STM32F4 with all the files you need from my website - www.freddiechopin.info > download > ARM > examples

4\/3!!

Revision history for this message
Emile Castelnuovo (emile-castelnuovo) said :
#4

Thanks, I will give it a try, but looks like it has everything I need.

Emile

Revision history for this message
Emile Castelnuovo (emile-castelnuovo) said :
#5

Thanks Freddie Chopin, that solved my question.

Revision history for this message
Freddie Chopin (freddie-chopin) said :
#6

Make sure to enable C++ support in makefile - without that switch your global constructors/destructors will not be called!

# set to 1 to compile and link additional code required for C++
USES_CXX = 0