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


System Workbench build error new project from CubeMX

Summary of 2 days investigations for CubeMX and System Workbench

For success build without errors imported project generated in CubeMX, need fix generated symbols

In Project->Properties->C/C++ Builds->Settings->MCU GCC Compiler->Symbols

__weak=__attribute__((weak))
__packed=__attribute__((__packed__))
need set values
__attribute__((XXXXX))
in double quotes -
"__attribute__((XXXXX))"


Sample:

__weak="__attribute__((weak))"
__packed="__attribute__((__packed__))"


Else you can see follow errors after import

23:19:10 **** Incremental Build of configuration Debug for project blink ****
make all
Building file: ../Src/main.c
/bin/sh: -c: line 0: syntax error near unexpected token `(‘
/bin/sh: -c: line 0: `arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I”/Users/asergeev/stm/workspace/blink/Inc” -I”/Users/asergeev/stm/workspace/blink/Drivers/STM32F3xx_HAL_Driver/Inc” -I”/Users/asergeev/stm/workspace/blink/Drivers/STM32F3xx_HAL_Driver/Inc/Legacy” -I”/Users/asergeev/stm/workspace/blink/Drivers/CMSIS/Device/ST/STM32F3xx/Include” -I”/Users/asergeev/stm/workspace/blink/Drivers/CMSIS/Include” -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF”Src/main.d” -MT”Src/main.o” -o “Src/main.o” “../Src/main.c”’
make: *** Src/main.o Error 2
Invoking: MCU GCC Compiler
/Users/asergeev/stm/workspace/blink/Debug
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F303xC -I”/Users/asergeev/stm/workspace/blink/Inc” -I”/Users/asergeev/stm/workspace/blink/Drivers/STM32F3xx_HAL_Driver/Inc” -I”/Users/asergeev/stm/workspace/blink/Drivers/STM32F3xx_HAL_Driver/Inc/Legacy” -I”/Users/asergeev/stm/workspace/blink/Drivers/CMSIS/Device/ST/STM32F3xx/Include” -I”/Users/asergeev/stm/workspace/blink/Drivers/CMSIS/Include” -Os -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF”Src/main.d” -MT”Src/main.o” -o “Src/main.o” “../Src/main.c”

Hi

Your findings are excellent but obsolet now.
Even with the error every thing was working as expected.

Dieter


Hi, there are already several threads about this issue. It occurs on Linux or OS-X, whereas it works on Windows even without the quotes.

I am working with Windows 7 x64, AC6 Version: 1.13.0.201701121612 and CubeMX 4.19.0 and this is still revelevant. Without the quotes the code wont compile, I have to modify the symbols each time I import a new project made in CubeMX.

Why do Dieter and Vetch say that it works with the error?

Before upgrading to AC6 1.12 and CubeMX 4.18 I always had an syntax error at symbol __weak.
Nevertheless the project was sucessfully build always. Also redeclarations of those functions worked well.
Last version of AC6 with that error for me was 1.8. BTW; I’m working with Linux only. I have never tried AC6 1.13.




 

Newest Forum Posts

  1. Можно ли установить камин на балконе или лоджии? by Grand3kpdErorb, 03:38
  2. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  3. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  5. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  6. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  7. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  8. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05

Last-Modified Blogs