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


Generating Project Build Scripts

Hi Guys,
Is it possible to get a build script working for a SystemWorkbench project?
For example, a windows or Linux command line script I can run to generate the elf and hex file, without the need for opening SystemWorkbench? We are using the Internal Builder for building the projects, and have some custom steps after compile. I would like to avoid having to hand create the command line arguments every time the project changes.

I ask so we can incorporate our SystemWorkbench STM32 projects with our Continuous Integration Server, and for better versioning and release procedures.

Thanks for your time :-)

Hi,

On Windows, I know you can build a project and generate the ELF file with the following command line :

To build :
{INSTALLATION_PATH}/eclipsec.exe --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -build {PROJECT_NAME} -data {WORKSPACE_LOC}

To clean :
{INSTALLATION_PATH}/eclipsec.exe --launcher.suppressErrors -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -cleanBuild {PROJECT_NAME} -data {WORKSPACE_LOC}

To generate the HEX file, you have to manually modify the project post-build step command (Project Properties > C/C++ Build > Settings > Build Step) or add a command to your script.

I did not used this on Linux, I can’t tell you if it also works..

Hope it answer your question.
Kevin.



But how can I do this more directly?

In older versions of Eclipse, with other C++ toolchains, I could kick-off a build that accessed the generated makefiles. This is getting more difficult. Relying on a “headless build” allows the IDE and add-in developers to be more creative but makes my job harder.

I’m working on more serious code and dislike the opaque way the toolchain works inside the IDE. For example. there are environment variables put into the spawned shells that aren’t controlled. I don’t really know how the build operates The project needs to have tight control over tools and build procedures so each tool can be validated and the process can be ensured to produce the same binaries on all build machines.

Right now, I can’t build using makefiles because:

There’s a special environement variable (I think) “objects.list” added to the archive command.

Include paths are fully qualified even though they are defined as relative. In the Settings, it shows the command line using the “-I../../” format but the makefiles get fully-qualified paths; “C:/mcustuff/...” Someone is really “helping” but it’s really not helpful. I don’t see an option to turn path expansion off.

Perhaps I need to toss using the AC6 toolchain and go with Cygwin gcc (This is Windows) or just go IAR.

Thoughts and suggestions?


 

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