app-module events & callstack config, crash diagnostics (#630)
- Apps can specify task stack depth and preferred memory placement in their manifests. - App identifiers are validated against length and character requirements. - Crash diagnostics now show the crash cause, reason, fault address, call stack, and program-counter details, with logs saved for review. - App closing is more consistent across built-in screens. There's now a dedicated function, and the old _emit() function is made private. - Crash diagnostics no longer display a QR code without a call stack. - Improved memory allocation for unrestricted requests.
This commit is contained in:
committed by
GitHub
parent
c656ee9ffd
commit
92ca046681
@@ -1,3 +1,4 @@
|
||||
#include "tactility/memory.h"
|
||||
#include "tactility/system_event.h"
|
||||
|
||||
#include <tactility/check.h>
|
||||
@@ -274,16 +275,27 @@ void runBootSequence(TickType_t startTime) {
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!setupUsbBootMode()) {
|
||||
registerApps();
|
||||
waitForMinimalSplashDuration(startTime);
|
||||
startNextApp();
|
||||
if (setupUsbBootMode()) {
|
||||
// Stay open: the splash's "Return to OS" button is this app's only way to leave mass
|
||||
// storage mode, so it must not self-close here like the normal boot path does below.
|
||||
return;
|
||||
}
|
||||
|
||||
registerApps();
|
||||
waitForMinimalSplashDuration(startTime);
|
||||
startNextApp();
|
||||
|
||||
if (sdCardMissing) {
|
||||
// Stay open: the error screen's "Reboot" button is this app's only way to leave here.
|
||||
return;
|
||||
}
|
||||
|
||||
// This event will likely block as other systems are initialized
|
||||
// e.g. Wi-Fi reads AP configs from SD card
|
||||
LOG_I(TAG, "Publish event");
|
||||
system_event_emit(KERNEL_EVENT_BOOT_COMPLETED, nullptr, 0);
|
||||
|
||||
app_event_emit_close(app_scheduler_current_app_id());
|
||||
}
|
||||
|
||||
int32_t appMain(int argc, char* argv[]) {
|
||||
@@ -337,8 +349,9 @@ extern const ::AppManifest manifest = {
|
||||
.id = "tactility.boot",
|
||||
.name = "Boot",
|
||||
.category = APP_CATEGORY_SYSTEM,
|
||||
.location = { APP_LOCATION_MEMORY, reinterpret_cast<void*>(appMain) },
|
||||
.location = { .type = APP_LOCATION_MEMORY, .location = reinterpret_cast<void*>(appMain) },
|
||||
.flags = APP_MANIFEST_FLAG_HIDDEN,
|
||||
.stack = { .depth = 4096, .desired_memory_capability = MEMORY_CAPABILITY_INTERNAL }
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user