[Article] QuickJS JavaScript Engine on a Real-Time Operating System (Ox64 + NuttX)
#1
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


   
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Article] Coding Ox64 BL808 SBC the Drag-n-Drop Way lupyuen 3 472 04-02-2024, 07:38 AM
Last Post: Noahstorey
  [Article] Emulate Ox64 BL808 in the Web Browser: Experiments with TinyEMU lupyuen 3 461 02-17-2024, 06:53 PM
Last Post: tllim
  [Article] Automated Testing with Ox64 BL808 Emulator (Apache NuttX RTOS) lupyuen 0 263 02-16-2024, 06:54 PM
Last Post: lupyuen
  Has anyone successfully flashed an Ox64 (128Mb) from linux? slondr 3 1,833 02-12-2024, 12:50 AM
Last Post: Pavlos1
  [Article] Nim on a Real-Time Operating System: Apache NuttX RTOS + Ox64 BL808 SBC lupyuen 2 565 01-05-2024, 12:27 AM
Last Post: lupyuen
  [Article] $8 RISC-V SBC on a Real-Time Operating System: Ox64 + NuttX lupyuen 0 480 12-17-2023, 02:27 AM
Last Post: lupyuen
  [Article] Fixed the UART Interrupt and Platform-Level Interrupt Controller (Ox64) lupyuen 0 483 12-09-2023, 05:24 PM
Last Post: lupyuen
  [Article] RISC-V Ox64 BL808: UART Interrupt and Platform-Level Interrupt Controller lupyuen 1 555 12-03-2023, 04:24 AM
Last Post: WhiteHexagon
  [Article] RISC-V Ox64 BL808 SBC: NuttX Apps and Initial RAM Disk lupyuen 2 637 11-25-2023, 06:42 PM
Last Post: lupyuen
  [Article] RISC-V Ox64 BL808 SBC: Sv39 Memory Management Unit lupyuen 0 474 11-18-2023, 05:39 PM
Last Post: lupyuen

Forum Jump:


Users browsing this thread: 1 Guest(s)