system/nxstore: Add LVGL touchscreen app-store frontend. - #3643
system/nxstore: Add LVGL touchscreen app-store frontend.#3643aviralgarg05 wants to merge 8 commits into
Conversation
ce6c2e5 to
513edde
Compare
|
@aviralgarg05 nice work, please include a scheenshot in the Testing. Also please add a companion nuttx/Documentation |
513edde to
79daf2c
Compare
|
Thanks. I have added a photograph of NXStore running on the ESP32-S3 target to the Testing section. The companion documentation is in apache/nuttx#18875, and the later signed-tree build and serial evidence remain recorded in the PR description. |
@aviralgarg05 please double check, there is not screenshot in apache/nuttx#18875 |
Sorry, missed it, Done now |
don't worry |
Installing a package meant typing nxpkg commands on a serial console, so on a board whose only input is a touchscreen there was no way to do it. Add nxstore, which lists what the synchronized catalog offers, shows which packages are installed, and installs and launches one on a tap. It calls the nxpkg library directly rather than shelling out, so it gets the real error code back and can say why an install failed. A launched application gets its own screen with a Close button, drawn only in the border region a scaled and centred framebuffer image does not cover, so returning to it does not overwrite what the application has already put on screen. Close sends SIGTERM and waits for the child; both the button handler and the idle poll can reap it, so each treats ECHILD as "already gone" rather than waiting for a wait() that can no longer succeed. Closing therefore needs the application to handle SIGTERM itself. There is deliberately no force-kill fallback: an earlier version called task_delete() when a child did not exit quickly enough, and on this flat memory build that hung the whole board rather than the one task when it landed in the middle of a framebuffer or heap access. The boot-time catalog sync waits up to fifteen seconds for DHCP before trying to fetch. Association completing does not mean an address has been assigned, and a fetch attempted in that window fails with -ENETUNREACH, which is indistinguishable from being offline. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
…dware. The device paths were borrowed from an unrelated example application, so a board that wanted nxstore had to configure lvgldemo as well. It now has its own framebuffer and input path settings. The catalog also moves off the stack onto the heap, with a message on the screen if that allocation fails, and the title buffer is sized from the name and version limits rather than a fixed length that the compiler warned could truncate. Launching an installed package now reads the manifest recorded for the version that is actually on disk, and passes through the arguments it declares. Combining an installed version with whatever the catalog currently says about that name gives the wrong answer after a rollback. Three faults showed up bringing this up on the board. A long press could fire for a touch that was really starting a scroll, because the timer elapses before the finger travels far enough for LVGL to commit to the gesture, which silently uninstalled whichever package was under the finger. Tapping a second package while an install was still running replaced the supervised child, leaving the first one alive with nothing watching it and no way to close it. And a package was shown as installed whether or not the installed version was the latest, so tapping it launched a stale payload with no indication an update existed; an out-of-date package now says so and tapping it updates. Also loads a package's optional icon, cached as a raw RGB565 image LVGL can draw without a decoder. Anything wrong with the icon falls back to the existing glyph, so a bad one never stops a package being listed. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Remove the dependency on an ESP-specific DHCP global. Retry catalog synchronization for a bounded period only while the network stack reports readiness-related errors, allowing the same frontend to work with Wi-Fi, Ethernet, and other boards. Keep the LVGL timer serviced between attempts so the interface remains responsive while the network comes up. Assisted-by: Codex:gpt-5 Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Use nxstore-owned framebuffer and input configuration symbols instead of relying on an unrelated LVGL demo configuration. Load the manifest for the installed version before launching it, validate that it matches the installed database entry, and pass its recorded arguments to posix_spawn(). Check spawn-attribute setup errors as well. Add the shared supervisor-bar height header to the nxstore change itself so the branch builds independently and framebuffer applications can follow the required reserved-strip contract. Assisted-by: Codex:gpt-5 Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Keep the list behavior documentation consistent with the 20-pixel threshold used by the tested implementation. Assisted-by: OpenAI Codex:gpt-5.6-sol Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
Read cached icons completely, validate the RGB565 format and exact payload size, and discard corrupt cache entries so a later launch can retry acquisition. Key the local cache by package name and version so a catalog update cannot silently reuse an older icon. Assisted-by: OpenAI Codex:gpt-5.6-sol Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
79daf2c to
e93ea02
Compare
e37eeeb to
7badb69
Compare
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx-apps/actions/runs/31816523839 |
linguini1
left a comment
There was a problem hiding this comment.
Honestly not going to finish reviewing this unless more effort is put into these patches to review AI output. These comments are way too long, some of the ones submitted before have been unrelated, and this is a consistent issue.
Show this. Text description is not enough. |
Remove long comments that restate the install flow. Assisted-by: OpenAI Codex:gpt-5.6-sol Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
e5a969a to
68f50e7
Compare
Will record a video of it, and put up asap |
Remove implementation history and keep only the required invariants. Assisted-by: OpenAI Codex:gpt-5.6-sol Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx-apps/actions/runs/31879473762 |
|
Even just photos is fine |
| default n | ||
| depends on GRAPHICS_LVGL && SYSTEM_NXPKG | ||
| select NETUTILS_CJSON | ||
| select SCHED_WAITPID |
There was a problem hiding this comment.
change select to depend on
|
@aviralgarg05 squash you change into one patch. |
Note: Please adhere to Contributing Guidelines.
Depends-On: /pull/3720
Summary
Installing a package meant typing
nxpkgcommands on a serial console. Ona board whose only input is a touchscreen there was no way to do it at all.
This adds a small LVGL front end over the existing
nxpkglibrary: itlists what the synchronized catalog offers, shows which versions are
installed, and installs and launches a package on a tap. It calls the
library directly rather than shelling out, so it gets real error codes back
and can tell a download failure from a digest mismatch.
A launched application is supervised: nxstore keeps its pid, asks it to
exit with SIGTERM when the user closes it, and returns to the list once the
child is reaped.
include/system/nxstore_chrome.hdescribes that contractfor applications that want to cooperate with it.
The diff previously carried the
system/nxpkgcommits it was branchedfrom; those are now the separate series ending at #3720, and this contains
only the front end.
Impact
nxpkgon the console is unaffected.path as the command line.
Testing
Build host: macOS 26.5, arm64,
xtensa-esp-elf-gcc 14.2.0(
esp-14.2.0_20251107).Target: Xtensa / ESP32-S3, Waveshare ESP32-S3-Touch-LCD-7, 800x480 RGB565
with a GT911 touchscreen.
nxstyle,tools/checkpatch.sh,codespellandgit diff --checksystem/nxpkgseriesOn the board: the catalog was listed, a package was installed and launched
by tapping it, closing it sent SIGTERM and the application exited on its
own, and the list came back with the package now shown as installed.
This does not build on
masteralone because it uses thenxpkglibrary;the
Depends-Online above lets CI apply that series first.PR verification Self-Check