feat: FTP server with Wi-Fi, NTP, LVGL UI — initial working build

- Rewrite main.cpp: SD_MMC mount, Wi-Fi from JSON, NTP Vienna, FTP server
- Add ui.h/ui.cpp: LVGL status screen (IP, FTP status, SD bar, time)
- Add build_framework_libs.py: dynamic ESP32 Core 3.x lib resolution
- Remove unused sensor libs (IMU, magnetometer, fuel gauge, charger)
- Add SimpleFTPServer + ArduinoJson dependencies
- Build succeeds: RAM 19.2%, Flash 4.2%
This commit is contained in:
Lago
2026-04-03 14:13:09 +02:00
parent a3d9840a92
commit 4510cfe16c
6 changed files with 688 additions and 202 deletions
+37
View File
@@ -0,0 +1,37 @@
"""
Pre-build script for Kode Dot FTP Explorer.
Resolves ESP32 Arduino Core 3.x framework library paths dynamically and
compiles framework libraries that PlatformIO's LDF doesn't auto-discover
(Network, FFat). Also adds include paths for all framework libraries
needed by SimpleFTPServer.
"""
Import("env")
import os
framework_dir = env.PioPlatform().get_package_dir("framework-arduinoespressif32")
libs_dir = os.path.join(framework_dir, "libraries")
# Framework libraries whose include paths are needed by SimpleFTPServer
# and our code (some may already be discovered by LDF — adding extras is harmless)
INCLUDE_LIBS = [
"Network", "WiFi", "FS", "SD_MMC", "SD", "SPI",
"FFat", "SPIFFS", "LittleFS",
]
for lib_name in INCLUDE_LIBS:
inc_dir = os.path.join(libs_dir, lib_name, "src")
if os.path.isdir(inc_dir):
env.Append(CPPPATH=[inc_dir])
# These libraries are NOT auto-discovered by PlatformIO's LDF
# and must be explicitly compiled
COMPILE_LIBS = ["Network", "FFat"]
for lib_name in COMPILE_LIBS:
src_dir = os.path.join(libs_dir, lib_name, "src")
if os.path.isdir(src_dir):
env.BuildSources(
os.path.join("$BUILD_DIR", "Framework" + lib_name),
src_dir,
)