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


 

Newest Forum Posts

  1. Analog servomotors with nucleo f334r8 by SkelePaw, 2025-11-01 05:57
  2. So happy to finally meet you! by Danielrug, 2025-10-28 11:01
  3. STM32 MCU model shortlisting for Making RC remote by Palvish, 2025-07-07 15:05
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  6. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  7. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  8. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  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