diff options
| author | Badr Bouslikhin <[email protected]> | 2024-12-05 18:12:31 +0100 |
|---|---|---|
| committer | Badr Bouslikhin <[email protected]> | 2024-12-05 18:12:31 +0100 |
| commit | a5ab19276e5b421de4ca034121909a6e7257a5d4 (patch) | |
| tree | e6b9634921a22e55f7328775252a504d2ef10dcc /embassy-boot-nrf/README.md | |
| parent | af02310edc60c568368d2e8805bb07a0797723a8 (diff) | |
docs: document softdevice/embassy-boot-nrf integration
Diffstat (limited to 'embassy-boot-nrf/README.md')
| -rw-r--r-- | embassy-boot-nrf/README.md | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/embassy-boot-nrf/README.md b/embassy-boot-nrf/README.md index f0d87e18c..b77cf80bd 100644 --- a/embassy-boot-nrf/README.md +++ b/embassy-boot-nrf/README.md | |||
| @@ -6,6 +6,25 @@ An adaptation of `embassy-boot` for nRF. | |||
| 6 | 6 | ||
| 7 | ## Features | 7 | ## Features |
| 8 | 8 | ||
| 9 | * Load applications with or without the softdevice. | 9 | - Load applications with or without the softdevice. |
| 10 | * Configure bootloader partitions based on linker script. | 10 | - Configure bootloader partitions based on linker script. |
| 11 | * Using watchdog timer to detect application failure. | 11 | - Using watchdog timer to detect application failure. |
| 12 | |||
| 13 | ## Working with a SoftDevice | ||
| 14 | |||
| 15 | When a SoftDevice is present, it handles starting the bootloader and the application as needed. | ||
| 16 | |||
| 17 | The SoftDevice architecture supports the bootloader via a configurable base address, referred to as `BOOTLOADERADDR`, in the application flash region. This address can be specified either: | ||
| 18 | |||
| 19 | 1. At the `MBR_BOOTLOADER_ADDR` location in flash memory (defined in `nrf_mbr.h`), or | ||
| 20 | 2. In the `UICR.NRFFW[0]` register. | ||
| 21 | |||
| 22 | The `UICR.NRFFW[0]` register is used only if `MBR_BOOTLOADER_ADDR` has its default value of `0xFFFFFFFF`. This bootloader relies on the latter approach. | ||
| 23 | |||
| 24 | In the `memory.x` linker script, there is a section `.uicr_bootloader_start_address` (origin `0x10001014`, length `0x4`) that stores the `BOOTLOADERADDR` value. | ||
| 25 | Ensure that `__bootloader_start` is set to the origin address of the bootloader partition. | ||
| 26 | |||
| 27 | When a bootloader is present, the SoftDevice forwards interrupts to it and executes the bootloader reset handler, defined in the bootloader's vector table at `BOOTLOADERADDR`. | ||
| 28 | |||
| 29 | Once the bootloader loads the application, the SoftDevice initiates the Application Reset Handler, defined in the application’s vector table at APP_CODE_BASE hardcoded in the SoftDevice. | ||
| 30 | The active partition's origin **must** match the `APP_CODE_BASE` value hardcoded within the SoftDevice. This value can be found in the release notes for each SoftDevice version. | ||
