Skip to content

Commit

Permalink
fprotect: fix minimal fprotect area
Browse files Browse the repository at this point in the history
on nrf53 the minimal size of fprotect is bigger than size of mfg_storage

Signed-off-by: Robert Gałat <[email protected]>
  • Loading branch information
RobertGalatNordic committed Aug 22, 2024
1 parent 5951064 commit 4db7728
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 55 deletions.
9 changes: 9 additions & 0 deletions samples/sid_end_device/pm_static_nrf52840dk_nrf52840.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ mcuboot_secondary:
share_size:
- mcuboot_primary
size: 0xf6000
mfg_fprotect:
address: 0xff000
align:
start: CONFIG_FPROTECT_BLOCK_SIZE
end_address: 0x100000
region: flash_primary
size: 0x1000
span:
- mfg_storage
mfg_storage:
address: 0xff000
end_address: 0x100000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ mcuboot_secondary:
share_size:
- mcuboot_primary
size: 0xf6000
mfg_fprotect:
address: 0xff000
align:
start: CONFIG_FPROTECT_BLOCK_SIZE
end_address: 0x100000
region: flash_primary
size: 0x1000
span:
- mfg_storage
mfg_storage:
address: 0xff000
end_address: 0x100000
Expand Down
53 changes: 36 additions & 17 deletions samples/sid_end_device/pm_static_nrf5340dk_nrf5340_cpuapp.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
EMPTY_0:
address: 0xfe000
end_address: 0xff000
address: 0xfa000
end_address: 0xfc000
placement:
after:
- settings_storage
region: flash_primary
size: 0x1000
size: 0x2000
app:
address: 0x8200
end_address: 0xfc000
end_address: 0xf8000
region: flash_primary
size: 0xf3e00
size: 0xefe00
external_flash:
address: 0x134000
address: 0x130000
end_address: 0x800000
region: external_flash
size: 0x6cc000
size: 0x6d0000
mcuboot:
address: 0x0
end_address: 0x8000
Expand All @@ -33,12 +33,12 @@ mcuboot_pad:
size: 0x200
mcuboot_primary:
address: 0x8000
end_address: 0xfc000
end_address: 0xf8000
orig_span: &id001
- mcuboot_pad
- app
region: flash_primary
size: 0xf4000
size: 0xf0000
span: *id001
mcuboot_primary_1:
address: 0x0
Expand All @@ -48,34 +48,53 @@ mcuboot_primary_1:
size: 0x40000
mcuboot_primary_app:
address: 0x8200
end_address: 0xfc000
end_address: 0xf8000
orig_span: &id002
- app
region: flash_primary
size: 0xf3e00
size: 0xefe00
span: *id002
mcuboot_secondary:
address: 0x0
device: DT_CHOSEN(nordic_pm_ext_flash)
end_address: 0xf4000
end_address: 0xf0000
placement:
align:
start: 0x4
region: external_flash
share_size:
- mcuboot_primary
size: 0xf4000
size: 0xf0000
mcuboot_secondary_1:
address: 0xf4000
address: 0xf0000
device: DT_CHOSEN(nordic_pm_ext_flash)
end_address: 0x134000
end_address: 0x130000
region: external_flash
size: 0x40000
mfg_fprotect:
address: 0xfc000
align:
start: CONFIG_FPROTECT_BLOCK_SIZE
end_address: 0x100000
region: flash_primary
size: 0x4000
span:
- mfg_storage_pad
- mfg_storage
mfg_storage:
address: 0xff000
end_address: 0x100000
region: flash_primary
size: 0x1000
mfg_storage_pad:
address: 0xfc000
end_address: 0xff000
placement:
align:
start: CONFIG_FPROTECT_BLOCK_SIZE
before: mfg_storage
region: flash_primary
size: 0x3000
otp:
address: 0xff8100
end_address: 0xff83fc
Expand Down Expand Up @@ -103,8 +122,8 @@ rpmsg_nrf53_sram:
region: sram_primary
size: 0x10000
settings_storage:
address: 0xfc000
end_address: 0xfe000
address: 0xf8000
end_address: 0xfa000
placement:
align:
start: 0x4000
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
EMPTY_0:
address: 0xfe000
end_address: 0xff000
address: 0xfa000
end_address: 0xfc000
placement:
after:
- settings_storage
region: flash_primary
size: 0x1000
size: 0x2000
app:
address: 0x8200
end_address: 0xfc000
end_address: 0xf8000
region: flash_primary
size: 0xf3e00
size: 0xefe00
external_flash:
address: 0x134000
address: 0x130000
end_address: 0x800000
region: external_flash
size: 0x6cc000
size: 0x6d0000
mcuboot:
address: 0x0
end_address: 0x8000
Expand All @@ -33,12 +33,12 @@ mcuboot_pad:
size: 0x200
mcuboot_primary:
address: 0x8000
end_address: 0xfc000
end_address: 0xf8000
orig_span: &id001
- mcuboot_pad
- app
region: flash_primary
size: 0xf4000
size: 0xf0000
span: *id001
mcuboot_primary_1:
address: 0x0
Expand All @@ -48,34 +48,53 @@ mcuboot_primary_1:
size: 0x40000
mcuboot_primary_app:
address: 0x8200
end_address: 0xfc000
end_address: 0xf8000
orig_span: &id002
- app
region: flash_primary
size: 0xf3e00
size: 0xefe00
span: *id002
mcuboot_secondary:
address: 0x0
device: DT_CHOSEN(nordic_pm_ext_flash)
end_address: 0xf4000
end_address: 0xf0000
placement:
align:
start: 0x4
region: external_flash
share_size:
- mcuboot_primary
size: 0xf4000
size: 0xf0000
mcuboot_secondary_1:
address: 0xf4000
address: 0xf0000
device: DT_CHOSEN(nordic_pm_ext_flash)
end_address: 0x134000
end_address: 0x130000
region: external_flash
size: 0x40000
mfg_fprotect:
address: 0xfc000
align:
start: CONFIG_FPROTECT_BLOCK_SIZE
end_address: 0x100000
region: flash_primary
size: 0x4000
span:
- mfg_storage_pad
- mfg_storage
mfg_storage:
address: 0xff000
end_address: 0x100000
region: flash_primary
size: 0x1000
mfg_storage_pad:
address: 0xfc000
end_address: 0xff000
placement:
align:
start: CONFIG_FPROTECT_BLOCK_SIZE
before: mfg_storage
region: flash_primary
size: 0x3000
otp:
address: 0xff8100
end_address: 0xff83fc
Expand Down Expand Up @@ -103,8 +122,8 @@ rpmsg_nrf53_sram:
region: sram_primary
size: 0x10000
settings_storage:
address: 0xfc000
end_address: 0xfe000
address: 0xf8000
end_address: 0xfa000
placement:
align:
start: 0x4000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ mcuboot_secondary:
share_size:
- mcuboot_primary
size: 0xb7000
mfg_fprotect:
address: 0x17c000
align:
start: CONFIG_FPROTECT_BLOCK_SIZE
end_address: 0x17d000
region: flash_primary
size: 0x1000
span:
- mfg_storage
mfg_storage:
address: 0x17c000
end_address: 0x17d000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ mcuboot_secondary:
share_size:
- mcuboot_primary
size: 0xb7000
mfg_fprotect:
address: 0x17c000
align:
start: CONFIG_FPROTECT_BLOCK_SIZE
end_address: 0x17d000
region: flash_primary
size: 0x1000
span:
- mfg_storage
mfg_storage:
address: 0x17c000
end_address: 0x17d000
Expand Down
Loading

0 comments on commit 4db7728

Please sign in to comment.