Skip to content

Commit

Permalink
[RSDK-8932] ota docs, local server (#361)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjperez authored Dec 19, 2024
1 parent 7bca1ac commit 7038313
Show file tree
Hide file tree
Showing 6 changed files with 442 additions and 6 deletions.
234 changes: 234 additions & 0 deletions Cargo.lock

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

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"micro-rdk-server",
"micro-rdk-ffi",
"examples/modular-drivers",
"etc/ota-dev-server",
]

default-members = [
Expand Down Expand Up @@ -118,7 +119,11 @@ syn = "2.0.90"
tempfile = "3.14.0"
test-log = "0.2.16"
thiserror = "2.0.4"
tokio = { version = "1.42.0", default-features = false }
tokio = { version = "1.42.0", features = ["full"] }
tower = { version = "0.4", features = ["util"] }
tower-http = { version = "0.5.0", features = ["fs", "trace"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
trackable = "1.3.0"
uuid = "1.11.0"
version-compare = "0.2"
Expand Down
33 changes: 28 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ upload: cargo-ver
cargo +esp espflash flash --package micro-rdk-server --monitor --partition-table micro-rdk-server/esp32/partitions.csv --baud 460800 -f 80mhz --bin micro-rdk-server-esp32 --target=xtensa-esp32-espidf -Zbuild-std=std,panic_abort

test:
cargo test -p micro-rdk --lib --features native
cargo test -p micro-rdk --lib --features native,ota

clippy-native:
cargo clippy -p micro-rdk --no-deps --features native -- -Dwarnings
cargo clippy -p micro-rdk --no-deps --features native,ota -- -Dwarnings

clippy-esp32:
cargo +esp clippy -p micro-rdk --features esp32,ota --target=xtensa-esp32-espidf -Zbuild-std=std,panic_abort -- -Dwarnings
Expand Down Expand Up @@ -99,11 +99,34 @@ doc-open:
size:
find . -name "esp-build.map" -exec ${IDF_PATH}/tools/idf_size.py {} \;

build-esp32-bin:
cargo +esp espflash save-image --package micro-rdk-server --merge --chip esp32 target/xtensa-esp32-espidf/micro-rdk-server-esp32.bin -T micro-rdk-server/esp32/partitions.csv -s 4mb --bin micro-rdk-server-esp32 --target=xtensa-esp32-espidf -Zbuild-std=std,panic_abort --release
build-esp32-bin: build-esp32-ota
cargo +esp espflash save-image \
--skip-update-check \
--package=micro-rdk-server \
--features=ota \
--chip=esp32 \
--bin=micro-rdk-server-esp32 \
--partition-table=micro-rdk-server/esp32/ota_8mb_partitions.csv \
--target=xtensa-esp32-espidf \
-Zbuild-std=std,panic_abort --release \
--flash-size=8mb \
--merge \
target/xtensa-esp32-espidf/micro-rdk-server-esp32.bin

build-esp32-ota:
cargo +esp espflash save-image --package micro-rdk-server --features=ota --chip=esp32 ./target/xtensa-esp32-espidf/micro-rdk-server-esp32-ota.bin --bin=micro-rdk-server-esp32 --partition-table=micro-rdk-server/esp32/ota_8mb_partitions.csv --target=xtensa-esp32-espidf -Zbuild-std=std,panic_abort --release
cargo +esp espflash save-image \
--skip-update-check \
--package=micro-rdk-server \
--features=ota \
--chip=esp32 \
--bin=micro-rdk-server-esp32 \
--partition-table=micro-rdk-server/esp32/ota_8mb_partitions.csv \
--target=xtensa-esp32-espidf \
-Zbuild-std=std,panic_abort --release \
target/xtensa-esp32-espidf/micro-rdk-server-esp32-ota.bin

serve-ota: build-esp32-ota
cargo r --package ota-dev-server

flash-esp32-bin:
ifneq (,$(wildcard ./target/xtensa-esp32-espidf/micro-rdk-server-esp32.bin))
Expand Down
Loading

0 comments on commit 7038313

Please sign in to comment.