[riot-notifications] [RIOT-OS/RIOT] boards/frdm-kw41z-k64f: add riotboot (#11562)
notifications at github.com
Thu Jun 6 10:42:02 CEST 2019
@cladmi I found the reason why it wasn't working for pba-d-01-kw2x:
> "ARMv7-M Architecture Reference Manual" B1.5.3 The vector table
> The Vector table must be naturally aligned to a power of two whose alignment value is greater than or equal to (Number of Exceptions supported x 4), with a minimum alignment of 128 bytes.
> "Cortex-M4 Devices Generic User Guide" 4.3.4. Vector Table Offset Register
> The minimum alignment is 32 words, enough for up to 16 interrupts. For more interrupts, adjust the alignment by rounding up to the next power of two. For example, if you require 21 interrupts, the alignment must be on a 64-word boundary because the required table size is 37 words, and the next power of two is 64.
For MKW22D5 the number of INT_VECTORS is (82 + 16), so it need to be `po2(4x98) = 512 (0x200)` aligned.
In this case by default it is located at `RIOTBOOT_LEN + RIOTBOOT_HDR_LEN = 0x1100` which is not aligned to `0x200`. If `RIOTBOOT_LEN` is increased to be `0x1100` it works. But here comes the tricky part... We still need the whole image to start at the beginning of a page. So what should actually be done is increase `RIOTBOOT_HDRL_LEN` to be `0x200` aligned.
This need to be done for all M4, I had struggled a while ago debugging why `riotboot` doesn't work on stm32l4 and its the exact same issue, I'm now able to make it work by changing `RIOTBOOT_HDRL_LEN` size to `0x200`.
Anyway I will open separate PR's for this.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications