Hi, Sir:
I am using nRF9160 for development, I would like to complete a COAP client,so I need to refer to ......./nrf/samples/nrf9160/coap_client. I installed NRF_Connect_SDK refer to the url: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_ins_linux.html
and I checked out the master branch to use the latest state of development.
I have a nRF9160 DK,and I use emStudio to develope.
According to user guide,I did the following :
(1) program the ....../nrf/samples/nrf9160/spm to nRF9160 DK,then, open Serial Port Tool.Reset the nRF9160 DK.I saw the following log:
[14:05:52:507] ***** Booting Zephyr OS v1.13.99-ncs1-5898-gf0f5dc49dff5 *****␍␊
[14:05:52:512] Flash region⇥ ⇥ Domain⇥ ⇥ Permissions␍␊
[14:05:52:519] 00 0x00000 0x02000 ⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:519] 01 0x02000 0x04000 ⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:521] 02 0x04000 0x06000 ⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:524] 03 0x06000 0x08000 ⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:528] 04 0x08000 0x0a000 ⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:530] 05 0x0a000 0x0c000 ⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:535] 06 0x0c000 0x0e000 ⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:536] 07 0x0e000 0x10000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:539] 08 0x10000 0x12000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:542] 09 0x12000 0x14000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:547] 10 0x14000 0x16000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:551] 11 0x16000 0x18000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:557] 12 0x18000 0x1a000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:557] 13 0x1a000 0x1c000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:562] 14 0x1c000 0x1e000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:562] 15 0x1e000 0x20000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:566] 16 0x20000 0x22000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:570] 17 0x22000 0x24000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:574] 18 0x24000 0x26000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:577] 19 0x26000 0x28000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:581] 20 0x28000 0x2a000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:581] 21 0x2a000 0x2c000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:585] 22 0x2c000 0x2e000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:589] 23 0x2e000 0x30000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:592] 24 0x30000 0x32000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:596] 25 0x32000 0x34000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:600] 26 0x34000 0x36000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:603] 27 0x36000 0x38000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:603] 28 0x38000 0x3a000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:607] 29 0x3a000 0x3c000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:611] 30 0x3c000 0x3e000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:615] 31 0x3e000 0x40000 ⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:618] ␍␊
[14:05:52:618] SRAM region⇥ ⇥ Domain⇥ ⇥ Permissions␍␊
[14:05:52:622] 00 0x00000 0x01000⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:622] 01 0x01000 0x02000⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:627] 02 0x02000 0x03000⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:630] 03 0x03000 0x04000⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:634] 04 0x04000 0x05000⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:638] 05 0x05000 0x06000⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:638] 06 0x06000 0x07000⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:643] 07 0x07000 0x08000⇥ Secure⇥ ⇥ rwxl␍␊
[14:05:52:643] 08 0x08000 0x09000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:647] 09 0x09000 0x0a000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:650] 10 0x0a000 0x0b000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:654] 11 0x0b000 0x0c000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:657] 12 0x0c000 0x0d000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:660] 13 0x0d000 0x0e000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:664] 14 0x0e000 0x0f000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:667] 15 0x0f000 0x10000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:671] 16 0x10000 0x11000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:671] 17 0x11000 0x12000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:674] 18 0x12000 0x13000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:678] 19 0x13000 0x14000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:681] 20 0x14000 0x15000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:684] 21 0x15000 0x16000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:687] 22 0x16000 0x17000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:691] 23 0x17000 0x18000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:694] 24 0x18000 0x19000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:697] 25 0x19000 0x1a000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:700] 26 0x1a000 0x1b000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:703] 27 0x1b000 0x1c000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:707] 28 0x1c000 0x1d000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:710] 29 0x1d000 0x1e000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:713] 30 0x1e000 0x1f000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:716] 31 0x1f000 0x20000⇥ Non-Secure⇥ rwxl␍␊
[14:05:52:719] ␍␊
[14:05:52:719] Peripheral⇥ ⇥ Domain⇥ ⇥ Status␍␊
[14:05:52:723] 00 NRF_P0⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:723] 01 NRF_CLOCK⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:726] 02 NRF_RTC1⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:730] 03 NRF_NVMC⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:733] 04 NRF_UARTE1⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:733] 05 NRF_UARTE2⇥ ⇥ Secure⇥ ⇥ SKIP␍␊
[14:05:52:736] 06 NRF_IPC⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:739] 07 NRF_VMC⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:742] 08 NRF_FPU⇥ ⇥ Non-Secure⇥ ERROR␍␊
[14:05:52:742] 09 NRF_EGU1⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:746] 10 NRF_EGU2⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:749] 11 NRF_TWIM2⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:752] 12 NRF_SPIM3⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:752] 13 NRF_TIMER0⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:756] 14 NRF_TIMER1⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:759] 15 NRF_TIMER2⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:762] 16 NRF_GPIOTE1⇥ ⇥ Non-Secure⇥ OK␍␊
[14:05:52:765] ␍␊
[14:05:52:765] SPM: MSP_NS 20014530␍␊
[14:05:52:765] SPM: prepare to jump to Non-Secure image
(2) program the ....../nrf/samples/nrf9160/coap_client to nRF9160 DK.Reset the nRF9160 DK.The log is:
[14:01:54:030] ***** Hardware exception *****␍␊
[14:01:54:033] Current thread ID = 0x2000035c␍␊
[14:01:54:036] Faulting instruction address = 0x6168␍␊
[14:01:54:040] Fatal fault in essential thread! Spinning...␍
I checked the ....../nrf/samples/nrf9160/coap_client programming information
Programming 15.4 KB of addresses 00000000 – 00003dbb
Programming 0.5 KB of addresses 00017eb8 – 000180d7
J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
Obviously this programming address overlaps with SPM.
I guess reasons for this fault is wrong FLASH_BASE_ADDRESS or FLASH_LOAD_OFFSET ,so
I tried to modify FLASH_BASE_ADDRESS or FLASH_LOAD_OFFSET to 0x40000, But still didn’t work, how to modify configure of the example to work well?
Best wishes