Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support placing LVGL resourses in the external SPI Flash. Uploading u… #82

Merged
merged 21 commits into from
Oct 17, 2023

Conversation

jakkra
Copy link
Owner

@jakkra jakkra commented Oct 5, 2023

…sing RTT.

Fixes #64

How it works:

  • Debugger writes magic number into a RAM address.
  • Debugger resets CPU
  • Application read the magic number
  • If set then don't start normal application, instead start RTT flash loader.
  • Upload the filesystem or dump it from target.
  • Debugger issues a reset.
  • Application boots as normal.

To create a littlefs filesystem using everything placed in src/images/binaries/ and upload it to external SPI Flash:
west upload_fs

To dump the fs from target:
west upload_fs --type lfs --read_file filename_to_save_to
OR
west upload_fs --type raw --read_file filename_to_save_to

Folder options

  • filename.bin put into lvgl_lfs goes into littlefs filesystem into one partition of external flash.
    • Usage: lv_img_set_src(img, "S:filename.bin");
    • Upload: west upload_fs --type raw
  • filename.bin put into S goes into a basic readonly filesystem into one other partition of external flash.
    • Usage: lv_img_set_src(img, "/lvgl_lfs/filename.bin");
    • Upload: west upload_fs --type lfs

Which one to use?

For now those options are mostly for experimentation. Using littlefs may be faster due to littlefs caching. However the other custom filesystem allows us to do more optimization for ZSWatch in the future.

@jakkra jakkra force-pushed the flash_loader_boot_selection branch from 7cc0e36 to 01236a1 Compare October 8, 2023 22:07
jakkra added 5 commits October 9, 2023 00:09
…sing RTT.

How it works:
- Debugger writes magic number into a RAM address.
- Debugger resets CPU
- Application read the magic number
- If set then don't start normal application, instead start RTT flash loader.
- Upload the filesystem or dump it from target.
- Debugger issues a reset.
- Application boots as normal.
@jakkra jakkra force-pushed the flash_loader_boot_selection branch from 01236a1 to dc913b5 Compare October 8, 2023 22:30
@jakkra jakkra force-pushed the flash_loader_boot_selection branch from 8044ea0 to 38baa43 Compare October 9, 2023 11:37
@jakkra jakkra force-pushed the flash_loader_boot_selection branch from c5288fb to dc3c9f3 Compare October 9, 2023 21:28
@jakkra jakkra changed the title Support placing LVGL resourses in the external SPI Flash. Uploading u… Fixes https://github.com/jakkra/ZSWatch/issues/64 Support placing LVGL resourses in the external SPI Flash. Uploading u… Oct 9, 2023
@jakkra jakkra changed the title Fixes https://github.com/jakkra/ZSWatch/issues/64 Support placing LVGL resourses in the external SPI Flash. Uploading u… Support placing LVGL resourses in the external SPI Flash. Uploading u… Oct 9, 2023
@jakkra jakkra self-assigned this Oct 9, 2023
@jakkra jakkra merged commit a17b763 into main Oct 17, 2023
12 checks passed
@jakkra jakkra deleted the flash_loader_boot_selection branch October 17, 2023 20:38
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.

Upload LVGL resources such as images to external flash. Use resources in LVGL code that are in external flash.
1 participant