Skip to content

MicroPython v1.25 and LVGL v9.3 migration#358

Draft
miketlk wants to merge 18 commits into
cryptoadvance:micropython-upgradefrom
miketlk:micropython-upgrade
Draft

MicroPython v1.25 and LVGL v9.3 migration#358
miketlk wants to merge 18 commits into
cryptoadvance:micropython-upgradefrom
miketlk:micropython-upgrade

Conversation

@miketlk
Copy link
Copy Markdown
Contributor

@miketlk miketlk commented May 31, 2026

Summary

This PR upgrades specter-diy to MicroPython v1.25 and LVGL v9.3, including migration of the application code to the updated MicroPython and LVGL APIs.

The application migration is technically complete, and the firmware runs in the simulator. This PR remains a draft while the remaining hardware-specific issues are being resolved and the firmware is validated on the target device.

Unlike an early WIP PR #304 , this draft is now closer to merging: the main remaining goal is to confirm that the updated code works correctly on real hardware, test it thoroughly, and avoid regressions.

IMPORTANT

This draft PR currently has temporary submodule pointers to developer forks. These must be replaced with organization-owned repositories before merging.

Current Status

  • Application code migration is technically complete
  • Firmware runs on the simulator
  • Remaining work is focused on resolving hardware issues
  • Hardware testing and regression testing are still required before merge

Changes

  • Updated MicroPython to v1.25
  • Updated LVGL to v9.3
  • Updated f469-disco submodule to a commit incorporating MicroPython v1.25 and LVGL v9.3
  • Migrated application code to the new MicroPython and LVGL APIs
  • Updated build scripts for compatibility with MicroPython v1.25
  • Adjusted code that depends on updated LVGL behavior and bindings

TODO

Before this PR can be marked ready for review and merge:

  • Resolve remaining issues found on the hardware device
  • Review and update CI jobs affected by the MicroPython and LVGL migration
  • Update documentation (README.md, docs/) to reflect new module requirements, build commands, and known issues
  • Merge associated PRs to submodules
  • Switch submodules from developer forks to repositories within the organization

Testing

  • Simulator: application starts and runs with the migrated code
  • TODO: Test the migrated application on STM32F469I-DISCO hardware
  • TODO: Test the migrated application with the optional Specter Shield, including QR code scanner and SD card
  • TODO: Perform broader regression testing before marking this PR ready for review

Checklist

  • Code builds without errors
  • Application runs correctly in simulator
  • Application runs correctly on hardware
  • Associated submodule PRs merged
  • Submodules switched from developer forks to organization repositories
  • Documentation updated if necessary
  • Code reviewed for security and edge cases

miketlk added 18 commits May 23, 2026 16:55
Replace the Unix simulator ctypes dependency with uctypes.addressof, since
the CI Unix MicroPython build does not enable FFI/ctypes. Use a bytearray for
the preallocated buffer so rangeproof code receives writable memory.
Wrap lv.buttonmatrix with legacy helpers used by input and mnemonic screens.
Update the affected screens to use LVGL 9 textarea, switch, style, and event APIs.
Replace remaining deprecated LVGL widget, style, event, and alignment APIs in
GUI/app screens. Update QR controls, modal prompts, settings switches, wallet
and transaction views to use native LVGL 9 patterns.
Restore the PIN setup screen closer to the pre-upgrade reference by resetting
screen/button styles, hiding keypad hit areas, tuning text sizing, and removing
the empty battery artifact.
Scale shared button labels through a common style and recenter them using
their transformed pivot so reduced text stays visually centered.
Restore mnemonic table styling and word switching behavior after the LVGL 9
port. Reuse shared muted hint colors and buttonmatrix styles for the edit panel.
Restore wallet QR card sizing, alignment, and fullscreen redraw behavior after
the LVGL 9 port. Disable scroll artifacts and keep QR alert pages transparent.
Apply shared transparent page styling and disable default scrollbars so prompt
and transaction detail screens match the legacy layout.
Restore transparent textarea styling, left-aligned wallet names, and focused
cursor behavior so the edit screen matches the legacy reference.
Apply shared transparent textarea styling to derivation and numeric entry
screens so editable fields avoid LVGL 9 theme background and font drift.
Use fixed-size QR rendering and tighter insets so wallet and xpub QR
screens keep stable dimensions across redraws.
Keep topbar and menu button style_t objects reachable after assignment to
LVGL objects. Disable QR payload prints by default and clear cancelled QR
animation task references on DELETE.
Keep button clicks working while restoring touch entropy collection during
presses. Clean up label alignment, modal/QR control styling, settings switch
labels, and long transaction detail scrolling.
Describe legacy widget compatibility methods and keep sensitive simulator
QR payload logging opt-in for explicit diagnostics.
Keep dynamic QR styles reachable, guard screen cleanup, and prevent stale
keyboard hints.
Replace manual arc rotation with the native spinner so QR scan and
smartcard wait screens render a full ring without the knob artifact.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant