Hi,
I try to build up a project with Settings, LittleFS, and TFM PSA enabled, the partions looks like below.
flash_primary (0x100000 - 1024kB): +--------------------------------------------------+ +---0x0: b0_container (0x8000 - 32kB)--------------+ | 0x0: b0 (0x8000 - 32kB) | +---0x8000: s0 (0xc200 - 48kB)---------------------+ | 0x8000: s0_pad (0x200 - 512B) | +---0x8200: s0_image (0xc000 - 48kB)---------------+ | 0x8200: mcuboot (0xc000 - 48kB) | +--------------------------------------------------+ | 0x14200: EMPTY_0 (0x3e00 - 15kB) | +---0x18000: s1 (0xc200 - 48kB)--------------------+ | 0x18000: s1_pad (0x200 - 512B) | | 0x18200: s1_image (0xc000 - 48kB) | +--------------------------------------------------+ | 0x24200: EMPTY_1 (0x3e00 - 15kB) | +---0x28000: mcuboot_primary (0xb0000 - 704kB)-----+ +---0x28000: tfm_secure (0x40000 - 256kB)----------+ | 0x28000: mcuboot_pad (0x200 - 512B) | +---0x28200: app_image (0xafe00 - 703kB)-----------+ +---0x28200: mcuboot_primary_app (0xafe00 - 703kB)-+ | 0x28200: tfm (0x3fe00 - 255kB) | +---0x68000: tfm_nonsecure (0x70000 - 448kB)-------+ | 0x68000: app (0x70000 - 448kB) | +---0xd8000: nonsecure_storage (0xa000 - 40kB)-----+ | 0xd8000: littlefs_storage (0x6000 - 24kB) | | 0xde000: EMPTY_6 (0x2000 - 8kB) | | 0xe0000: settings_storage (0x2000 - 8kB) | +--------------------------------------------------+ | 0xe2000: EMPTY_5 (0x6000 - 24kB) | +---0xe8000: tfm_storage (0x14000 - 80kB)----------+ | 0xe8000: tfm_its (0x2000 - 8kB) | | 0xea000: EMPTY_4 (0x6000 - 24kB) | | 0xf0000: tfm_otp_nv_counters (0x2000 - 8kB) | | 0xf2000: EMPTY_3 (0x6000 - 24kB) | | 0xf8000: tfm_ps (0x4000 - 16kB) | +--------------------------------------------------+ | 0xfc000: EMPTY_2 (0x4000 - 16kB) | +--------------------------------------------------+
There are a lot of EMPTY_ partitions inside the table.
And I realize that cause by almost all partions must align to SPU_FLASH_REGION_SIZE in partition management, and that is 32K for 9160.
That basic means every partion take 32KB flash size in the end (design size + EMPTY).
My question is if the alignment is necessary? What is the impact?
And any suggestion how can I remove those EMPTY partitons to enlarge the app partition size?