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


Build Errors with STM32L476 Discovery Board

Hello
First I was successful in building and deploying a small program to the STM32F401 Nucleo using nucleo-f401re_hal_lib. That all works.

Now I’m trying first steps with the STM32L476 Discovery using stm32l476-disco_hal_lib. With only a main function I get errors like this:
fatal error: ffconf.h: No such file or directory ff.h /stm32l476g-disco_hal_lib/Middlewares/Third_Party/FatFs/src line 27 C/C++ Problem
(Yes that file does not exist)

multiple definition of `_sbrk’ syscalls.c /L476-1/src line 115 C/C++ Problem
(_sbrk is in \startup\sysmem.c and in \src\syscalls.c)

Has anyone seen the STM32L476 Discovery board to work with the HAL in System Workbench?
Do you have a small project that builds with the stm32l476-disco_hal_lib that you could send me for inspection?

Any suggestions?

thanks
St3v3

Last week I was at a ST seminar where we built and ran several projects on the STM32L476 Discovery board.

I used:
System Workbench (latest)
CubeMX 4.11
L4 HAL 1.1.0
ST-Link Utility 3.7.0

The simplest example using CubeMX is:
1 - Create new project. Select STM32L476VGTx (LQFP-100, 1024K Flash)
2 - Left-click PB2 & PB8 and set to GPIO_Output mode (these are the user LEDs on the board)
3 - Open Project->Settings and give the project a name and location. Select SW4STM32 as the toolchain.
4 - Generate the code.
5 - Import project into System Workbench. Open main.c and scroll to the bottom.
6 - Within “USER CODE BEGIN WHILE” / “USER CODE END WHILE” add to the while loop:
HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_2);
HAL_Delay(100);
HAL_GPIO_TogglePin(GPIOE, GPIO_PIN_8);
HAL_Delay(100);
7 - Save, Build.
8 - Debug As “AC6 STM32 C/C++ Application” and specify the target as ST-LinkV2-1 with SWD connection.

Admire the blinking lights.


Thanks very much for the clear instructions. I’ll give that a try.

I have been somewhat succesful _not_ using CubeMX but I had to delete the Flash File System and USB Middlewares out of the project to get it to build. I’ll try using CubeMX as you have detailed above!


 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  2. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  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. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs