I'm unable to get QEMU working on NCS. It's working fine on standard Zephyr.
NCS:
$ west build --pristine -b qemu_cortex_m3 samples/synchronization --no-sysbuild
-- west build: making build dir /home/tfo/ncs/v3.2.1/zephyr/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/tfo/ncs/v3.2.1/zephyr/samples/synchronization
-- CMake version: 3.21.0
-- Found Python3: /home/tfo/develco/tools-v1.1.0/.venv/bin/python3 (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/tfo/.cache/zephyr
-- Zephyr version: 4.2.99 (/home/tfo/ncs/v3.2.1/zephyr)
-- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
-- Board: qemu_cortex_m3, qualifiers: ti_lm3s6965
-- Found host-tools: zephyr 0.17.0 (/home/tfo/ncs/toolchains/43683a87ea/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.17.0 (/home/tfo/ncs/toolchains/43683a87ea/opt/zephyr-sdk)
-- Found Dtc: /home/tfo/ncs/toolchains/43683a87ea/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/tfo/ncs/v3.2.1/zephyr/boards/qemu/cortex_m3/qemu_cortex_m3.dts
-- Generated zephyr.dts: /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/zephyr.dts
-- Generated pickled edt: /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/edt.pickle
-- Generated devicetree_generated.h: /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/include/generated/zephyr/devicetree_generated.h
warning: SCHED_CPU_MASK (defined at soc/espressif/esp32/Kconfig.defconfig:23, kernel/Kconfig:122)
was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies: ((SMP &&
SOC_SERIES_ESP32 && SOC_FAMILY_ESPRESSIF_ESP32) || SCHED_SIMPLE) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SCHED_CPU_MASK and/or look up
SCHED_CPU_MASK in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.
Parsing /home/tfo/ncs/v3.2.1/zephyr/Kconfig
Loaded configuration '/home/tfo/ncs/v3.2.1/zephyr/boards/qemu/cortex_m3/qemu_cortex_m3_defconfig'
Merged configuration '/home/tfo/ncs/v3.2.1/zephyr/samples/synchronization/prj.conf'
Configuration saved to '/home/tfo/ncs/v3.2.1/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/tfo/ncs/v3.2.1/zephyr/build/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/tfo/ncs/toolchains/43683a87ea/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/tfo/ncs/toolchains/43683a87ea/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Using ccache: /home/tfo/ncs/toolchains/43683a87ea/usr/bin/ccache
-- Found gen_kobject_list: /home/tfo/ncs/v3.2.1/zephyr/scripts/build/gen_kobject_list.py
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tfo/ncs/v3.2.1/zephyr/build
-- west build: building application
[1/125] Preparing syscall dependency handling
[5/125] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.2.99 (/home/tfo/ncs/v3.2.1/zephyr), build: ncs-v3.2.1
[125/125] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 11240 B 256 KB 4.29%
RAM: 6568 B 64 KB 10.02%
IDT_LIST: 0 GB 32 KB 0.00%
Generating files from /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/zephyr.elf for board: qemu_cortex_m3
$ west build -t run
-- west build: running target run
[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: cortex-m3
/bin/sh: 1: QEMU-NOTFOUND: not found
FAILED: zephyr/CMakeFiles/run_qemu /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/CMakeFiles/run_qemu
cd /home/tfo/ncs/v3.2.1/zephyr/build && QEMU-NOTFOUND -cpu cortex-m3 -machine lm3s6965evb -nographic -vga none -net none -pidfile qemu.pid -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -icount shift=6,align=off,sleep=off -rtc clock=vm -kernel /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/zephyr.elf
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/tfo/ncs/toolchains/43683a87ea/usr/local/bin/cmake --build /home/tfo/ncs/v3.2.1/zephyr/build --target run
Zephyr v.4.1.0:
$ west build --pristine -b qemu_cortex_m3 samples/synchronization
-- west build: making build dir /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/samples/synchronization
-- CMake version: 3.28.3
-- Found Python3: /home/tfo/develco/tools-v1.1.0/.venv/bin/python3 (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/tfo/.cache/zephyr
-- Zephyr version: 4.1.0 (/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr)
-- Found west (found suitable version "1.3.0", minimum required is "0.14.0")
-- Board: qemu_cortex_m3, qualifiers: ti_lm3s6965
-- Found host-tools: zephyr 0.17.0 (/home/tfo/develco/zephyr/zephyr-sdk-0.17.0)
-- Found toolchain: zephyr 0.17.0 (/home/tfo/develco/zephyr/zephyr-sdk-0.17.0)
-- Found Dtc: /home/tfo/develco/zephyr/zephyr-sdk-0.17.0/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/boards/qemu/cortex_m3/qemu_cortex_m3.dts
-- Generated zephyr.dts: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/zephyr.dts
-- Generated pickled edt: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/edt.pickle
-- Generated devicetree_generated.h: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/dts.cmake
warning: SCHED_CPU_MASK (defined at soc/espressif/esp32/Kconfig.defconfig:23, kernel/Kconfig:122)
was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies: ((SMP &&
SOC_SERIES_ESP32 && SOC_FAMILY_ESPRESSIF_ESP32) || SCHED_DUMB) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SCHED_CPU_MASK and/or look up
SCHED_CPU_MASK in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.
Parsing /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/Kconfig
Loaded configuration '/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/boards/qemu/cortex_m3/qemu_cortex_m3_defconfig'
Merged configuration '/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/samples/synchronization/prj.conf'
Configuration saved to '/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/tfo/develco/zephyr/zephyr-sdk-0.17.0/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/tfo/develco/zephyr/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Using ccache: /usr/bin/ccache
-- Configuring done (9.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build
-- west build: building application
[1/117] Preparing syscall dependency handling
[3/117] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.1.0 (/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr), build: v4.1.0
[117/117] Linking C executable zephyr/zephyr.elf
Memory region Used Size Region Size %age Used
FLASH: 9508 B 256 KB 3.63%
RAM: 6560 B 64 KB 10.01%
IDT_LIST: 0 GB 32 KB 0.00%
Generating files from /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/zephyr.elf for board: qemu_cortex_m3
$ west build -t run
-- west build: running target run
[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: cortex-m3
qemu-system-arm: warning: nic stellaris_enet.0 has no peer
Timer with period zero, disabling
*** Booting Zephyr OS build v4.1.0 ***
thread_a: Hello World from cpu 0 on qemu_cortex_m3!
thread_b: Hello World from cpu 0 on qemu_cortex_m3!
thread_a: Hello World from cpu 0 on qemu_cortex_m3!
thread_b: Hello World from cpu 0 on qemu_cortex_m3!
thread_a: Hello World from cpu 0 on qemu_cortex_m3!
What am I missing?