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


Importing a Cube MX project

Hello!

My main question is in the summary. When importing a CubeMX project, the guidelines say that one
shouldn’t copy the files into the project. Why? I guess that if the option exists, then it has to be useful.
Some reason I can guess is that once you have transfered the files into the workspace, then if you have
to add something using MX, it would be a pain and it would be certainly easier. But is there any technical
reason that would simply prevent it to work?

I did a few tests, and indeed it sometimes works when not copying, but it almost never works when copying.
Could anybody explain me why?

Next, could anybody explain me what the following error is:
Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal.d:1: *** target pattern contains no `%’. Stop.

And if I could know what to do, I would be close to Nirvana.

Best regards,

Pascal

Hi Pascal,
There is an issue with the “copy into workspace” feature. It should be fixed soon.


Hello!

Thanks for your reply. Now, any idea of the problem I was mentioning:
When I make a Cube project and import it, I usually end up with this message at compile time:

Drivers/STM32F4xx_HAL_Driver/stm32f4xx_hal.d:1: *** target pattern contains no `%’. Stop.

I tried to search the web, but couldn’t find any explanation in the right context (i.e. STM32).
And for the other explanations, well, I don’t get it. I’m quite new to STM32.

Best regards,

Pascal


Hello Pascal,
First, I am using CubeMX 4.18. The CubeMX V1.17 does not handle the latest HAL package
As the “Copy projects into workspace” is having issues, I imported CubeMX projects in using the following steps :
- Launch CubeMX >> New Project >> Board Selector tab >> I am using 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


You forgot a step right after:

- Right-click in the Project Explorer window >> Import >> General >> Existing Projects into Workspace >> Next >> Browse >> Select the project folder (L4_Blinky, for example) >> Finish

add:

- Debug for hours.

Lately for some reason the imports from cube are giving me an error about an unexpected character ‘(’ at line 0 in main.c. There is no line 0 in main. It has to do with the symbol that is in the project and I haven’t determined it it is the ‘packed’ or ‘weak’ define causeing it. I usually just delete both.


The weak and packed symbols could be useful. It would be wise to keep those.
While using OS-X, add ” arround the symbol definition :
- Right-click on the project >> Properties >> C/C++ Build >> Settings >> Tools Settings tab >> MCU GCC Compiler >> Symbols

__weak="__attribute__((weak))"
__packed="__attribute__((__packed__))"

While using Windows, there is no issue with :

__weak=__attribute__((weak))
__packed=__attribute__((__packed__))

 

Newest Forum Posts

  1. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  2. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  3. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  4. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  5. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  6. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  7. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  8. Build a project in "release" mode by tang, 2025-02-20 10:36
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35
  10. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-26 20:27

Last-Modified Blogs