How to generate .hex image


Tidy(ChunHua) Jiang <tidyjiang@...>
 

Hello,

When building, some BOARDs will generate both .bin and .hex, but others only .bin.
Is there a build switch to control this ?

My current stupid method is that, enter the directory where zephyr.elf is located, and then type:
/opt/zephyr-sdk/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-eabi/arm-poky-eabi-objcopy -S -O ihex -R .note -R .comment -R COMMON -R .eh_frame zephyr.elf zephyr.hex

Thanks.


Boie, Andrew P
 

At the moment, you can add these two lines to your soc or arch-level Makefile to get ihex files generated.
A better enhancement would be to control this with Kconfig.

zephyr: $(KERNEL_HEX_NAME)
all: $(KERNEL_HEX_NAME)

From: Tidy(ChunHua) Jiang [mailto:tidyjiang(a)163.com]
Sent: Sunday, January 15, 2017 6:40 PM
To: devel(a)lists.zephyrproject.org
Subject: [devel] How to generate .hex image

Hello,

When building, some BOARDs will generate both .bin and .hex, but others only .bin.
Is there a build switch to control this ?

My current stupid method is that, enter the directory where zephyr.elf is located, and then type:
/opt/zephyr-sdk/sysroots/i686-pokysdk-linux/usr/bin/arm-poky-eabi/arm-poky-eabi-objcopy -S -O ihex -R .note -R .comment -R COMMON -R .eh_frame zephyr.elf zephyr.hex

Thanks.