Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


Compatibility issues, changed toolset from "Cross ARM GNU C" to "MCU GCC"


I changed the tooset to MCU GCC because the examples and tools from STM comes ready for SW4STM32 which includes the MCU GCC.
Previously I worked with Cross ARM GNU C.
I cleaned up also the whole project. It compiles without any errors or warnings. The application is to control a display 320x240.

I compared the settings:

Settings Now (makes me sad)
MCU GCC Compiler
-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=c99 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F429xx -I../Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc -I../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I../Drivers/CMSIS/Include -I../Utilities/Fonts -I../Drivers/BSP/Components/ili9341 -I../Drivers/BSP/STM32F429I-Discovery -Og -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0

MCU GCC Linker
-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -specs=nosys.specs -specs=nano.specs -T”../STM32F429ZITx_FLASH.ld” -Wl,-Map=output.map -Wl,--gc-sections -lm

MCU GCC Assembler
-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -g

different compared to “Settings Previous”
-mfloat-abi=hard // ARM Options
-mfpu=fpv4-sp-d16 // MIPS Options



Settings Previous
Cross ARM GNU C Compiler
-mcpu=cortex-m4 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -Wall -Wextra -g3 -DDEBUG -DTRACE -DSTM32F429xx -DUSE_HAL_DRIVER -I”../Inc” -I”../system/Inc” -I”../system/Inc/cmsis” -I”../system/Inc/DEVICE” -std=gnu11 -MMD -MP -MF”$(@:%.o=%.d)” -MT”$(@)” -c -o “$@” “$

France

Hi,

What makes you sad in the MCU GCC options?

The -mfpu=fpv4-sp-d16 is just selecting the FPU for the Cortex-M4 (ARM FPU version 4, single precision only, with 16 double-precision registers). It may also be a MIPS option but here it really is an ARM option.

The differences in the options with those for the Cross ARM GNU Compiler are in part due to the fact that you compiled then for a plain Corts-M4, without the optional FPU, while selecting the STM32F429 for MCU GCC selects the proper FPU. A few others are needed for the ST-provided firmwares to compile correctly (like the weak and packed macro definitions or the various -I options).

Bernard (Ac6)

Happily today nothings makes me sad anymore about the MCU GCC options.

In fact the faulty behaviour was due to mixed up content in source files.

Tx for response. According to the response it looks like the MCU GCC is the better choice for STMF4 or STM uCs at all due to proper setting options.


 

Newest Forum Posts

  1. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  2. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  3. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  5. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  6. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  8. Build a project in "release" mode by tang, 2025-02-20 10:36
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35
  10. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-26 20:27

Last-Modified Blogs