Enable simple_room_server on the STM32 platform

The room server gated its filesystem paths on NRF52_PLATFORM only, so an
STM32 build fell through to the ESP32 branch and failed to compile:

  MyMesh.cpp:147: no matching function for call to
    'Adafruit_LittleFS::open(const char*&, const char [2], bool)'
  main.cpp:69:   'store' was not declared in this scope

STM32 uses the same InternalFS / Adafruit_LittleFS API as nRF52, including
append semantics (FILE_O_WRITE opens LFS_O_RDWR|LFS_O_CREAT and then seeks
to the end), so the nRF52 branch is already correct for it. Add
STM32_PLATFORM alongside NRF52_PLATFORM in the four remaining gates;
saveIdentity() already did this.

This unblocks the room_server example on the existing STM32WL boards
(wio-e5-mini, wio-e5-dev, rak3x72, tiny_relay) as well as new ones.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Will MacGregorandClaude Opus 5 committed 2026-11-04 09:46:27 -05:00
1 parent 26079dea9b
commit bb3e77dc36
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -140,7 +140,7 @@ mesh::Packet *MyMesh::createSelfAdvert() {
}
File MyMesh::openAppend(const char *fname) {
#if defined(NRF52_PLATFORM)
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
return _fs->open(fname, FILE_O_WRITE);
#elif defined(RP2040_PLATFORM)
return _fs->open(fname, "a");
@@ -782,7 +782,7 @@ void MyMesh::applyTempRadioParams(float freq, float bw, uint8_t sf, uint8_t cr,
}
bool MyMesh::formatFileSystem() {
#if defined(NRF52_PLATFORM)
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
return InternalFS.format();
#elif defined(RP2040_PLATFORM)
return LittleFS.format();
+1 -1
View File
@@ -3,7 +3,7 @@
#include <Arduino.h> // needed for PlatformIO
#include <Mesh.h>
#if defined(NRF52_PLATFORM)
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
#include <InternalFileSystem.h>
#elif defined(RP2040_PLATFORM)
#include <LittleFS.h>
+1 -1
View File
@@ -50,7 +50,7 @@ void setup() {
fast_rng.begin(radio_driver.getRngSeed());
FILESYSTEM* fs;
#if defined(NRF52_PLATFORM)
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
InternalFS.begin();
fs = &InternalFS;
IdentityStore store(InternalFS, "");