Skip to content

Add information on how to change the start address #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ The bootloader helps to upload a new sketch to the board. If the bootloader was
## Memory Layout

Both the bootloader and the firmware have predefined (but adjustable) locations in the memory where they get stored. In the end, the processor needs to know where to find the instructions to do its work. On the Portenta, for example, the bootloader is stored at the Flash memory address `0x08000000`. When the board gets powered on, it will jump to this location and start to do its job. The bootloader in turn knows that e.g. for the M7 the firmware can be found at location `0x08040000`, so it will jump there if it does not need to upload a new firmware.
Should you for some reason want to adjust the start address of the application, you can edit the property `target.mbed_app_start` in the [mbed_app.json config file](https://github.com/arduino/ArduinoCore-mbed/blob/master/variants/PORTENTA_H7_M7/conf/mbed_app.json) of the core. Apart from modifying the json, you also need to change the text section start address [here](https://github.com/arduino/ArduinoCore-mbed/blob/master/variants/PORTENTA_H7_M7/linker_script.ld#L3). Alternatively you can recompile Mbed OS using the `mbed-os-to-arduino` [script](https://github.com/arduino/ArduinoCore-mbed/blob/master/mbed-os-to-arduino).

![There are predefined, but adjustable locations in the memory where the firmware and the bootloader get installed](assets/por_ard_bl_flash_memory.svg)

Expand Down