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


Hex, bin and ELF Files

Hello community members,

I’m a newcomer to the STM32 embedded world and am having some trouble trying to understand the real basics.I’ve spent years working on the PIC microcontrollers but do not seem to grasp the basics of this change.

I’ve installed System Workbench due to the unrestricted use. I believe the compiler is the ARM GNU. I have installed the STM32CubeL4 package which has a folder full of examples and demos.

Issue 1: If I browse that using my Windows File Explorer is see an icon for a SW4 project file. Out of interest at this point, browsing the same project seems to find other SW4 projects and SW4 CProjects - does anyone know why there are so many?

If I click on the top root project the project opens in SW4.
Issue 2: There seems to be many folders and some projects have HEX files, some BIN files and some ELF files. I’m not quite sure which to utilise to send to the ST-LINK program.

Issue 3: Sometimes in these projects I think I need to compile them first however there are also projects in the Cube folder where the BUILD button is greyed out.

I can drag the HEX and BIN files to the ST-LINK program.


I would be really grateful for any snippets of information that explain these basics to be (in simple terms as I’m quite old ! ) or good online references.


thanks you for reading,

regards,

Rod

(1) in the build directory you will find sub-project make files (particularly in each folder); that’s all automatically generated and you don’t really need to worry. Outside of the build folder there’s one xml file and a couple of “hidden” dot files with setting (.cproject, .project); don’t mess with them directly, it’s not helpful unless you’re really in a jam, trust me rolleyes

(2) there should be basically Debug and Release build folders, in the root there is a your bin,hex, and elf... they’re all different representations of the output (elf has all the detail, bin and hex represent the same but compiled program but with stuff stripped - obviously one is binary and one is ascii text representing that binary as hexadecimal)

eg:
Generating hex and Printing size information:
arm-none-eabi-objcopy -O ihex "EthernetUDPTestFreeRTOS.elf" "EthernetUDPTestFreeRTOS.hex"
arm-none-eabi-size "EthernetUDPTestFreeRTOS.elf"
text data bss dec hex filename
35736 32 39320 75088 12550 EthernetUDPTestFreeRTOS.elf

the elf file is the output from the link step and the arm-none-eabi-objcopy makes the hex file from that

you don’t need to use the ST-Link program if you’re in SW4STM32; the functionality is right there when you begin debugging it will download the binary via your ST-Link device


 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  2. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  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. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs