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


Compiling Demonstration for 32L0538DISCOVERY on SW4STM32

It’s been a long time I didn’t program on SW4STM32.

I try to compile the demonstration project for 32L0538DISCOVERY found in STM32Cube_FW_L0_V1.11.0.

I got plenty of dependency errors.
I try to copy the full Driver directory in the project but I found out it a bad idea because gcc try to compile the arm and iar files.

When I try to add only the BSP files I got other errors (undeclared variables/functions).

What is the simplest way to compile the exemples and demonstration projects when the SW4STM32 is not set ?

(Maybe using CubeMX)

Mr. Shirokuma,
Your can copy configuration from other SW4STM32 projects inside STM32Cube_FW_L0_V1.11.0 library,
or You can create a new one with CubeMX and use it as reference project, after that You can add Your modules or modify already in modules.

I don’t have any built L0 project with me but I attach some screenshot of Setting pages of System Workbench for STM32 for visual reference. It can somehow be of use, even though this is a case of STM32F4 microcontroller.


The problem is when I create a project with CubeMX the Drivers directory is missing a lot of components and libraries.
How to tell CubeMX to add more than the basic ones (BSP for exemple) ?

Italy

Hi Shirokuma, first you have to choose a complete template or better an example.
All examples Application and templates have AC6 setting. Demonstration has no AC6 settings, hope ST can supply this in the future.

So the fast way can be pick one project, I suggest USB to avoid miss important settings. (Application USB_Device DFU_Standalone)
Try import compile and test.
At this point copy and paste project. (ctrl C ctrl V or from menus copy and paste)

On project copy, start add files from demonstration.
Clean compile and see what still is missing from, open :-> project-explorer -> Property for xxxxxx
C/C++ general -> Paths and Symbols
tabs Includes and Source Locations
add path to missing Folder and library or sources

if reference is not under project root:
Select folder where it has to be (example Src or Inc) right click mouse on folder then select “new file” on popup select Advanced
select check box “link to file in file system” use button browse to select file, when done press button finish.

- *** - *** --- ***
Alternate.
- *** - *** --- ***
(Maybe folder naming where different on your system)
Open repository directory:
$homedir/STM32Cube/Repository/STM32Cube_FW_L0_V1.11.0/Projects/32L0538DISCOVERY/Applications/USB_Device/DFU_Standalone
copy folder SW4STM32 then paste to
$homedir/STM32Cube/Repository/STM32Cube_FW_L0_V1.11.0/Projects/32L0538DISCOVERY/Demonstrations
CD to
$homedir/STM32Cube/Repository/STM32Cube_FW_L0_V1.11.0/Projects/32L0538DISCOVERY/Demonstrations/SW4STM32
rename STM32L053C8_USBxxxxx to STM32L053C8_Demonstrations then CD to folder STM32L053C8_Demonstrations/Debug
keep STM32L053C8Tx_FLASH.ld, STM32L0538DISCOVERY.xml, .project .cproject and folder .settings select other things and delete.


edit both .project and .cproject
subst STM32L053C8_USBxxxxx with STM32L053C8_Demonstrations

rename or adapt Applications to Demonstrations, check subdir depth and adapt to new one (projects Applications has subfolder projects Demonstrations not).
save
import and clean then try compile.
May be some dependances still where uncovered but can be adjusted on settings.
Also file .project and .cproject can be edited as XML on workbench open as file not project. When ready import.
If this doesn’t work tell again.
Best regards
Roberto


Italy

Hi Shirokuma, if possible split request and use best Title to help other search topic.

About cubemx add library you need adapt your project or new board to existing product selection by board type.
From your writing appear you are using an ST board so:
Select board where you are working instead of processor based seems the best way to have BSP included.
If other package from preloaded: select middleware, enable product and fill relative configure page.
Last resource is to use project manager and add there remaining software/ add as library on generated code.
Also check FAQ:
http://www.openstm32.org/Creating%2Ba%2Bnew%2BprojectQuestion
http://www.openstm32.org/tiki-view_faq.php?faqId=5#q14Question
Best regards
Roberto


Thank you rromano001 for your advises.

I finaly manage to create a project. It took some time to find all the dependencies but now it’s ok.
If you need it you can find the project below.


 

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