Today we're running NuttX Emulator inside a Web Browser. What if we could build and test NuttX Apps in the Web Browser? Learning NuttX becomes so cool!
Let's explore with TCC (Tiny C Compiler) for 64-bit RISC-V, compiled to WebAssembly with Zig Compiler... (1) Zig Compiler compiles TCC Compiler to WebAssembly (with one tiny fix) (2) But we hit some Missing POSIX Functions (3) So we built minimal File Input and Output (4) Hacked up a simple workaround for fprintf and friends (5) And TCC produces a RISC-V Binary that runs on NuttX Emulator, in the Web Browser! (6) Though it needs Low-Level NuttX System Calls. We might fix this by porting NuttX ROM FS to Zig and WebAssembly. Here's the article: https://lupyuen.codeberg.page/articles/tcc.html Lup