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


How to open an existing project?

I’m completely new to SWB (and Eclipse), as you’ll be able to tell...

I’ve downloaded a project from github (https://github.com/LonelyWolf/stm32/tree/master/ls027b7dh01). So, I don’t know what IDE it was created with. It doesn’t say.

I’m used to gcc, gdb, binutils and Makefiles... but this project doesn’t have a Makefile :-(
So I’m guessing it comes from an IDE. Maybe even SW4STM32...

I was hoping I could just click on “Open Project”, enter the path, and have the stunningly complicated and advanced Eclipse “do the right thing”. No such luck.

Why are there even questions on StackOverflow like “how do I open an existing project”??? You don’t get questions from programmers/engineers like “how do I enter a URL in Firefox”, or “how do I open a jpeg in Gimp?” do you?

I’ve tried reading Tutorials on Opening a File. They involve creating a new C++ project, importing the existing project etc. Then it just says “Build All” which complains that my new project doesn’t have a decent main.c file. Or whatever. If I delete the dummy project, Project->Build is mostly greyed out, muttering something about “working sets”.

I just want to compile this dude’s code, and see what it’s doing... Not buy 1000 page textbooks on how to configure Eclipse.


Sorry for the ranting, but ...

Hi,

This project from the Github only has the source codes. It is not configured for any IDE which means you can’t open it or import it on System Workbench.

What you can do is to create a new project, copy the sources into the project then configure it (which might be quite tricky for new Eclipse users).
- Go to File > New > C Project, Select “Empty Project” in Executable, and the “Ac6 STM32 MCU GCC” toolchain. Enter your project name then Next
- In the “Select Configuration” page just push Next
- Select the target board, this project seems to be for a STM32L476G-EVAL board (STM32L4 Series), then Next
- Keep “No Firmware” checked then Next
- On the newly created project, copy all the sources files. Then you have to configure the project settings.
- Right-click on the “boot” and “periph” folders, Resourses configuration > Exclude from build, then deselect all. (This step is important as the folders have *.c or *.S files which needs to be built)
- Add the includes folder paths (= -I flags for gcc command) : Right-click on the project then Properties > C/C++ General > Paths and Symbols. On the “Includes” tab, Click the “Add...” button, then check every options, then click on “Workspace...” and find the folder which has the headers.

All these settings are saved into a “.project” and “.cproject” files which is what Eclipse can open/import.

I put my files in attachment so that you can quickly import the project without do all the steps below.
- Copy the file in the folder where the sources are, probably “ls027b7dh01”
- On System Workbench, File > Import... > General > Existing project. Browse the “ls027b7dh01” location, check the found project and the “Copy projects into workspace” option. Then click on Finish the import the project.

Hope it helps,
Regards,

Kevin
ac6

Thanks!

I’ll give it a go. I’m sure it’ll all work out eventually... :-)

It’s just that the initial phase can be pretty frustrating. A nice tool should make difficult/complicated things possible, but keep simple/easy things easy!

I suppose my gripe with (all) IDEs is that they look like simple GUI programs. But underneath they’re still just the excessively flexible / insanely complicated build systems. You can’t just type random commands at gcc and hope to get an executable. Not like you can just click on PLAY or VOL+ in a music player and have it do what you expect...

“This project from the Github only has the source codes. It is not configured for any IDE which means you can’t open it or import it on System Workbench.”

Hmm. Well, it does have a .project file. And the linker script says “(c) Copyright Ac6.” Of course, it may just have been copied... :-)

I followed your instructions OK until ‘Right-click on the “boot” and “periph” folders, Resourses configuration > Exclude from build, then deselect all.’ — The Resources configuration entry wasn’t there. ? unless I’m going mad

I downloaded SW4STM32 a couple of days ago. Today it told me there were updates available, which I installed.

Now I was able to follow along OK, except I had to Exclude from Build the SW4STM32-created startup directory (system and startup files) which were conflicting with (ie. duplicating) the project’s boot files.

So, thanks for the help! (seriously)

(I still think a terminal, vim, gcc, as, ld and a Makefile are clearer and simpler, but that’s just me.)

(And now I just have about 6000 lines of assembly code to go through - instead of about the 60 which might be needed to actually get the display to, well, just display something... But, mustn’t grumble...)


 

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