Repository navigation
Conversation
Logging: OS_LOG* go through openshock_log_write, which writes the console line once and hands level, tag and message to an optional log tap (LogTap.h). Panics print with the letter C. HTTP: HTTP::Client::Upload POSTs a body streamed from a callback. New diagnostics component: - Log lines at the upload level or more severe (errors always) are kept in a ring in __NOINIT memory, so the lines before a panic or watchdog reset survive into the next boot. Lines from the upload task itself are never kept. - The coredump in flash is found at boot and erased once every configured sink has it. - Coredump upload (on/off) and log upload level (none..verbose) are NVS settings, off by default (diag coredump / diag logs), uploaded from a short-lived task while the gateway is connected, with backoff. CONFIG_OPENSHOCK_DIAG_SDCARD (off by default) stores every log record and coredump on an SD card in the raw format of docs/SDCARD.md, through ESP-IDF's sdmmc layer on the SDMMC host or in SPI mode: an MBR written from scratch, a 0xFA dump partition of 1 MiB slots and a 0x7F log ring of CRC'd, epoch-tagged blocks; no filesystem. tools/sdlog/sdlog.py reads a card or an image of one, tested against a golden image written by the diagnostics host test. CONFIG_APP_RETRIEVE_LEN_ELF_SHA=64 so a dump names the exact build that crashed.
…pt-ins in the config CONFIG_OPENSHOCK_DIAG_UPLOAD_DOMAIN (from OPENSHOCK_DIAG_UPLOAD_DOMAIN in scripts/build.py) compiles uploading in when set; CONFIG_OPENSHOCK_DIAG, derived from it and the SD card option, compiles the component, its main.cpp calls and its commands in at all. Without either the firmware has no diagnostics code. ci-build passes the DIAG_UPLOAD_DOMAIN repository variable to every build except pull requests; diagnostics-compile.yml compiles the upload and SD code (upload.invalid, SD on) so they don't rot. The coredump upload checkbox and the log upload level move into the config as a DiagnosticsConfig section (schemas: HubConfig.fbs), persisted with the rest of it and mapped in the frontend. Uploads go to the configured domain; the hub token goes along only when that is the linked backend. Replaces the official-firmware flag and the runtime upload domain override.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.