Extra toolchain needed for STM32F405?

Asked by Jens

I am new to ARM embedded programming and setting up a toolchain for the STM23F405 processor. I read in some tutorials that authors suggest to build a toolchain from scratch, e. g. to allow for hartfloat support. In the docs for the packages installed with 'sudo apt-get install gcc-arm-none-eabi' I have seen that there are command options for exact architecture and floating point unit. So, the simple question is: Do I need to obey the tutorials that suggest a custom build or do I have all 'batteries included' with this launchpad package?

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Thomas Preud'homme
Solved:
Last query:
Last reply:
Revision history for this message
Best Thomas Preud'homme (thomas-preudhomme) said :
#1

Hi Jens,

Our toolchain comes with batteries included indeed. If I read [1] correctly, STM32F405 is a Cortex-M4 so you just need to compile with -mcpu=cortex-m4 -mfloat-abi=hard. Rebuilding the toolchain is useful if you want to make this the default, but otherwise not needed.

[1] http://www.st.com/web/en/catalog/mmc/SC1169/SS1577

Best regards.

Revision history for this message
Jens (jku-w) said :
#2

Thanks Thomas Preud'homme, that solved my question.

Revision history for this message
Andreas Fritiofson (andreas-fritiofson) said :
#3

Followup question... Do you no longer have to specify the fpu type with -mfpu=fpv4-sp-d16 since you left that out?

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#4

Hi Andreas,

You're right, -mfpu needs to be specified as well since floating-point support is an architecture extension in ARMv7-M.

Best regards.