Skip to content

examples/lvglterm: replace PIPES with PSEUDOTERM - #3742

Open
fdcavalcanti wants to merge 1 commit into
apache:masterfrom
fdcavalcanti:feature/lvgl-term-use-pseudotty
Open

examples/lvglterm: replace PIPES with PSEUDOTERM#3742
fdcavalcanti wants to merge 1 commit into
apache:masterfrom
fdcavalcanti:feature/lvgl-term-use-pseudotty

Conversation

@fdcavalcanti

@fdcavalcanti fdcavalcanti commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

The lvglterm terminal now runs the shell on a pseudo-terminal instead of three plain pipes.
Reason for this change is that I'm trying to run Python on LVGL terminal and we need to use pseudo terminal for it to render the interactive mode.

  • apps/examples/lvglterm/lvglterm.c — create_terminal() now calls openpty() and gives the shell the slave end as stdin/stdout/stderr; the single master fd replaces the three pipe pairs
  • New lvglterm_send_input() in the core owns the write path. It only ever writes as much as the terminal reports free via FIONSPACE and queues the rest for the timer.
  • Both input variants no longer echo locally (lvglterm_touch.c, lvglterm_kbd.c) — the terminal driver echoes the characters as the shell reads them, exactly as on a UART console, and echoing again would double everything.
  • Kconfig gained select PSEUDOTERM, so no defconfig edits are needed.

AI Disclaimer

Used Cursor to execute the changes and evaluate the impact.

Impact

Should affect the following boards that have lvgl_term example:

  • esp32p4-tab5
  • esp32s3-m5-cardputer
  • linum-stm32h753bi

Testing

Works the same as before.
Tested on esp32p4-tab5 and it works great. Need feedback for the other board.
WhatsApp Image 2026-08-20 at 15 35 29

@JorgeGzm could you do a test run with keyboard and touch? Which I think are the ones affected on linum board.

The lvglterm terminal now runs the shell on a pseudo-terminal instead of three
plain pipes.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
Comment thread examples/lvglterm/Kconfig
tristate "LVGL Terminal"
default n
depends on GRAPHICS_LVGL
select PSEUDOTERM

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
select PSEUDOTERM
depends on PSEUDOTERM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants