Skip to content

Commit

Permalink
Merge pull request #827 from quartiq/feature/metadata
Browse files Browse the repository at this point in the history
Adding metadata and persistent panic info
  • Loading branch information
jordens authored Dec 5, 2023
2 parents accf844 + c48c27b commit f595e50
Show file tree
Hide file tree
Showing 14 changed files with 417 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
strategy:
matrix:
# keep MSRV in sync in ci.yaml and Cargo.toml
toolchain: [stable, '1.65.0']
toolchain: [stable, '1.66.0']
features: ['']
continue-on-error: [false]
include:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added
* Serial terminal is available on USB for settings configurations
* Reboot to DFU support added via the serial terminal for remote bootloading
* The `meta` topic now contains metadata about the compiler, firmware, and hardware similar to
Booster
* Panic information is now persisted after reboot and available via telemetry and the USB serial
console.

### Changed
* Broker is no longer configured at compile time, but is maintained in device memory
* MSRV bumped to v1.66

## [0.9.0](https://github.com/quartiq/stabilizer/compare/v0.8.1...v0.9.0)

Expand Down
163 changes: 162 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ readme = "README.md"
documentation = "https://docs.rs/stabilizer/"
edition = "2021"
# keep MSRV in sync in ci.yaml and Cargo.toml
rust-version = "1.65"
rust-version = "1.66"
build = "build.rs"
exclude = [
".gitignore",
"doc/",
Expand All @@ -34,6 +35,7 @@ default-target = "thumbv7em-none-eabihf"
members = ["ad9959", "serial-settings"]

[dependencies]
panic-persist = { version = "0.3", features = ["utf8", "custom-panic-handler"] }
sequential-storage = "0.6"
embedded-io = "0.6"
embedded-storage = "0.3"
Expand Down Expand Up @@ -71,6 +73,10 @@ miniconf = "0.9.0"
smoltcp-nal = { version = "0.4.1", features = ["shared-stack"]}
bbqueue = "0.5"
postcard = "1"
bit_field = "0.10.2"

[build-dependencies]
built = { version = "0.7", features = ["git2"], default-features = false }

[dependencies.stm32h7xx-hal]
version = "0.15.1"
Expand All @@ -80,6 +86,7 @@ features = ["stm32h743v", "rt", "ethernet", "xspi", "usb_hs"]

[patch.crates-io.usbd-serial]
git = "https://github.com/rust-embedded-community/usbd-serial"
rev = "096742c1c480f6f63c1a936a3c23ede7993c624d"

[features]
nightly = [ ]
Expand Down
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
fn main() {
built::write_built_file()
.expect("Failed to acquire build-time information");
println!("cargo:rerun-if-changed=memory.x");
}
10 changes: 8 additions & 2 deletions memory.x
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ MEMORY
RAM_B (rwx) : ORIGIN = 0x38800000, LENGTH = 4K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
FLASH1 (rx) : ORIGIN = 0x08100000, LENGTH = 1024K
BOOTFLAG_RAM: ORIGIN = 0x2001FC00, LENGTH = 1K
PERSISTENT_RAM: ORIGIN = 0x2001FC00, LENGTH = 1K
}

_bootflag = ORIGIN(BOOTFLAG_RAM);
/*
* Persistent memory has a u32 bootflag at the beginning and then the remainder is used for
* persisting panic information between boots.
*/
_bootflag = ORIGIN(PERSISTENT_RAM);
_panic_dump_start = ORIGIN(PERSISTENT_RAM) + 4;
_panic_dump_end = ORIGIN(PERSISTENT_RAM) + LENGTH(PERSISTENT_RAM) - 4;

SECTIONS {
.axisram (NOLOAD) : ALIGN(8) {
Expand Down
1 change: 1 addition & 0 deletions src/bin/dual-iir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ mod app {
env!("CARGO_BIN_NAME"),
&settings.broker,
&settings.id,
stabilizer.metadata,
);

let generator = network.configure_streaming(StreamFormat::AdcDacData);
Expand Down
1 change: 1 addition & 0 deletions src/bin/lockin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ mod app {
env!("CARGO_BIN_NAME"),
&settings.broker,
&settings.id,
stabilizer.metadata,
);

let generator = network.configure_streaming(StreamFormat::AdcDacData);
Expand Down
Loading

0 comments on commit f595e50

Please sign in to comment.