"Partition alignment error" after upgrading the SDK from v2.2.0 to v2.5.0

Hi,

We are working with nRF5340, the project was working fine until we updated the SDK toolchain from v2.2.0 to v2.5.0

No changes are made in the code, and yet we see below error.

!!!Partition alignment error!!!
The non-secure start address in pm_static.yml or generated partition.yml is: 0x6c200
which is not aligned with the SPU region size.
Refer to the documentation section 'TF-M partition alignment requirements'
for more information.

   '
   16 | #pragma message "\n\n!!!Partition alignment error!!!"\
      |         ^~~~~~~
D:/work/nrf/sdk/v2.5.0/v2.5.0/nrf/modules/tfm/tfm/boards/common/assert.c:22:2: error: #error "TF-M non-secure start address is not aligned on SPU region size"
   22 | #error "TF-M non-secure start address is not aligned on SPU region size"
      |  ^~~~~

The same setup works well in SDKv2.2.0.

From the above error we see it is not aligned to SPU region size. I did not get any reference to region size to modify our partition.

Please help us with any reference or fix to the above error.

Parents Reply
  • Hi Sigurd,

    No, we are not using any static partitioning.

    One thing to mention, for some reason we are resizing the TF-M partition using prj.conf

    CONFIG_PM_PARTITION_SIZE_TFM=0x44000

    After some R&D in our prj file we found that due to this macro we are getting error.

    • If we disable this macro, we get memory overflow error, and this is a known issue.
    • To narrow our observation, we also removed some high memory usage files and the code build successfully.
    • So, to point to the issue, if we try to re-size any partition, we are getting "Partition alignment error".

    Our TF-M application should get a min of 0x44000 size to work. (MCUBoot enabled)

    Any suggestions to avoid the error.

Children
Related