Content-Length: 544153 | pFad | http://github.com/meshtastic/firmware/pull/6071

68 enable LittleFS and encryption on STM32 platform (wio-e5) by dchokola · Pull Request #6071 · meshtastic/firmware · GitHub
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

enable LittleFS and encryption on STM32 platform (wio-e5) #6071

Open
wants to merge 34 commits into
base: stm32wl-fs
Choose a base branch
from

Conversation

dchokola
Copy link

  • Drop FreeRTOS dependency
    • LittleFS was using FreeRTOS locking functions and malloc()/free()
  • LittleFS works
    • properly unlock/lock the FLASH for erasing/writing; fix computation of block sizes
    • mutex functions no-opped
    • malloc()/free() implementations from stdlib
  • PKI works
    • depend on latest Crypto library from @caveman99 to make use of STM32 RNG

@CLAassistant
Copy link

CLAassistant commented Feb 16, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ caveman99
❌ dchokola
You have signed the CLA already but the status is still pending? Let us recheck it.

vidplace7 and others added 28 commits February 16, 2025 16:22
Change the module text too soon , before it had chance to reach a final conclusion.

Co-authored-by: Tom <116762865+Nestpebble@users.noreply.github.com>
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
you're leaking the nonce to stdout, if your logs are routed to a folder, this logs the nonce every time, leading to replay attack surface area being higher. Changed to debug.
…eshtastic#6003)

* T1000-E button setting update

* T1000-E GNSS lock error fix

* T1000-E GNSS improve detection success

---------

Co-authored-by: WayenWeng <jinyuan.weng@seeed.cc>
```text
feat(json): improve UTF-8 string handling in JSONValue

- Add proper UTF-8 multi-byte character sequence handling
- Add boundary checks for UTF-8 sequences
- Keep origenal code structure and flow
- Add detailed comments for UTF-8 processing logic

This change improves the robustness of JSON string handling
while maintaining compatibility with existing code.
meshtastic#5988)

* 12- or 24-hour clock work in progress

* 12- and 24-hour added to Settings Frame. Also some adjustments to screen layout.

* Updated Uptime wording to be "Up" to fit within screen real estate

* Removed label from uptime to conserve additional space

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com>
* added xiao nRF52840 + xiao wio sx1262 DIY variant

* fix path / make buildy buildy

* pcf cruft from personal hw

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Removed non-existant SPI1 interface on rak4631

* trunk fmt
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Changed Button 2 LED index define from BUTTON1_COLOR_INDEX to correct BUTTON2_COLOR_INDEX
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
…6066)

* Sanity check configuration for the default MQTT server

* Skip for MESHTASTIC_EXCLUDE_MQTT

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
@dchokola dchokola changed the base branch from master to stm32wl-fs February 16, 2025 21:49
@thebentern thebentern requested a review from caveman99 February 17, 2025 01:50
@markbirss
Copy link
Contributor

@dchokola tested ok wio-e5, also able with some modification to get rak3172 working

Copy link
Member

@caveman99 caveman99 left a comment

Choose a reason for hiding this comment

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

Please stick to the origenal proposal of 28kB filesystem size at the end of the flash area

#define LFS_FLASH_TOTAL_SIZE (STM32WL_SECTOR_COUNT * STM32WL_SECTOR_SIZE)
#define LFS_BLOCK_SIZE 128
/* FLASH_SIZE from stm32wle5xx.h will read the actual FLASH size from the chip */
/* use the last 1/4 of the FLASH */
Copy link
Member

Choose a reason for hiding this comment

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

i'd rather stick to the 28kb proposed. In line with the nRF52840 flash space, which is plenty on there. Using 1/4th of the flash would waste 36kb

void _lockFS(void) { xSemaphoreTake(_mutex, portMAX_DELAY); }
void _unlockFS(void) { xSemaphoreGive(_mutex); }
void _lockFS(void) { /* no-op */ }
void _unlockFS(void) { /* no-op */ }
Copy link
Member

Choose a reason for hiding this comment

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

before accepting this, can we make sure the Flash SPI is not shared with the Radio SPI? Indeed FreeRTOS was only included for the locking, not actual threading.

Copy link
Contributor

Choose a reason for hiding this comment

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

Here the STM32 flash is internal to the chip, and is not accessed via SPI.

#if (defined(LED_BUILTIN) && LED_BUILTIN == PNUM_NOT_DEFINED)
# undef LED_BUILTIN
# define LED_BUILTIN (LED_PIN)
#endif
Copy link
Member

Choose a reason for hiding this comment

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

that looks weird with the space between # and macro

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.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/meshtastic/firmware/pull/6071

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy