cancel
Showing results for 
Search instead for 
Did you mean: 

How to add preprocessor symbol in STM32Cube IDE

RafaelJoseph
Associate II
#error "Define according the used Cortex core ARM_MATH_CM7, ARM_MATH_CM4, ARM_MATH_CM3, ARM_MATH_CM0PLUS or ARM_MATH_CM0"

Based from this Topic https://community.st.com/s/question/0D50X00009XkXPtSAN/need-help-in-dsp-library-for-keil-

The problem is solve by adding the preprocess symbol in Keil Uvision, What is the equivalent of this in STM32CubeIDE?

1 ACCEPTED SOLUTION

Accepted Solutions
Yuk117
Associate III

To add preprocessor symbol is...

  • Right click on your project -> click Properties.
  • Select C/C++ Build -> Settings -> Tool Settings tab -> MCU GCC Compiler -> Preprocessor.
  • Click Add Button and input your symbol.

0690X00000980VBQAY.png

View solution in original post

2 REPLIES 2
Yuk117
Associate III

To add preprocessor symbol is...

  • Right click on your project -> click Properties.
  • Select C/C++ Build -> Settings -> Tool Settings tab -> MCU GCC Compiler -> Preprocessor.
  • Click Add Button and input your symbol.

0690X00000980VBQAY.png

scottSD
Lead

What is the best way to use these symbols in your code? I am having trouble with compiling my code when referencing symbols defined this way.