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


Converting to C++

Hi all

I’m trying to convert a cubeMx project to c++ so that I can use a c++ librarie. Unfortunatly when I follow instructions to “convert to c++” using the project explorer as explained eg:

http://www.openstm32.org/forumthread1231Question

And then either rename main.c or add a new file to get main.ccp I get the following error:



‘’11:16:13 **** Incremental Build of configuration Debug for project Stm32 20 tsspop II ****
make all
Building file: ../Src/main.cpp
Invoking: MCU G++ Compiler
%cd%
arm-none-eabi-g++ -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F070x6 -I”C:/Users/ak/Dropbox (icts)/STM32_Workbench/Stm32 20 tsspop II/Inc” -I”C:/Users/ak/Dropbox (icts)/STM32_Workbench/Stm32 20 tsspop II/Drivers/STM32F0xx_HAL_Driver/Inc” -I”C:/Users/ak/Dropbox (icts)/STM32_Workbench/Stm32 20 tsspop II/Drivers/STM32F0xx_HAL_Driver/Inc/Legacy” -I”C:/Users/ak/Dropbox (icts)/STM32_Workbench/Stm32 20 tsspop II/Drivers/CMSIS/Device/ST/STM32F0xx/Include” -I”C:/Users/ak/Dropbox (icts)/STM32_Workbench/Stm32 20 tsspop II/Drivers/CMSIS/Include” -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fno-exceptions -fno-rtti -MMD -MP -MF”Src/main.d” -MT”Src/main.o” -o “Src/main.o” “../Src/main.cpp”
/usr/make/sh: -c: line 0: syntax error near unexpected token `(’
/usr/make/sh: -c: line 0: `arm-none-eabi-g++ -mcpu=cortex-m0 -mthumb -mfloat-abi=soft -Dweak=attributeweak -Dpacked=attributepacked -DUSE_HAL_DRIVER -DSTM32F070x6 -I”C:/Users/ak/Dropbox (icts)/STM32_Workbench/Stm32 20 tsspop II/Inc” -I”C:/Users/ak/Dropbox (icts)/STM32_Workbench/Stm32 20 tsspop II/Drivers/STM32F0xx_HAL_Driver/Inc” -I”C:/Users/ak/Dropbox (icts)/STM32_Workbench/Stm32 20 tsspop II/Drivers/STM32F0xx_HAL_Driver/Inc/Legacy” -I”C:/Users/ak/Dropbox (icts)/STM32_Workbench/Stm32 20 tsspop II/Drivers/CMSIS/Device/ST/STM32F0xx/Include” -I”C:/Users/ak/Dropbox (icts)/STM32_Workbench/Stm32 20 tsspop II/Drivers/CMSIS/Include” -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fno-exceptions -fno-rtti -MMD -MP -MF”Src/main.d” -MT”Src/main.o” -o “Src/main.o” “../Src/main.cpp”’
make: *** Src/main.o Error 258

11:16:13 Build Finished (took 28’‘0ms)


I tried various suggestions on topics I found both on this and on Eclipse forums but so far nothing works and I cant find much information on error 258 either?

Project is attached as archive.
I use:
Windows 7
Version: Mars.2 Release (4.5.2) Build id: 20160218-0600
Stm32f070f6p6

Regards
Andreas

Hi Andreas,

The recent update contains a fix on this point, so 1st make sure that your installation is up-to-date:
1.14

Regards,
Julien



Indeed there is still an issue with C++ projects.

You can workaround this by manually quoting the weak and packed symbols in the C++ build settings (Right Click on the Project > Properties):
Cpp Settings

Rgds,
Julien


Yeeeeesssss! That works! Now it compiles just fine!
Thank you so much Julien!!!

Regards
Andreas