From 257a07929b30a2c7a68b92dbabb040eb25b3fa3f Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 25 Jun 2024 12:14:06 +0100 Subject: [PATCH] Minor fixes (#2833) - Fix FlashString coding style - UPnP operator== not const - Tidy rp2040 build.mk - Fix comments in `FileSystem.h` referring to Spiffs --- Sming/Arch/Rp2040/build.mk | 6 ++---- Sming/Components/FlashString | 2 +- Sming/Core/FileSystem.h | 10 +++------- Sming/Libraries/UPnP | 2 +- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/Sming/Arch/Rp2040/build.mk b/Sming/Arch/Rp2040/build.mk index 810d3d9057..d3ccb6622f 100644 --- a/Sming/Arch/Rp2040/build.mk +++ b/Sming/Arch/Rp2040/build.mk @@ -9,7 +9,8 @@ CPPFLAGS += \ -DARDUINO_ARCH_RP2040 \ -march=armv6-m \ -mcpu=cortex-m0plus \ - -mthumb + -mthumb \ + -nostdlib CXXFLAGS += \ -fno-threadsafe-statics \ @@ -43,8 +44,5 @@ OBJCOPY := $(TOOLSPEC)objcopy OBJDUMP := $(TOOLSPEC)objdump GDB := gdb -CPPFLAGS += \ - -nostdlib - # => Tools MEMANALYZER = $(PYTHON) $(ARCH_TOOLS)/memanalyzer.py $(OBJDUMP)$(TOOL_EXT) diff --git a/Sming/Components/FlashString b/Sming/Components/FlashString index f2f3a40163..8685d62982 160000 --- a/Sming/Components/FlashString +++ b/Sming/Components/FlashString @@ -1 +1 @@ -Subproject commit f2f3a401634c393ffdde8e5ce73b0fb88a625b33 +Subproject commit 8685d629821809c9759c9c15a23127cf08ade5f7 diff --git a/Sming/Core/FileSystem.h b/Sming/Core/FileSystem.h index c2682fc4f2..c9ce6a9a99 100644 --- a/Sming/Core/FileSystem.h +++ b/Sming/Core/FileSystem.h @@ -96,7 +96,7 @@ bool fileMountFileSystem(IFS::IFileSystem* fs); bool fwfs_mount(); /** - * @brief Mount SPIFFS volume from a specific partition + * @brief Mount FWFS volume from a specific partition * @retval bool true on success */ bool fwfs_mount(Storage::Partition partition); @@ -256,8 +256,6 @@ template inline file_size_t fileGetSize(const TFileName& fi * @param file Open file handle, must have Write access * @param newSize * @retval int Error code - * @note In POSIX `ftruncate()` can also make the file bigger, however SPIFFS can only - * reduce the file size and will return an error if newSize > fileSize */ inline int fileTruncate(FileHandle file, file_size_t newSize) { @@ -279,8 +277,6 @@ inline int fileTruncate(FileHandle file) * @param fileName * @param newSize * @retval int Error code - * @note In POSIX `truncate()` can also make the file bigger, however SPIFFS can only - * reduce the file size and will return an error if newSize > fileSize */ template int fileTruncate(const TFileName& fileName, file_size_t newSize) { @@ -342,7 +338,7 @@ template inline size_t fileGetContent(const TFileName& file /** @brief Get file statistics * @param name File name - * @param stat Pointer to SPIFFS statistic structure to populate + * @param stat Pointer to statistic structure to populate * @retval int Error code */ inline int fileStats(const char* fileName, FileStat& stat) @@ -358,7 +354,7 @@ inline int fileStats(const String& fileName, FileStat& stat) /** brief Get file statistics * @param file File handle - * @param stat Pointer to SPIFFS statistic structure to populate + * @param stat Pointer to statistic structure to populate * @retval int Error code */ inline int fileStats(FileHandle file, FileStat& stat) diff --git a/Sming/Libraries/UPnP b/Sming/Libraries/UPnP index 17ea2953be..e332e8655e 160000 --- a/Sming/Libraries/UPnP +++ b/Sming/Libraries/UPnP @@ -1 +1 @@ -Subproject commit 17ea2953be95336e1b0cae3090fe992caab56b0a +Subproject commit e332e8655e1f70745a37f99d2a74e1deddfdca1e