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 generating

Hi Everyone,

How can I generate Hex file on SW4STM? I can just get elf and bin format. Is there any converting tools?
Thanks

Hi,
I have same question. Some linker option flag?


I found the answer on my own:
Need to open project properties -> C/C++ Build -> Settings.
On Build Steps tab there’s a post-build steps.
Need to add this to the end or middle:

&& arm-none-eabi-objcopy -O ihex “${BuildArtifactFileBaseName}.elf” “${BuildArtifactFileBaseName}.hex” &&

&& is a separator.


Hi,
I’ve tried to change Build Settings like stated here (and also like stated there - http://www.openstm32.org/forumthread4783Question )
but I get error and debug output like :

make --no-print-directory post-build
Generating binary and Printing size information:
arm-none-eabi-objcopy -O binary “SBT2SLV01_fw.elf” “SBT2SLV01_fw.bin”
arm-none-eabi-objcopy: ‘“SBT2SLV01_fw.elf”’: No such file
make1: *** post-build Error 1
make: *** SBT2SLV01_fw.elf Error 2

anybody managed to solve this issue?

Hi,

If you did copy/paste the command from the post, the double-quote might have the wrong format (different ASCII characters). Please manually erase then rewrite them.

I think it would solve the issue,

Regards,
Kevin.

Hi Kevin,
Yes, you were absolutely right! that was the root of the problem.
Thank you very much!


I my case, I wanted SREC output, so this post helped a lot.
I have one thing to add - noted above by Kevin also - the forum software on this site changes the quote characters!
If you are cutting and pasting be aware of that - compare “this” to "this" and note the substitution of curly quotes in the first for the straight quotes in the second which is in “monospace font/code sample” quoting - see help.
This should work:

arm-none-eabi-objcopy -O binary "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.bin" && arm-none-eabi-objcopy --output-target=srec "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.srec" && arm-none-eabi-size "${BuildArtifactFileName}"

so you can also do
arm-none-eabi-objcopy --info
to see the supported output formats for your platform.

(edit to acknowledge Kevin and to add output format example)


Hello guys, I was also struggling with the HEX generation as well but at the end I’ve discovered that I don’t have to do any extra thing since the file is generated automatically! The only thing I needed to do is refreshing the project. After that the binary file just appeared ;)



I am using ac6 IDE, in that for generating hex file I follow the steps C/C++ Build -> Settings. but after clicking on setting whole software will crash and continuously buffering.I also try to update the ac6, it will display message no update was found. how to solve this issue