Public Access
Debug Builds: the console over Wi-Fi (Debug Console, TCP 2323)
cardputer-adv-debug (-DRORO_DEBUG, version +debug) adds a Debug Console: after a token line, a client gets the last 6 KB of console output, live lines (ESP-IDF logs included) and the serial commands. The socket task only queues lines; the main loop runs them. Release builds compile none of it. The token lives in ~/.config/roro9stack/debug-token, created by _docker.sh and passed into the container. All output now goes through `console`, which never waits for USB: a host that was attached but not reading stalled the main loop up to 2 s per line. New commands everywhere: info (slots with their versions from NVS, since the framework stamps its own into each image), tasks, reboot, boot other, log level, help. scripts/rdbg.py is the client; flash.sh --debug builds it; CI builds both variants. ADR 0004. Verified on the device: USB-flashed, then updated over Wi-Fi to a Debug Build that confirmed on Probation; both slots hold Debug Builds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <Print.h>
|
||||
#include <esp_partition.h>
|
||||
|
||||
#include "key_value_store.h"
|
||||
|
||||
namespace roro::system_info {
|
||||
|
||||
// Why the chip last started: "power-on", "panic", "task watchdog", "brownout"...
|
||||
const char* resetReason();
|
||||
// True if the last start was a crash or a watchdog, not a power-on or a deliberate restart.
|
||||
bool resetWasCrash();
|
||||
|
||||
// Firmware, uptime and memory, one fact per line.
|
||||
void printSystem(Print& out);
|
||||
// Both app slots: which one runs, which boots next, and each one's version and OTA state. Versions
|
||||
// come from NVS ("ver_<slot>"): the prebuilt framework stamps every image with its own version.
|
||||
void printSlots(Print& out, KeyValueStore& store);
|
||||
// Remembers which version the running slot holds (call at boot), or the slot an update just wrote.
|
||||
void recordSlotVersion(KeyValueStore& store, const esp_partition_t* slot, const char* version);
|
||||
// FreeRTOS tasks: state, priority, lowest free stack, CPU share since boot.
|
||||
void printTasks(Print& out);
|
||||
|
||||
// Boots the firmware in the other app slot if it holds a valid image (a manual Rollback).
|
||||
// Returns an error message; on success it restarts and doesn't return.
|
||||
const char* bootOtherSlot();
|
||||
|
||||
} // namespace roro::system_info
|
||||
Reference in New Issue
Block a user