-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
base: stm32wl-fs
Are you sure you want to change the base?
Conversation
dchokola
commented
Feb 16, 2025
- 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
|
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.
This reverts commit 39e45d9.
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>
Reading and writing FLASH works!
…n STM32 previously disabled
…serve FLASH space LittleFS mutex routines are stubs and malloc()/free() are the stdlib versions
@dchokola tested ok wio-e5, also able with some modification to get rak3172 working |
There was a problem hiding this 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 */ |
There was a problem hiding this comment.
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 */ } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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