Implement M5Stack Cardputer + minor Tactility improvements (#331)

- Implement M5Stack Cardputer: display, SD card and keyboard
- `St7789Display` now supports a "gap" configuration
- `ElfApp` has improved errors
This commit is contained in:
Ken Van Hoeylandt
2025-09-14 02:25:10 +02:00
committed by GitHub
parent d83b98e99b
commit 62c613477a
28 changed files with 1385 additions and 5 deletions
+13 -2
View File
@@ -36,6 +36,17 @@ static size_t elfManifestSetCount = 0;
static ElfManifest elfManifest;
static std::shared_ptr<Lock> elfManifestLock = std::make_shared<Mutex>();
static std::string getErrorCodeString(int error_code) {
switch (error_code) {
case ENOMEM:
return "out of memory";
case ENOSYS:
return "missing symbol";
default:
return std::format("code {}", error_code);
}
}
class ElfApp : public App {
const std::string appPath;
@@ -77,8 +88,8 @@ class ElfApp : public App {
auto relocate_result = esp_elf_relocate(&elf, elfFileData.get());
if (relocate_result != 0) {
// Note: the result code mapes to values from cstdlib's errno.h
lastError = std::format("Failed to load executable (error code {})", -relocate_result);
TT_LOG_E(TAG, "%s", lastError.c_str());
lastError = getErrorCodeString(-relocate_result);
TT_LOG_E(TAG, "Application failed to load: %s", lastError.c_str());
elfFileData = nullptr;
return false;
}
+2 -2
View File
@@ -41,11 +41,11 @@ public:
~LvglSync() override = default;
bool lock(TickType_t timeoutTicks) const override {
return tt::lvgl::lock(timeoutTicks);
return lvgl::lock(timeoutTicks);
}
bool unlock() const override {
tt::lvgl::unlock();
lvgl::unlock();
return true;
}
};