zephyr: west build for zephyr/samples/net/sockets/echo_server/ on qemu_xtensa target outputs elf with panic
Describe the bug
I am trying to get zephyr network examples to run under qemu_xtensa target - west outputs the elfs, however when trying to run them on qemu with west build -t run they generate the following panic:
`-- west build: running target run
[0/1] To exit from QEMU enter: ‘CTRL+a, x’[QEMU] CPU: sample_controller
[00:00:00.010,000] <err> os: ** FATAL EXCEPTION
[00:00:00.010,000] <err> os: ** CPU 0 EXCCAUSE 28 (load prohibited)
[00:00:00.010,000] <err> os: ** PC 0x6000986c VADDR 0x00000004
[00:00:00.010,000] <err> os: ** PS 0x00060220
[00:00:00.010,000] <err> os: ** (INTLEVEL:0 EXCM: 0 UM:1 RING:0 WOE:1 OWB:2 CALLINC:2)
[00:00:00.010,000] <err> os: ** A0 0xa0019da3 SP 0x6001eff0 A2 0x0000001d A3 0x6000040c
[00:00:00.010,000] <err> os: ** A4 0x60027714 A5 0x00000400 A6 0x6001e820 A7 0x00000001
[00:00:00.010,000] <err> os: ** A8 0x600281b4 A9 0x6001efe0 A10 0x00000000 A11 0x00000000
[00:00:00.010,000] <err> os: ** A12 0x00060420 A13 0xffffffff A14 0x00000001 A15 0x00000000
[00:00:00.010,000] <err> os: ** SAR 0x00000000
[00:00:00.010,000] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception
[00:00:00.010,000] <err> os: Current thread: 0x60028bf8 (unknown)
[00:00:00.010,000] <err> os: Halting system `
To Reproduce Steps to reproduce the behavior:
- Have zephyr-sdk and esp-idf installed;
- build any network example with qemu_xtensa target
- attempt to run with qemu
- See panic
Expected behavior It would be expected that the qemu_xtensa elf would run exactly like the qemu_x86 one for these examples.
Impact This bug is a showstopper for my efforts.
Screenshots or console output

Environment (please complete the following information):
- OS: Linux (uname -a :
Linux std4rch 5.3.7-arch1-2-ARCH #1 SMP PREEMPT @1572002934 x86_64 GNU/Linux) - Toolchain: Zephyr v0.10.3; SDK, ESP-IDF v4.1-dev-592-g758db1e00-dirty
- Commit SHA: 5881f118c0a4dbef8b6534327a666e4fa156ce65
Additional context
Tested hello_world, synchronization and philosophers and they work fine;
My cmds:
(./tools/net-tools/loop-socat.sh &) && sudo ./tools/net-tools/loop-slip-tap.sh
ESP_IDF_PATH=/opt/esp-idf/ ESPRESSIF_TOOLCHAIN_PATH=/opt/zephyr-os/crosstool-NG/builds/xtensa-esp32-elf/xtensa-esp32-elf/ ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-os/zephyr-sdk/ ZEPHYR_TOOLCHAIN_VARIANT=zephyr west build -b qemu_xtensa zephyr/samples/net/sockets/echo_server/ -- -DCONF_FILE="prj.conf"
My prj.conf: prj.conf.txt CMake logs: CMakeOutput.log CMakeError.log
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (10 by maintainers)
Welp got an error related to the settings
CONFIG_NET_LOG=yandCONFIGT_LOG=y/opt/zephyr-os/zproj/zephyr/subsys/logging/log_backend_xtensa_sim.c:31:2: error: invalid hard register usage between output operands 31 | __asm__ __volatile__ ( | ^~~~~~~which probably is responsible for displaying qemu output to stdout - so still same panic. CMakeError.log
./go.sh xtensa_sample_controllerfor sdk-ng and manually downloaded isl from waybackmachine