Created static partitions

This commit is contained in:
Miguel I. 2025-09-07 14:56:46 +02:00
parent 34ddaadcfc
commit 382bbbd422
4 changed files with 57 additions and 2 deletions

View File

@ -26,6 +26,4 @@ target_include_directories(app PRIVATE
drivers/timer_count drivers/timer_count
) )
test_sysbuild()
target_sources(app PRIVATE src/main.c) target_sources(app PRIVATE src/main.c)

View File

@ -30,6 +30,7 @@ int battery_adc_init(void) {
if(ret){ if(ret){
return ret; return ret;
} }
return 0;
} }
int battery_measure_mv(int32_t *mv_out) { int battery_measure_mv(int32_t *mv_out) {

54
pm_static.yml Normal file
View File

@ -0,0 +1,54 @@
mcuboot:
address: 0x0
end_address: 0x10000
region: flash_primary
size: 0x10000
mcuboot_pad:
address: 0x10000
end_address: 0x10200
placement:
before: mcuboot_primary_app
region: flash_primary
size: 0x200
mcuboot_primary:
address: 0x10000
end_address: 0x36000
region: flash_primary
size: 0x26000
mcuboot_primary_app:
address: 0x10200
end_address: 0x36000
region: flash_primary
size: 0x25e00
mcuboot_secondary:
address: 0x36000
end_address: 0x7c000
span: [mcuboot_secondary_pad, mcuboot_secondary_app]
region: flash_primary
size: 0x26000
mcuboot_secondary_app:
address: 0x36200
end_address: 0x7c000
placement:
after: [mcuboot_secondary_pad]
region: flash_primary
size: 0x25e00
mcuboot_secondary_pad:
address: 0x36000
end_address: 0x36200
placement:
after: [mcuboot_primary]
region: flash_primary
size: 0x200
storage:
address: 0x7c000
end_address: 0x80000
region: flash_primary
size: 0x4000

View File

@ -7,6 +7,8 @@ CONFIG_MCUBOOT_DOWNGRADE_PREVENTION=y
# STEP 3.1 - Increase flash space for MCUboot child image, to fit USB drivers # STEP 3.1 - Increase flash space for MCUboot child image, to fit USB drivers
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000 CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000
CONFIG_MCUBOOT_GENERATE_UNSIGNED_IMAGE=y
CONFIG_MCUBOOT_SERIAL=y CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_CDC_ACM=y CONFIG_BOOT_SERIAL_CDC_ACM=y
CONFIG_MCUBOOT_INDICATION_LED=y CONFIG_MCUBOOT_INDICATION_LED=y