Hi,
I have a nrf52833 with MCUBoot and BLE, I am using NCS v3.0.1.
I need also a custom NVS partition to store user data, so i create a data_partition for this purpose.
Now to the fun part, i am having trouble with the partition manager when i'm using FOTA. My project works fine but when i wanted to add FOTA, i got an flash error everytime i try an update. After digging a bit, i understand that is a write error in the smcuboot_secondary partition.
The mcuboot_secondary partition start at address 0x41800 and don't respect the 0x1000 page size of the nrf52833 which explain why i couldn't update (cf pm_static.yml.working)
app:
address: 0x7200
end_address: 0x41800
region: flash_primary
size: 0x3a600
data_storage:
address: 0x7c000
end_address: 0x7e000
placement:
align:
start: 0x1000
region: flash_primary
size: 0x2000
mcuboot:
address: 0x0
end_address: 0x7000
placement:
align:
end: 0x1000
before:
- mcuboot_primary
region: flash_primary
size: 0x7000
mcuboot_pad:
address: 0x7000
end_address: 0x7200
placement:
align:
start: 0x1000
before:
- mcuboot_primary_app
region: flash_primary
size: 0x200
mcuboot_primary:
address: 0x7000
end_address: 0x41800
orig_span: &id001
- app
- mcuboot_pad
region: flash_primary
sharers: 0x1
size: 0x3a800
span: *id001
mcuboot_primary_app:
address: 0x7200
end_address: 0x41800
orig_span: &id002
- app
region: flash_primary
size: 0x3a600
span: *id002
mcuboot_secondary:
address: 0x41800
end_address: 0x7c000
placement:
after:
- mcuboot_primary
align:
start: 0x1000
region: flash_primary
share_size:
- mcuboot_primary
size: 0x3a800
settings_storage:
address: 0x7e000
end_address: 0x80000
placement:
align:
start: 0x1000
before:
- end
region: flash_primary
size: 0x2000
sram_primary:
address: 0x20000000
end_address: 0x20020000
region: sram_primary
size: 0x20000
I edit the file to place it at 0x41000 and decrease the image size (cf pm_static.yml.not_working)
EMPTY_0:
address: 0x7b000
end_address: 0x7c000
region: flash_primary
size: 0x1000
app:
address: 0x7200
end_address: 0x41000
region: flash_primary
size: 0x39e00
data_storage:
address: 0x7c000
end_address: 0x7e000
region: flash_primary
size: 0x2000
mcuboot:
address: 0x0
end_address: 0x7000
region: flash_primary
size: 0x7000
mcuboot_pad:
address: 0x7000
end_address: 0x7200
region: flash_primary
size: 0x200
mcuboot_primary:
address: 0x7000
end_address: 0x41000
orig_span: &id001
- app
- mcuboot_pad
region: flash_primary
size: 0x3a000
span: *id001
mcuboot_primary_app:
address: 0x7200
end_address: 0x41000
orig_span: &id002
- app
region: flash_primary
size: 0x39e00
span: *id002
mcuboot_secondary:
address: 0x41000
end_address: 0x7b000
region: flash_primary
size: 0x3a000
settings_storage:
address: 0x7e000
end_address: 0x80000
region: flash_primary
size: 0x2000
sram_primary:
address: 0x20000000
end_address: 0x20020000
region: sram_primary
size: 0x20000
But it don't boot anymore, i can't get anything on RTT or serial or anything that make me believe the bootloader successfully start the image.
Do you know what is happening ?
Best regards,
Nathan