nrf52: Auto generate Intel Hex kernel image
Generate kernel image in Intel Hex format when building for the nRF52. Remove the additional step from the board doc file. Change-Id: I619496f64037c2a0ac459ae05e549e01458e0f71 Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
parent
d8933d6c0a
commit
ddcc350a8b
2 changed files with 14 additions and 10 deletions
|
@ -1 +1,15 @@
|
||||||
obj-y += soc.o
|
obj-y += soc.o
|
||||||
|
|
||||||
|
KERNEL_HEX_NAME = $(KERNEL_NAME).hex
|
||||||
|
|
||||||
|
quiet_cmd_gen_hex = HEX $@
|
||||||
|
cmd_gen_hex = \
|
||||||
|
( \
|
||||||
|
$(OBJCOPY) -S -O ihex -R .note -R .comment -R COMMON -R .eh_frame $< $@; \
|
||||||
|
)
|
||||||
|
|
||||||
|
$(KERNEL_HEX_NAME): $(KERNEL_ELF_NAME)
|
||||||
|
$(call cmd,gen_hex)
|
||||||
|
|
||||||
|
zephyr: $(KERNEL_HEX_NAME)
|
||||||
|
all: $(KERNEL_HEX_NAME)
|
||||||
|
|
|
@ -377,16 +377,6 @@ shell :file:`$ZEPHYR_BASE/samples/shell`.
|
||||||
|
|
||||||
#. Connect the micro-USB cable to the nRF52 DK and to your computer.
|
#. Connect the micro-USB cable to the nRF52 DK and to your computer.
|
||||||
|
|
||||||
#. Convert the Zephyr kernel image to Intel Hex:
|
|
||||||
|
|
||||||
.. code-block:: console
|
|
||||||
|
|
||||||
$ cd samples/shell
|
|
||||||
$ objcopy -O ihex outdir/zephyr.elf outdir/zephyr.hex
|
|
||||||
|
|
||||||
The :code:`objcopy` binary must be the one included with the
|
|
||||||
toolchain you used to build the Zephyr kernel
|
|
||||||
|
|
||||||
#. Erase the flash memory in the nRF52832:
|
#. Erase the flash memory in the nRF52832:
|
||||||
|
|
||||||
.. code-block:: console
|
.. code-block:: console
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue