Skip to content

Commit df9375b

Browse files
authored
Merge pull request #73 from VeijoPesonen/readme_bootloader-details
README.md: Adds instructions how to obtain bootloader-details
2 parents feee953 + aa99184 commit df9375b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,16 @@ You can extend or override the default configuration using `mbed_app.json` in th
188188

189189
- Common configuration
190190

191-
Regardless of where the firmware candidate is located (internal or external), there is a need to have a bootloader in place. The binary of the booloader can be specified with the `bootloader_img` option. The address and size of the bootloader determines the `application-details` and `bootloader-details` options. The value of `bootloader-details` can be obtained by running the binary on the target and observing the serial output.
191+
Regardless of where the firmware candidate is located (internal or external), there is a need to have a bootloader in place. The binary of the booloader can be specified with the `bootloader_img` option. The address and size of the bootloader determines the `application-details` and `bootloader-details` options. The value of `bootloader-details` can be obtained by checking for the symbol from the map file of the binary. Example python code for obtaining the location:
192+
```python
193+
with open("BUILD/UBLOX_EVK_ODIN_W2/GCC_ARM/mbed-bootloader.map", 'r') as fd:
194+
s = fd.read()
195+
196+
regex = r"\.rodata\..*{}\s+(0x[0-9a-fA-F]+)".format("bootloader")
197+
match = re.search(regex, s, re.MULTILINE)
198+
offset = int(match.groups()[0], 16)
199+
print hex(offset)
200+
```
192201

193202
Review the [mbed-bootloader](https://github.com/ARMmbed/mbed-bootloader#configurations) guidelines on how these options should be selected. Review the [bootloader configuration](2.-Bootloader-configuration) section below for more information.
194203

0 commit comments

Comments
 (0)