InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.76k stars 944 forks source link

How to produce merged-internal.hex #525

Closed lynxD closed 3 years ago

lynxD commented 3 years ago

In release 1.2.0 merged-internal.hex file is provided. I can't find any documentation/script on procedure to produce it. Can anyone point me to it/write it down?

JF002 commented 3 years ago

The additional files in release 1.2.0 are the files I generated and sent to the factory for the production of the new batch of PineTimes:

I generated these files manually (but it would be nice if they were generated automatically by CMake) :

lynxD commented 3 years ago

I've successfully generated merged-internal.hex and spinor.bin. Thx! The commands I've used: merged-internal.hex:

 arm-none-eabi-objcopy --input-target=binary --output-target=ihex --change-section-address '*=0x8000' build/output/src/pinetime-mcuboot-app-image-1.3.0.bin build/output/src/pinetime-mcuboot-app-image-1.3.0.hex
path/to/nRF-cli/nRF-Command-Line-Tools_10_13_0_Linux64/mergehex/mergehex --merge build/output/src/pinetime-mcuboot-app-image-1.3.0.hex ~/tmp/bootloader.hex --output build/merged-internal.hex

spinor.bin:

arm-none-eabi-objcopy --input-target=binary --output-target=ihex build/output/src/pinetime-mcuboot-recovery-image-1.3.0.bin build/output/src/spinor.bin

I can add that to build logic. I just need to know how do You want it go about getting bootloader? Add repo as a submodule(specific commit) and build it? Expect a file to be placed somewhere and not build by default? Add a golden binary to git?