@@ -292,7 +292,7 @@ function compile_lvgl {
292292
293293# # Build the Feature Phone Zig LVGL App for WebAssembly
294294# # TODO: Change ".." to your NuttX Project Directory
295- function build_feature_phone {
295+ function build_feature_phone_wasm {
296296 zig build-lib \
297297 --verbose-cimport \
298298 -target wasm32-freestanding \
@@ -400,8 +400,47 @@ function build_feature_phone {
400400
401401}
402402
403+ # # Compile the Feature Phone Zig LVGL App for Apache NuttX RTOS
404+ function build_feature_phone_nuttx {
405+ # # Compile the Zig LVGL App for PinePhone
406+ # # (armv8-a with cortex-a53)
407+ # # TODO: Change ".." to your NuttX Project Directory
408+ zig build-obj \
409+ --verbose-cimport \
410+ -target aarch64-freestanding-none \
411+ -mcpu cortex_a53 \
412+ \
413+ -isystem " ../nuttx/include" \
414+ -I . \
415+ -I " ../apps/include" \
416+ -I " ../apps/graphics/lvgl" \
417+ -I " ../apps/graphics/lvgl/lvgl/src/core" \
418+ -I " ../apps/graphics/lvgl/lvgl/src/draw" \
419+ -I " ../apps/graphics/lvgl/lvgl/src/draw/arm2d" \
420+ -I " ../apps/graphics/lvgl/lvgl/src/draw/nxp" \
421+ -I " ../apps/graphics/lvgl/lvgl/src/draw/nxp/pxp" \
422+ -I " ../apps/graphics/lvgl/lvgl/src/draw/nxp/vglite" \
423+ -I " ../apps/graphics/lvgl/lvgl/src/draw/sdl" \
424+ -I " ../apps/graphics/lvgl/lvgl/src/draw/stm32_dma2d" \
425+ -I " ../apps/graphics/lvgl/lvgl/src/draw/sw" \
426+ -I " ../apps/graphics/lvgl/lvgl/src/draw/swm341_dma2d" \
427+ -I " ../apps/graphics/lvgl/lvgl/src/font" \
428+ -I " ../apps/graphics/lvgl/lvgl/src/hal" \
429+ -I " ../apps/graphics/lvgl/lvgl/src/misc" \
430+ -I " ../apps/graphics/lvgl/lvgl/src/widgets" \
431+ feature-phone.zig
432+
433+ # # Copy the compiled Zig LVGL App to NuttX and overwrite `lv_demo_widgets.*.o`
434+ # # TODO: Change ".." to your NuttX Project Directory
435+ cp lvgltest.o \
436+ ../apps/graphics/lvgl/lvgl/demos/widgets/lv_demo_widgets.* .o
437+ }
438+
403439# # Build the LVGL App (in Zig) and LVGL Library (in C) for PinePhone and WebAssembly
404440build_zig
405441
406442# # Compile the Feature Phone Zig LVGL App for WebAssembly
407- build_feature_phone
443+ build_feature_phone_wasm
444+
445+ # # Compile the Feature Phone Zig LVGL App for Apache NuttX RTOS
446+ build_feature_phone_nuttx
0 commit comments