Skip to content

lupyuen/lvglterm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LVGL Terminal for PinePhone on Apache NuttX RTOS

LVGL Terminal for PinePhone on Apache NuttX RTOS

LVGL Terminal lvglterm is a Touchscreen App for PinePhone that lets us run commands in the NuttX NSH Shell. Read the article...

Flow of LVGL Terminal for PinePhone on Apache NuttX RTOS

LVGL Terminal is now in Mainline NuttX. To build LVGL Terminal...

  1. Configure our NuttX Project...

    pushd nuttx/nuttx
    make distclean
    tools/configure.sh pinephone:lvgl
    make menuconfig
  2. In "RTOS Features > Tasks and Scheduling"

    Set "Application entry point" to lvglterm_main

    Set "Application entry name" to lvglterm_main

  3. In "Device Drivers"

    Enable "FIFO and named pipe drivers"

  4. In "Library Routines > Program Execution Options"

    Enable "exec[l|v] / posix_spawn() Support"

  5. In "Application Configuration > Examples"

    Enable "LVGL Terminal"

  6. In "Application Configuration > NSH Library"

    Disable "Have architecture-specific initialization"

  7. In "Application Configuration > Graphics Support > Light and Versatile Graphic Library (LVGL) > LVGL configuration > Font usage > Enable built-in fonts"

    Enable "UNSCII 16"

  8. Save configuration and exit menuconfig

  9. Build NuttX...

    make
  10. If the NuttX Build fails with undefined reference to lv_font_unscii_16...

    LD: nuttx
    aarch64-none-elf-ld: /private/tmp/nuttx/nuttx/staging/libapps.a(lvglterm.c.private.tmp.nuttx.apps.examples.lvglterm.o): in function `create_widgets':
    /private/tmp/nuttx/apps/examples/lvglterm/lvglterm.c:254: undefined reference to `lv_font_unscii_16'
    aarch64-none-elf-ld: /private/tmp/nuttx/apps/examples/lvglterm/lvglterm.c:254: undefined reference to `lv_font_unscii_16'
    make[1]: *** [Makefile:173: nuttx] Error 1
    make: *** [tools/Unix.mk:537: nuttx] Error 2
    

    Clear the NuttX Build Configuration...

    make distclean
    tools/configure.sh pinephone:lvgl
    make menuconfig
    

    And redo the menuconfig steps from above, then rebuild.

    This happens because NuttX builds LVGL with the Makefile that's bundled with LVGL. And the Makefile Integration is a little wonky :-)

    FYI the font file is at...

    nuttx/apps/graphics/lvgl/lvgl/src/font/lv_font_unscii_16.c
    

    Which gets compiled to...

    nuttx/apps/graphics/lvgl/lv_font_unscii_16.c.*.apps.graphics.lvgl.o
    

    Which should define lv_font_unscii_16...

    $ aarch64-none-elf-objdump -t -S nuttx/apps/graphics/lvgl/lv_font_unscii_16.c.*.apps.graphics.lvgl.o
    ...
    0000000000000000 g     O .rodata.lv_font_unscii_16	0000000000000030 lv_font_unscii_16

About

LVGL Terminal for PinePhone on Apache NuttX RTOS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published