[riot-notifications] [RIOT-OS/RIOT] cpu/stm32f4: add riotboot requirements (#11682)

Alexandre Abadie notifications at github.com
Wed Jun 19 09:08:03 CEST 2019


aabadie requested changes on this pull request.

I have comments on comments.

> @@ -1,5 +1,24 @@
 export CPU_ARCH = cortex-m4f
 export CPU_FAM  = stm32f4
 
+# STM32F4 uses sectos instead of pages, where the minimum length sector

s/sectos/sectors/

> @@ -1,5 +1,24 @@
 export CPU_ARCH = cortex-m4f
 export CPU_FAM  = stm32f4
 
+# STM32F4 uses sectos instead of pages, where the minimum length sector

...where the minimum sector length... ? (just swap length and sector words)

> @@ -1,5 +1,24 @@
 export CPU_ARCH = cortex-m4f
 export CPU_FAM  = stm32f4
 
+# STM32F4 uses sectos instead of pages, where the minimum length sector
+# is 16KB (the first sector), therefore RIOTBOOT must be 16KB to cover a whole sector

Should be RIOTBOOT_LEN instead ?

> @@ -1,5 +1,24 @@
 export CPU_ARCH = cortex-m4f
 export CPU_FAM  = stm32f4
 
+# STM32F4 uses sectos instead of pages, where the minimum length sector
+# is 16KB (the first sector), therefore RIOTBOOT must be 16KB to cover a whole sector
+RIOTBOOT_LEN ?= 0x4000
+
+# "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"
+# CPU_IRQ_NUMOFF for stm32l4 boards is < 102+16 so (118*4 bytes = 472 bytes ~= 0x200)

Is this comment block still needed for F4? There's a mention to stm32l4, so it looks like a copy paste left-over.

> @@ -1,5 +1,24 @@
 export CPU_ARCH = cortex-m4f
 export CPU_FAM  = stm32f4
 
+# STM32F4 uses sectos instead of pages, where the minimum length sector
+# is 16KB (the first sector), therefore RIOTBOOT must be 16KB to cover a whole sector
+RIOTBOOT_LEN ?= 0x4000
+
+# "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"
+# CPU_IRQ_NUMOFF for stm32l4 boards is < 102+16 so (118*4 bytes = 472 bytes ~= 0x200)
+# RIOTBOOT_HDR_LEN can be set to 0x200
+RIOTBOOT_HDR_LEN ?= 0x200
+
+# Sectors don't have the same length, they go from 16KB to 128KB. The first 5 sectors adding

"The sum of the 5 first sectors is up to 128kB" might be more readable (if it's what you mean here).

> @@ -1,5 +1,24 @@
 export CPU_ARCH = cortex-m4f
 export CPU_FAM  = stm32f4
 
+# STM32F4 uses sectos instead of pages, where the minimum length sector
+# is 16KB (the first sector), therefore RIOTBOOT must be 16KB to cover a whole sector
+RIOTBOOT_LEN ?= 0x4000
+
+# "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"
+# CPU_IRQ_NUMOFF for stm32l4 boards is < 102+16 so (118*4 bytes = 472 bytes ~= 0x200)
+# RIOTBOOT_HDR_LEN can be set to 0x200
+RIOTBOOT_HDR_LEN ?= 0x200
+
+# Sectors don't have the same length, they go from 16KB to 128KB. The first 5 sectors adding
+# up to 128KB. Since flash can only be erase by sector, SLOT's can't overlap. The most

s/be erase/be erased/

> @@ -1,5 +1,24 @@
 export CPU_ARCH = cortex-m4f
 export CPU_FAM  = stm32f4
 
+# STM32F4 uses sectos instead of pages, where the minimum length sector
+# is 16KB (the first sector), therefore RIOTBOOT must be 16KB to cover a whole sector
+RIOTBOOT_LEN ?= 0x4000
+
+# "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"
+# CPU_IRQ_NUMOFF for stm32l4 boards is < 102+16 so (118*4 bytes = 472 bytes ~= 0x200)
+# RIOTBOOT_HDR_LEN can be set to 0x200
+RIOTBOOT_HDR_LEN ?= 0x200
+
+# Sectors don't have the same length, they go from 16KB to 128KB. The first 5 sectors adding
+# up to 128KB. Since flash can only be erase by sector, SLOT's can't overlap. The most

"slots can't overlap a sector" might be better ?

> @@ -1,5 +1,24 @@
 export CPU_ARCH = cortex-m4f
 export CPU_FAM  = stm32f4
 
+# STM32F4 uses sectos instead of pages, where the minimum length sector
+# is 16KB (the first sector), therefore RIOTBOOT must be 16KB to cover a whole sector
+RIOTBOOT_LEN ?= 0x4000
+
+# "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"
+# CPU_IRQ_NUMOFF for stm32l4 boards is < 102+16 so (118*4 bytes = 472 bytes ~= 0x200)
+# RIOTBOOT_HDR_LEN can be set to 0x200
+RIOTBOOT_HDR_LEN ?= 0x200
+
+# Sectors don't have the same length, they go from 16KB to 128KB. The first 5 sectors adding
+# up to 128KB. Since flash can only be erase by sector, SLOT's can't overlap. The most
+# efficient layout comes from removing $(RIOTBOOT_LEN) twice, once for the actual bootloader
+# at the start of the flash, and a second time and the middle of the flash, for even sized slots.

**in** the middle of the flash

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11682#pullrequestreview-251505139
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190619/4f1634c0/attachment.html>


More information about the notifications mailing list