Hello everyone,
I get the following error whenever I try to build an application for the thingy91_nrf9160ns board:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
1> [198/206] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sched.c.obj
1> [199/206] Building C object zephyr/kernel/CMakeFiles/kernel.dir/banner.c.obj
1> [200/206] Linking C static library zephyr\kernel\libkernel.a
1> [201/206] Linking C executable zephyr\zephyr_prebuilt.elf
1> FAILED: zephyr/zephyr_prebuilt.elf
1> cmd.exe /C "cd . && C:\MA\nRF\v1.5.0\toolchain\opt\bin\arm-none-eabi-gcc.exe zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj -o zephyr\zephyr_prebuilt.elf -Wl,-T zephyr/linker.cmd -Wl,-Map=C:/MA/nRF/v1.5.0/zephyr/samples/basic/blinky/build_thingy91_nrf9160ns/spm/zephyr/zephyr_prebuilt.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a zephyr/arch/arch/arm/core/aarch32/cortex_m/mpu/libarch__arm__core__aarch32__cortex_m__mpu.a zephyr/arch/arch/arm/core/aarch32/cortex_m/cmse/libarch__arm__core__aarch32__cortex_m__cmse.a zephyr/arch/arch/arm/core/aarch32/cortex_m/tz/libarch__arm__core__aarch32__cortex_m__tz.a zephyr/lib/libc/minimal/liblib__libc__minimal.a zephyr/lib/posix/liblib__posix.a zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a zephyr/boards/boards/arm/thingy91_nrf9160/lib..__nrf__boards__arm__thingy91_nrf9160.a zephyr/drivers/i2c/libdrivers__i2c.a zephyr/drivers/serial/libdrivers__serial.a modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a modules/nrf/subsys/fw_info/lib..__nrf__subsys__fw_info.a modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a modules/nrfxlib/nrf_security/src/mbedtls/libmbedtls_base_vanilla.a modules/hal_nordic/libmodules__hal_nordic.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -L"c:/ma/nrf/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/thumb/v8-m.main+fp/hard" -LC:/MA/nRF/v1.5.0/zephyr/samples/basic/blinky/build_thingy91_nrf9160ns/spm/zephyr -lgcc -Wl,--print-memory-usage zephyr/arch/common/libisr_tables.a modules/nrfxlib/nrf_security/src/mbedtls/shared/libmbedcrypto_shared.a modules/nrfxlib/nrf_security/src/mbedtls/cc310/libmbedcrypto_cc3xx.a C:/MA/nRF/v1.5.0/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m33/hard-float/no-interrupts/libnrf_cc310_platform_0.9.7.a -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -no-pie -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -Wl,--out-implib=C:/MA/nRF/v1.5.0/zephyr/samples/basic/blinky/build_thingy91_nrf9160ns/spm/libspmsecureentries.a -Wl,--cmse-implib && cd ."
1> Memory region Used Size Region Size %age Used
1> FLASH: 64 KB 48 KB 133.33%
1> SRAM: 8768 B 64 KB 13.38%
1> IDT_LIST: 88 B 2 KB 4.30c:/ma/nrf/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: zephyr\zephyr_prebuilt.elf section `.gnu.sgstubs' will not fit in region `FLASH'
1> c:/ma/nrf/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: SPM and app are sharing an SPU region. Cannot partition flash correctly into secure and non-secure. Adjust partitions sizes so they are placed in separate regions.
1> c:/ma/nrf/v1.5.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 16384 bytes
1> collect2.exe: error: ld returned 1 exit status
1> %
1> ninja: build stopped: subcommand failed.
Build failed
The secure version works just fine.
For some reason it says that I have only 48 KB of Flash and that I use 64 KB, which is a bit confusing because in the device tree files all the defined Flash regions are bigger.
I think it has something to do with the SPM, but I can't figure out what's wrong...
Here is the complete build output:
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-mkdir’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-mkdir’
Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-download’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-download’
Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-update’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-update’
Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-patch’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-patch’
Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-configure’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-configure’
Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-build’ from solution ‘build’ in configuration ‘Common’
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-build’
1> [1/206] Building C object modules/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedtls_external.dir/C_/MA/nRF/v1.5.0/zephyr/misc/empty_file.c.obj
1> [2/206] Building C object modules/nrfxlib/nrf_security/src/mbedtls/shared/CMakeFiles/mbedcrypto_shared.dir/C_/MA/nRF/v1.5.0/zephyr/misc/empty_file.c.obj
1> [3/206] Building C object modules/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx_noglue.dir/C_/MA/nRF/v1.5.0/zephyr/misc/empty_file.c.obj
1> [4/206] Linking C static library modules\nrfxlib\nrf_security\src\mbedtls\libmbedtls_external.a
1> [5/206] Linking C static library modules\nrfxlib\nrf_security\src\mbedtls\cc310\libmbedcrypto_cc3xx_noglue.a
1> [6/206] Building C object modules/nrfxlib/nrf_security/src/mbedtls/shared/CMakeFiles/mbedcrypto_shared.dir/C_/MA/nRF/v1.5.0/mbedtls/library/sha512.c.obj
1> [7/206] Linking C static library modules\nrfxlib\nrf_security\src\mbedtls\shared\libmbedcrypto_shared.a
1> [8/206] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
1> [9/206] Generating include/generated/driver-validation.h