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


Multitude of HAL_RCC not resolved errors

Trying to program a simple GPIO application on a Nucleo 64 STM32L476 board. During build I get 83 errors, all having to do with HAL_RCC commands that are “not resolved”. Please see attached view of Eclipse IDE.

Does anyone know why?

Hi, how did you import the project? Is it coming from CubeMX or from the HAL/FW package?
It seems the include paths are not set.
Import project from CubeMX
- Launch CubeMX >> New Project >> Board Selector tab >> Nucleo 64 STM32L476 board >> OK;
- Project menu >> Settings >> Toolchain / IDE = SW4STM32;
- Project menu >> Settings >> Project Location = C:\STM32_L4_Workspace (for example);
- Project menu >> Settings >> Project Name = L4_Blinky (for example);
- Enable the expected peripherals from the Pinout tab;
- Tune the clock frequencies from the Clock Configuration tab;
- Tune the peripheral configurations from the Configuration tab;
- Project menu >> Generate Code >> Close;
- Launch SW4STM32 and select the workspace (C:\STM32_L4_Workspace, for example);
- Right-click in the Project Explorer window >> Import >> General >> Existing Projects into Workspace >> Next >> Browse >> Select the project folder (L4_Blinky, for example) >> Finish

Import project from HAL/FW Package
- launch SW4STM32 and select the workspace (for example) :
...\STM32Cube_FW_L4_V1.5.0\Projects\STM32L476RG-Nucleo\Examples\GPIO\GPIO_IOToggle\SW4STM32\
- Right-click in the Project Explorer window >> Import >> General >> Existing Projects into Workspace >> Next >> Browse >> Select the project folder (for example ...\STM32Cube_FW_L4_V1.5.0\Projects\STM32L476RG-Nucleo\Examples\GPIO\GPIO_IOToggle\SW4STM32\STM32L476RG_NUCLEO folder) >> Finish
- Right-click on the STM32F4xx-Nucleo project >> Properties >> C/C++ General >> Indexer >> Enable project specific settings >> Remove the Index unused headers >> Apply >> OK
- Right-click on the STM32F4xx-Nucleo project >> Index >> Rebuild
- Right-click on the STM32F4xx-Nucleo project >> Build Project


SW4STM32 Tips & Tricks
- Right-click on the project >> Properties >> C/C++ Build >> Enable parallel build >> Apply >> OK
- Right-click on the project >> Properties >> C/C++ Build >> Settings >> MCU GCC Compiler >> Dialect >> Select the expected C standard (C99) >> Apply >> OK
- Right-click on the project >> Properties >> C/C++ General >> Indexer >> Enable project specific settings >> Remove the Index unused headers >> Apply >> OK
- Right-click on the project >> Index >> Rebuild
- Enable the notifications for the automatic updates in the Window menu :
Windows menu >> Preferences >> Install/Update >> Automatic Updates >> Enable automatically find new updates and notify me
- Configure the Network connection if you are using a proxy :
Windows menu >> General >> Network Connections
- Check fo updates : Help menu >> Check for Updates

- Check the stm32ZZxx_hal_conf.h file too, is HAL_RCC_MODULE_ENABLED defined?

Vetch,
Thanks for responding.

I followed your advice. The hal_conf.h file has HAL_RCC_MODULE_ENABLED defined.

I think I found the problem. The default in CubeMX Project >> Settings >> Project >> Toolchain / IDE was set to EWARM instead of STM32

I then ran build in STM32 and got no errors in the Problems window. This was run with Project Properties Build Type set to External Build. I do not know what External and Internal Build means. If I use Internal Build I get the Error 2 message in the Problems Window.

However, with no errors in Problems Window using External Build, it still will not run. I get this error message:

Error starting process.
Cannot run program “C:\STM32 Nucleo Projects\Test1_ST_20161117\SW4STM32\Test1_ST_20161117\Debug\Test1_ST_20161117.elf”: Launching failed
Cannot run program “C:\STM32 Nucleo Projects\Test1_ST_20161117\SW4STM32\Test1_ST_20161117\Debug\Test1_ST_20161117.elf”: Launching failed
Cannot run program “C:\STM32 Nucleo Projects\Test1_ST_20161117\SW4STM32\Test1_ST_20161117\Debug\Test1_ST_20161117.elf”: Launching failed

Is this just because I do not have any code in the users code sections? or is it something else?

Thanks again,

Dave

I included a simple toggle of one IO pin and I still get the same error when attempting to run the project. The program in Main.c is this:

while (1)
{
/* USER CODE END WHILE */
HAL_GPIO_TogglePin(GPIOC, GPIO_PIN_0);
/* Insert delay 100 ms */
HAL_Delay(200);
/* USER CODE BEGIN 3 */

}

no errors during complile



 

Newest Forum Posts

  1. Можно ли установить камин на балконе или лоджии? by Grand3kpdErorb, 03:38
  2. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  3. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  5. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  6. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  7. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  8. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  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