[Article] QuickJS JavaScript Engine on a Real-Time Operating System (Ox64 + NuttX) - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: General (https://forum.pine64.org/forumdisplay.php?fid=1) +--- Forum: General (https://forum.pine64.org/forumdisplay.php?fid=74) +--- Thread: [Article] QuickJS JavaScript Engine on a Real-Time Operating System (Ox64 + NuttX) (/showthread.php?tid=19083) |
[Article] QuickJS JavaScript Engine on a Real-Time Operating System (Ox64 + NuttX) - lupyuen - 02-17-2024 QuickJS is a small JavaScript Engine that supports POSIX Functions. Can we run QuickJS on Apache NuttX RTOS? And Blink the LED in 4 lines of JavaScript? const ULEDIOC_SETALL = 0x1d03; const fd = os.open("/dev/userleds", os.O_WRONLY); os.ioctl(fd, ULEDIOC_SETALL, 1); os.ioctl(fd, ULEDIOC_SETALL, 0); In this article we… (1) Run QuickJS on NuttX with Ox64 BL808 RISC-V SBC (2) Blink the LED by adding the ioctl() function (3) Reconfigure the NuttX App Stack (because it’s too tiny) (4) Analyse the Memory Footprint of QuickJS (Code + Data + Heap Size) (5) Test QuickJS in the Web Browser with NuttX Emulator (and a Simulated LED) QuickJS is perfect for Iterative, Interactive Experiments on NuttX! Check out the article: https://lupyuen.codeberg.page/articles/quickjs.html Lup |