Hello
I'm testing the Release v1.6 of NRF Connect SDK in combination with our application. On Nordic NRF Connect SDK v1.5.1 we managed to get the following setup working:
- nRF9160-DK with Ethernet shield from Phytec attached to it.
- Civetweb (CONFIG_CIVETWEB=y) --> note that this only works with Minimal LIBC
Now when I update to Nordic NRF Connect v1.6.0 civetweb crashes when running the init function (mg_start). However this happens only with the board nrf9160dk_nrf9160ns and not with QEMU.
I get the following console output:
[00:00:01.906,188] <inf> net_config: Interface 1 (0x20019880) coming up
[00:00:01.914,367] : Running dhcpv4 client...
[00:00:01.972,351] <err> os: Exception occurred in Secure State
[00:00:01.994,232] <err> os: ***** HARD FAULT *****
[00:00:02.015,014] <err> os: Fault escalation (see below)
[00:00:02.036,529] <err> os: ***** BUS FAULT *****
[00:00:02.057,220] <err> os: Precise data bus error
[00:00:02.078,186] <err> os: BFAR Address: 0x50008158
[00:00:02.099,395] <err> os: r0/a1: 0x00000000 r1/a2: 0x00000000 r2/a3: 0xffffffff
[00:00:02.123,443] <err> os: r3/a4: 0x0000f3f8 r12/ip: 0xee6b2800 r14/lr: 0x0001a60b
[00:00:02.147,552] <err> os: xpsr: 0x61040000
[00:00:02.168,029] <err> os: Faulting instruction address (r15/pc): 0x0001a614
[00:00:02.191,284] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
[00:00:02.214,447] <err> os: Current thread: 0x2001a600 (main)
[00:00:02.256,256] <err> os: Halting system
I attached the debugger and figured out that the crash happens in the following function:

Could you help me to narrow down the issue? How can I use the exception information to figure out more about the issue?
I already tried to increase the stack size of civetweb which didn't help. I also tried to increase the stack size of the thread that calls mg_start. Unfortunately my experience is that the maintainer of civetweb is not very active in the Zephyr Community. Therefore I will not have much luck posting the issue on Zephyr GitHub.
Best regards,
Michael



