Skip to content

Commit b302a87

Browse files
committed
Generate hex image for all targets by default
Mbed OS builds .bin images by default for most targets, but many targets (e.g. ST targets running the latest ST-LINK firmware) also support .hex files, making this demo much easier to prepare. In case a target doesn't support .hex files, README.md already contains steps for merging .hex files into a single one and converting it to a .bin file.
1 parent 8280fe6 commit b302a87

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ You should also install the python package `intelhex` if it is not already insta
132132

133133
This python package includes several utility scripts for working with binaries and .hex files.
134134

135+
By default, the demo application and bootloader are built as hex files to support flashing multiple images to different addresses. Some targets need to have the latest debug interface firmwares to support this, for example ST-LINK's firmware upgrader can be found [here](https://www.st.com/en/development-tools/stsw-link007.html). If your target does not support hex images, a single bin image with everything merged together can be used instead as will be described in [Merging it all together](#Merging-it-all-together) below.
136+
135137
### Creating the signing keys and building the bootloader
136138

137139
This section will only cover steps specific to setting up this project with a signing key pair and signing a main application binary. For more advanced use cases and information, such as using alternative signing algorithms to rsa-2048, see the [mcuboot documentation on Image Signing](https://github.com/mcu-tools/mcuboot/blob/master/docs/signed_images.md#image-signing).
@@ -236,7 +238,9 @@ Other toolchains will have a similar utility to perform this step.
236238

237239
### Merging it all together
238240

239-
To be able to drag-and-drop program the whole demo together, it is necessary to merge all the hex files we created in the last steps together.
241+
Usually, if your target supports hex files, you can drag-and-drop one image at a time (waiting for each to finish) to program them into their respective locations.
242+
243+
If your target doesn't support hex files or performs a whole chip erase upon every drag-and-drop action, it is necessary to merge all the hex files we created in the last steps together.
240244

241245
At this step, you should have created three hex files:
242246
- mbed-mcuboot-demo.hex (the bootloader)

mbed_app.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"*": {
1111
"target.restrict_size": "0x20000",
1212
"target.c_lib": "small",
13+
"target.OUTPUT_EXT": "hex",
1314
"mcuboot.log-level": "MCUBOOT_LOG_LEVEL_DEBUG",
1415
"mbed-trace.enable": true,
1516
"mbed-trace.fea-ipv6": false

0 commit comments

Comments
 (0)