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


How to properly convert c ++ project?

Hi Kevin:

“Error_Handler” function is already in main.cpp.

The following are my steps:
1. STM32CubeMx -> Generate
2. SW4STM32 -> Import -> General -> Exisiting projects into Workspace
3. SW4STM32 -> Windows -> Preferences -> Indexer -> uncheck “Index unused header”
(It will show few errors when I import the new project, so I uncheck this option.)
4. SW4STM32 -> project folder -> right-click -> Convert to C++

Until above, there is no errors and compile success.
-------------------------------------------------------------------------------

5. SW4STM32 -> project folder/Src/main.c -> right-click -> rename “main.c” to “main.cpp”

There show a lot of errors.
Error: http://i.imgur.com/LeOCxY0.jpgQuestion
Console: http://codepad.org/nJUeXLDwQuestion
-------------------------------------------------------------------------------

6. SW4STM32 -> project folder -> right-click -> properties -> C/C++ Build -> Settings
a. MCU G++ Compiler -> Preprocessor -> Defined symbols(-D) -> add
Symbols: http://i.imgur.com/9PkTduH.jpgQuestion

b. MCU G++ Compiler -> Includes Include paths (-I) -> add
../Inc
../Drivers/STM32F4xx_HAL_Driver/Inc
../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy
../Drivers/CMSIS/Include
../Drivers/CMSIS/Device/ST/STM32F4xx/Include

c. MCU G++ Compiler -> General -> Linker Script(-T) -> add
C:\Users\Top\Desktop\STM32\stm32test\myUART\STM32F411RETx_FLASH.ld

d. MCU G++ Compiler -> Miscellaneous -> Linker flags -> add
-specs=nosys.specs -specs=nano.specs

7. SW4STM32 -> Search -> Search -> File Search -> Containing text: -> “main.c”
Search result: http://i.imgur.com/034E7cK.jpgQuestion

8. Modify “main.c” to “main.cpp”
Modify result: http://i.imgur.com/70ywlbA.jpgQuestion

Error: http://i.imgur.com/2q2NMYg.jpgQuestion
Console: http://codepad.org/UvYc9DrDQuestion

I think maybe I loss some steps, how should I do next? cry

 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs