fdcavalcanti opened a new pull request, #15874: URL: https://github.com/apache/nuttx/pull/15874
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary This PR creates a separate defconfig for running WebAssembly in QEMU for the ESP32S3. The extra granularity speeds up the build for most use cases where WebAssembly is not needed. Also adds `CONFIG_ESP32S3_QEMU_IMAGE=y` to qemu_debug, otherwise QEMU will not be able to run. ## Impact Impact on user: New defconfig for using WebAssembly with QEMU. Impact on build: Speeds up `esp32s3:qemu_debug`. If user requires QEMU with WebAssembly out-of-the-box should now use `esp32s3:qemu_toywasm`. Impact on hardware: No. Impact on documentation: No. Impact on security: No. Impact on compatibility: No. ## Testing ### Building Build each of the defconfigs normally. - `./tools/configure.sh esp32s3-devkit:qemu_debug` or `./tools/configure.sh esp32s3-devkit:qemu_toywasm` - make ### Running Test each with QEMU using the following command: - `qemu-system-xtensa -nographic -machine esp32s3 -drive file=nuttx.merged.bin,if=mtd,format=raw` ### Results - **qemu_debug:** ``` $ qemu-system-xtensa -nographic -machine esp32s3 -drive file=nuttx.merged.bin,if=mtd,format=raw Adding SPI flash device ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x1 (POWERON),boot:0x4 (SPI_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:2 load:0x3fc95890,len:0x99c load:0x40374000,len:0x5c68 SHA-256 comparison failed: Calculated: efd78defa836593f218dd24d5177e42076679ad199102350dba2707efd3c463c Expected: 00000000c0990000000000000000000000000000000000000000000000000000 Attempting to boot anyway... entry 0x40374e70 *** Booting NuttX *** dram: lma 0x00000020 vma 0x3fc95890 len 0x99c (2460) iram: lma 0x000009c4 vma 0x40374000 len 0x5c68 (23656) padd: lma 0x00006638 vma 0x00000000 len 0x99c0 (39360) imap: lma 0x00010000 vma 0x42030000 len 0x30730 (198448) padd: lma 0x00040738 vma 0x00000000 len 0xf8c0 (63680) dmap: lma 0x00050000 vma 0x3c010000 len 0x4d98 (19864) total segments stored 6 NuttShell (NSH) NuttX-10.4.0 nsh> ps PID GROUP CPU PRI POLICY TYPE NPX STATE EVENT SIGMASK STACK COMMAND 0 0 0 0 FIFO Kthread - Assigned 0000000000000000 0003056 CPU0 IDLE 1 0 1 0 FIFO Kthread - Running 0000000000000000 0003056 CPU1 IDLE 2 0 --- 100 RR Kthread - Waiting Semaphore 0000000000000000 0004024 lpwork 0x3fc95890 0x3fc958c0 3 3 0 100 RR Task - Running 0000000000000000 0008144 nsh_main 4 0 --- 255 RR Kthread - Waiting Semaphore 0000000000000000 0000696 spiflash_op 0x3fc9a59c 5 0 --- 255 RR Kthread - Waiting Semaphore 0000000000000000 0000696 spiflash_op 0x3fc9a59c 6 0 --- 223 RR Kthread - Waiting Semaphore 0000000000000000 0004048 rt_timer ``` - **qemu_toywasm:** ``` $ qemu-system-xtensa -nographic -machine esp32s3 -drive file=nuttx.merged.bin,if=mtd,format=raw Adding SPI flash device ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x1 (POWERON),boot:0x4 (SPI_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:2 load:0x3fc958a0,len:0x9cc load:0x40374000,len:0x5c68 SHA-256 comparison failed: Calculated: e7b3e69fa907cecd43f0c07b7610e833510eb5602493dfe3b714ec0df88cade9 Expected: 0000000090990000000000000000000000000000000000000000000000000000 Attempting to boot anyway... entry 0x40374e70 *** Booting NuttX *** dram: lma 0x00000020 vma 0x3fc958a0 len 0x9cc (2508) iram: lma 0x000009f4 vma 0x40374000 len 0x5c68 (23656) padd: lma 0x00006668 vma 0x00000000 len 0x9990 (39312) imap: lma 0x00010000 vma 0x42030000 len 0x59a78 (367224) padd: lma 0x00069a80 vma 0x00000000 len 0x6578 (25976) dmap: lma 0x00070000 vma 0x3c010000 len 0xdd80 (56704) total segments stored 6 NuttShell (NSH) NuttX-10.4.0 nsh> toywasm Usage: toywasm [OPTIONS] [--] <MODULE> [WASI-ARGS...] Options: --allow-unresolved-functions [...] ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org