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


strange link error when trying to compile imported project from STM32CubeMX

I have created a custom project for the STM32F051K8T6 micro. When importing the generated Files and trying to compile I get the following error:

make all
Building file: /home/uli/ARMtoolchain/newWS/STM32Tracker/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c
/bin/sh: 1: Syntax error: “(” unexpected
Invoking: MCU GCC Compiler
make: *** Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.o Fehler 2
arm-none-eabi-gcc -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F051x8 -IInc -IDrivers/STM32F0xx_HAL_Driver/Inc -IDrivers/STM32F0xx_HAL_Driver/Inc/Legacy -IDrivers/CMSIS/Include -IDrivers/CMSIS/Device/ST/STM32F0xx/Include -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF”Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.d” -MT”Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.o” -o “Drivers/STM32F0xx_HAL_Driver/stm32f0xx_hal.o” “/home/uli/ARMtoolchain/newWS/STM32Tracker/Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c”

12:31:50 Build Finished (took 58ms)

Any idea what goes wrong?

Thanks,

Uli

Topic can be closed. I re-installed CubeMX and deleted everything and the problem is gone.

Hi,
I had this same problem. CubeMX won’t to add ’ or ” on Linux, after update, for parameters __weak and __packed in .cproject file. It should be:

__weak=’__attribute__((weak))’

__packed=’__attribute__((__packed__))’


Could you tell me, how did you re-install CubeMX? I did it, but still is this same :/ I think, that is there some old config files, but I have no idea, where to find it. I had just remove folders .stm32cubemx and .stm32cubeMX.
Thanks,
Paweł

Hi,
I don’t know if reinstall CubeMX will fix this problem. I doubt it, unless you reinstall an old version before 4.18.
But I had this problem was fixed by manually change the project settings.
Go to “project properties”→ “C/C++ build” → settings → “tool settings” → “MCU Gcc compiler” → “Preprocessor” → “Defined Symbols”
Chose weak and packed to edit them by manually add “” around.
Hope this help.
BBlue


BTW, by my knowledge, this only happens on Linux with CuberMX version 4.18.0
BBlue


 

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