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


Error unknown type name 'HAL_LockTypeDef'

1. I create a project in CubeMX.
2. Imported into SW4STM32.
3. The compilation is completed without errors.
4. I create in the project c-file gyro_l3gd20.с.
5. I add only 4 lines to it:
#include ‹main.h›
#include ‹stm32f3xx_hal_gpio.h›
#include ‹stm32f3xx_hal_spi.h›
#include ‹sys/_stdint.h›

6. I compile. And I get 100 errors like: unknow type name ‘HAL_StatusTypeDef’ stm32f3xx_hal.h / L3GD20_SPI / Drivers / STM32F3xx_HAL_Driver / Inc line 863 C / C ++ Problem

7. I comment on lines 2 and 3:
#include ‹main.h›
// #include ‹stm32f3xx_hal_gpio.h›
// #include ‹stm32f3xx_hal_spi.h›
#include ‹sys/_stdint.h›

8. The project is compiled without errors.

What am I doing wrong?

I attach a log with errors and a c-file.

As usual, the problem was resolved as soon as I wrote to the forum.
I was helped by the following:

1. I deleted all 4 includes:

  1. include ‹main.h›
  2. include ‹stm32f3xx_hal_gpio.h›
  3. include ‹stm32f3xx_hal_spi.h›
  4. include ‹sys/_stdint.h›


2. And I added one #include ‹stm32f3xx_hal.h›

This was enough for the functions that I use in gyro_l3gd20.c file.

P.S. All 4 non-working #include I added using the combination CTRL + Shift + O.
I do not advise you to use this function so that there are no problems like mine.


 

Newest Forum Posts

  1. aaa online casino a365qw by Arielvot, 2026-02-09 11:43
  2. Unable to build project by septimusbob, 2026-02-08 20:27
  3. New installations is now uploaded ! by karushifa, 2025-12-25 00:53
  4. Analog servomotors with nucleo f334r8 by SkelePaw, 2025-11-01 05:57
  5. STM32 MCU model shortlisting for Making RC remote by Palvish, 2025-07-07 15:05
  6. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  7. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  8. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  9. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  10. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58

Last-Modified Blogs