onomondo / nrf-softsim

Manifest repo for integrating SoftSIM and nrf-sdk
27 stars 6 forks source link

Unable to build Nordic Asset Tracker v2 with SoftSIM on Thingy:91 - Failed to partition region sram_primary #52

Open jameslshannon opened 1 month ago

jameslshannon commented 1 month ago

Hi,

Having successfully tested SoftSIM provisioning and connectivity with your static profile sample (using the updated partition config for Thingy:91 from PR #50), I'm now testing SoftSIM integration with the Nordic Asset Tracker v2 sample app (using the same partition config) and getting a similar issue with flash size (see build log below).

Does this require another updated partition config in order to use SoftSIM with a real-world app or is there a fixed size limitation for apps using SoftSIM?

Thanks,

James

--

-- Found partition manager static configuration: C:/ncs/v2.6.1/modules/lib/onomondo-softsim/thingy91_pm_static.yml
Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_sram' is not included in the dynamic resolving since it is statically defined.
Partition 'nonsecure_storage' is not included in the dynamic resolving since it is statically defined.
Partition 'nrf_modem_lib_ctrl' is not included in the dynamic resolving since it is statically defined.
Partition 'nrf_modem_lib_rx' is not included in the dynamic resolving since it is statically defined.
Partition 'nrf_modem_lib_sram' is not included in the dynamic resolving since it is statically defined.
Partition 'nrf_modem_lib_tx' is not included in the dynamic resolving since it is statically defined.
Partition 'nvs_storage' is not included in the dynamic resolving since it is statically defined.
Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.
Partition 'sram_nonsecure' is not included in the dynamic resolving since it is statically defined.
Partition 'sram_secure' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_its' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_nonsecure' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_otp_nv_counters' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_secure' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_sram' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_storage' is not included in the dynamic resolving since it is statically defined.
Partition manager failed: End of last partition is after last valid address
Failed to partition region sram_primary, size of region: 262144
Partition Configuration:
mcuboot_sram:
size: 90112
nrf_modem_lib_ctrl:
placement:
after:
- tfm_sram
- start
size: 1256
nrf_modem_lib_rx:
placement:
after:
- nrf_modem_lib_tx
size: 8192
nrf_modem_lib_sram:
size: 17768
nrf_modem_lib_trace:
placement: {}
size: 16384
nrf_modem_lib_tx:
placement:
after:
- nrf_modem_lib_ctrl
size: 8320
sram_nonsecure:
size: 172032
sram_primary:
size: 154264
sram_secure:
size: 90112
tfm_sram:
placement:
after:
- start
size: 90112

CMake Error at C:/ncs/v2.6.1/nrf/cmake/partition_manager.cmake:331 (message):
Partition Manager failed, aborting.
jameslshannon commented 1 month ago

I also tried disabling FOTA/DFU (which didn't seem to make a difference to the sram_primary size of 262144 logged above) so I also then disabled CONFIG_AT_HOST_LIBRARY and CONFIG_NRF_MODEM_LIB_TRACE which allowed the build to progress beyond above partitioning stage but it now fails at another tfm/flash related issue:

-- Found partition manager static configuration: C:/ncs/v2.6.1/modules/lib/onomondo-softsim/thingy91_pm_static.yml
Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
Partition 'mcuboot_sram' is not included in the dynamic resolving since it is statically defined.
Partition 'nonsecure_storage' is not included in the dynamic resolving since it is statically defined.
Partition 'nrf_modem_lib_ctrl' is not included in the dynamic resolving since it is statically defined.
Partition 'nrf_modem_lib_rx' is not included in the dynamic resolving since it is statically defined.
Partition 'nrf_modem_lib_sram' is not included in the dynamic resolving since it is statically defined.
Partition 'nrf_modem_lib_tx' is not included in the dynamic resolving since it is statically defined.
Partition 'nvs_storage' is not included in the dynamic resolving since it is statically defined.
Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.
Partition 'sram_nonsecure' is not included in the dynamic resolving since it is statically defined.
Partition 'sram_secure' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_its' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_nonsecure' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_otp_nv_counters' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_secure' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_sram' is not included in the dynamic resolving since it is statically defined.
Partition 'tfm_storage' is not included in the dynamic resolving since it is statically defined.
Dropping partition 'nrf_modem_lib_trace' since its size is 0.

<SNIP>

[24/485] Performing install step for 'tfm'
-- Install configuration: "MinSizeRel"
----- Installing platform NS -----
[433/485] Building C object modules/softsim/lib/CMakeFiles/..__modules__lib__onomondo-softsim__lib.dir/nrf_softsim.c.obj
C:/ncs/v2.6.1/modules/lib/onomondo-softsim/lib/nrf_softsim.c: In function 'onomondo_init':
C:/ncs/v2.6.1/modules/lib/onomondo-softsim/lib/nrf_softsim.c:69:9: note: '#pragma message: Using static profile. Only for development!'
69 | #pragma message "Using static profile. Only for development!"
| ^~~~~~~
[471/485] Linking C executable zephyr\zephyr_pre0.elf
FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map C:/ncs/v2.6.1/nrf/applications/asset_tracker_v2/build_1/zephyr/zephyr_pre0.map
cmd.exe /C "cd . && C:\ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf && cmd.exe /C "cd /D C:\ncs\v2.6.1\nrf\applications\asset_tracker_v2\build_1\zephyr && C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.exe -E true""
lto-wrapper.exe: warning: using serial compilation of 2 LTRANS jobs
lto-wrapper.exe: note: see the '-flto' option documentation for more information
c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `text' will not fit in region `FLASH'
c:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 66740 bytes

Thanks,

James