In my project, I am planning to use LTE modem and an external flash memory with a file system. I have problems to run code for the non-secure build type. A similar problem occurs when trying to use the shell/fs example (developer.nordicsemi.com/.../README.html) on the nrf9160dk_nrf9160_ns target. Building for the secure nrf9160dk_nrf9160 target works well.
Here is my "prj.conf":
CONFIG_FLASH=y
CONFIG_LOG=y
#CONFIG_FS_LOG_LEVEL_DBG=y
CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_SHELL=y
CONFIG_SHELL_LOG_LEVEL_INF=y
CONFIG_FILE_SYSTEM=y
CONFIG_FILE_SYSTEM_SHELL=y
CONFIG_FILE_SYSTEM_LITTLEFS=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_SPI=y
CONFIG_SPI_NOR=y
CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
and here is my "app.overlay":
/delete-node/ &storage_partition;
&mx25r64 {
// spi-max-frequency = <1000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
storage_partition: partition@0 {
label = "storage";
reg = <0x00000000 0x00800000>;
};
};
};
For nrf9160dk_nrf9160 target there is usual shell:
uart:~$ *** Booting Zephyr OS build v3.0.99-ncs1 ***
uart:~$ fs mount littlefs /lfs
[00:00:24.930,999] <inf> littlefs: LittleFS version 2.4, disk version 2.0
[00:00:24.932,769] <inf> littlefs: FS at MX25R64:0x0 is 2048 0x1000-byte blocks with 512 cycle
[00:00:24.932,800] <inf> littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:00:24.935,363] <inf> littlefs: /lfs mounted
uart:~$ fs cd /lfs
uart:~$ fs ls
file.bin
uart:~$ fs read file.bin
File size: 9
00000000 11 22 33 44 55 BA DC 0F FE ."3DU....
uart:~$ fs statvfs /lfs
bsize 16, frsize 4096, blocks 2048, bfree 2046
uart:~$
But for nrf9160dk_nrf9160_ns target nothing happens. I can run with the debugger and see that everything stops somewhere here:
My question is: what additional settings are required for the example to work in non-secure mode?