diff --git a/arch/stm32/stm32.ini b/arch/stm32/stm32.ini index 14fe8ea93..d66abe3b7 100644 --- a/arch/stm32/stm32.ini +++ b/arch/stm32/stm32.ini @@ -9,7 +9,6 @@ build_type = release build_flags = ${arduino_base.build_flags} - -Wl,--undefined=vTaskSwitchContext -flto -Isrc/platform/stm32wl -g -DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR @@ -21,7 +20,7 @@ build_flags = -DMESHTASTIC_EXCLUDE_BLUETOOTH -DMESHTASTIC_EXCLUDE_PKI -DMESHTASTIC_EXCLUDE_GPS - -DconfigUSE_CMSIS_RTOS_V2=1 + -DDEBUG_MUTE -fmerge-all-constants -ffunction-sections -fdata-sections @@ -31,11 +30,11 @@ build_src_filter = board_upload.offset_address = 0x08000000 upload_protocol = stlink +debug_tool = stlink lib_deps = ${env.lib_deps} ${radiolib_base.lib_deps} - stm32duino/STM32duino FreeRTOS@^10.3.2 https://github.com/caveman99/Crypto.git#eae9c768054118a9399690f8af202853d1ae8516 lib_ignore = diff --git a/src/freertosinc.h b/src/freertosinc.h index aed6dd8f4..e9e6cd53a 100644 --- a/src/freertosinc.h +++ b/src/freertosinc.h @@ -12,7 +12,7 @@ #include #endif -#if defined(ARDUINO_NRF52_ADAFRUIT) || defined(ARDUINO_ARCH_RP2040) || defined(STM32WLE5xx) +#if defined(ARDUINO_NRF52_ADAFRUIT) || defined(ARDUINO_ARCH_RP2040) #define HAS_FREE_RTOS #include diff --git a/src/platform/stm32wl/STM32_LittleFS.cpp b/src/platform/stm32wl/STM32_LittleFS.cpp index a7f744129..97e79e61e 100644 --- a/src/platform/stm32wl/STM32_LittleFS.cpp +++ b/src/platform/stm32wl/STM32_LittleFS.cpp @@ -42,7 +42,6 @@ STM32_LittleFS::STM32_LittleFS(struct lfs_config *cfg) varclr(&_lfs); _lfs_cfg = cfg; _mounted = false; - _mutex = xSemaphoreCreateMutexStatic(&this->_MutexStorageSpace); } STM32_LittleFS::~STM32_LittleFS() {} diff --git a/src/platform/stm32wl/STM32_LittleFS.h b/src/platform/stm32wl/STM32_LittleFS.h index 8aec8e7a5..d05c0dcbc 100644 --- a/src/platform/stm32wl/STM32_LittleFS.h +++ b/src/platform/stm32wl/STM32_LittleFS.h @@ -76,17 +76,13 @@ class STM32_LittleFS * code. User should not call these directly *------------------------------------------------------------------*/ lfs_t *_getFS(void) { return &_lfs; } - void _lockFS(void) { xSemaphoreTake(_mutex, portMAX_DELAY); } - void _unlockFS(void) { xSemaphoreGive(_mutex); } + void _lockFS(void) { /* no-op */ } + void _unlockFS(void) { /* no-op */ } protected: bool _mounted; struct lfs_config *_lfs_cfg; lfs_t _lfs; - SemaphoreHandle_t _mutex; - - private: - StaticSemaphore_t _MutexStorageSpace; }; #if !CFG_DEBUG diff --git a/src/platform/stm32wl/littlefs/lfs_util.h b/src/platform/stm32wl/littlefs/lfs_util.h index ba84d6b5e..5c8469f88 100644 --- a/src/platform/stm32wl/littlefs/lfs_util.h +++ b/src/platform/stm32wl/littlefs/lfs_util.h @@ -174,8 +174,7 @@ void lfs_crc(uint32_t *crc, const void *buffer, size_t size); static inline void *lfs_malloc(size_t size) { #ifndef LFS_NO_MALLOC - extern void *pvPortMalloc(size_t xWantedSize); - return pvPortMalloc(size); + return malloc(size); #else (void)size; return NULL; @@ -186,8 +185,7 @@ static inline void *lfs_malloc(size_t size) static inline void lfs_free(void *p) { #ifndef LFS_NO_MALLOC - extern void vPortFree(void *pv); - vPortFree(p); + free(p); #else (void)p; #endif diff --git a/variants/wio-e5/platformio.ini b/variants/wio-e5/platformio.ini index b91eb060d..8f800a687 100644 --- a/variants/wio-e5/platformio.ini +++ b/variants/wio-e5/platformio.ini @@ -21,6 +21,8 @@ build_flags = -DMESHTASTIC_EXCLUDE_SCREEN=1 -DMESHTASTIC_EXCLUDE_MQTT=1 -DMESHTASTIC_EXCLUDE_POWERMON=1 - -DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF + -DMESHTASTIC_EXCLUDE_PKI + ;-DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF + ;-DCFG_DEBUG upload_port = stlink \ No newline at end of file