TFM ram configuration in pm_static.yml

Hello,

I am trying to define a pm_static.yml file which will use the 512K ram on the nrf7002dk_nrf5340 for the TFM ram section.

I cannot compile the non-secure nrf7002dk/nrf5340/cpuapp/ns but I can compile the nrf7002dk/nrf5340/cpuapp.

For the non-secure, it compiles that it cannot fit it into the RAM region.

I have included my sample project but looking for some help with the secure configuration.  I don't need to use the TFM.

It doesn't have to be a secure configuration, just trying to get something to compile and boot with the spi external flash configuration for DFU purposes.

smp_svr_new.zip

This is my sample project that has the custom configuration.
app:
  address: 0x18000
  end_address: 0x100000
  region: flash_primary
  size: 0xe8000

app2:
  address: 0x10200
  end_address: 0x100000
  region: external_flash
  size: 0xefe00

#external_flash:
#  address: 0x0
#  end_address: 0x800000
#  region: external_flash
#  size: 0x800000


mcuboot:
  address: 0x0
  end_address: 0x10000
  placement:
    align:
      end: 0x1000
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0x10000

mcuboot1:
  address: 0x0
  end_address: 0x10000
  placement:
    align:
      end: 0x1000
    before:
    - mcuboot_secondary
  region: external_flash
  size: 0x10000


mcuboot_pad:
  address: 0x10000
  end_address: 0x10200
  placement:
    align:
      start: 0x4000
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200

mcuboot_pad2:
  address: 0x10000
  end_address: 0x10200
  placement:
    align:
      start: 0x4000
    before:
    - mcuboot_secondary_app
  region: external_flash
  size: 0x200


mcuboot_primary:
  address: 0x10000
  end_address: 0x100000
  orig_span: &id001
  - app
  - mcuboot_pad
  region: flash_primary
  size: 0xf0000
  span: *id001

mcuboot_primary_app:
  address: 0x10200
  end_address: 0x100000
  orig_span: &id002
  - app
  region: flash_primary
  size: 0xefe00
  span: *id002


mcuboot_secondary:
  address: 0x10000
  device: DT_CHOSEN(nordic_pm_ext_flash)
  end_address: 0x100000
  orig_span: &id003
  - app2
  - mcuboot_pad2
  region: external_flash
  size: 0xf0000
  span: *id003

mcuboot_secondary_app:
  address: 0x10200
  end_address: 0x100000
  device: DT_CHOSEN(nordic_pm_ext_flash)
  orig_span: &id004
  - app2
  region: external_flash
  size: 0xefe00
  span: *id004

mcuboot_sram:
  address: 0x20000000
  end_address: 0x20008000
  orig_span: &id005
  - tfm_sram
  region: sram_primary
  size: 0x8000
  span: *id005
otp:
  address: 0xff8100
  end_address: 0xff83fc
  region: otp
  size: 0x2fc
rpmsg_nrf53_sram:
  address: 0x20070000
  end_address: 0x20080000
  placement:
    before:
    - end
  region: sram_primary
  size: 0x10000

sram_nonsecure:
  address: 0x20008000
  end_address: 0x20070000
  orig_span: &id006
  - sram_primary
  region: sram_primary
  size: 0x68000
  span: *id006
sram_primary:
  address: 0x20008000
  end_address: 0x20070000
  region: sram_primary
  size: 0x68000
sram_secure:
  address: 0x20000000
  end_address: 0x20008000
  orig_span: &id007
  - tfm_sram
  region: sram_primary
  size: 0x68000
  span: *id007
tfm:
  address: 0x10200
  end_address: 0x18000
  placement:
    before:
    - app
  region: flash_primary
  size: 0x7e00
tfm_nonsecure:
  address: 0x18000
  end_address: 0x100000
  orig_span: &id008
  - app
  region: flash_primary
  size: 0xe8000
  span: *id008
tfm_secure:
  address: 0x10200
  end_address: 0x18000
  orig_span: &id009
  - tfm
  region: flash_primary
  size: 0x7e00
  span: *id009
tfm_sram:
  address: 0x20000000
  end_address: 0x20008000
  inside:
  - sram_secure
  placement:
    after:
    - start
  region: sram_primary
  size: 0xe8000

 

When I compile the nrf7002dk/nrf5340/cpuapp and flash it to the custom board, it says 'Unable to find bootable image'.

Hopefully, you can see something off with the pm_static.yml configuration file.

Thanks,

Tom

Parents Reply Children
No Data
Related