mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 01:53:51 +01:00
Merge pull request #17554 from chrysn-pull-requests/rust-gcoap-add-saul
examples/rust-gcoap: Add SAUL
This commit is contained in:
commit
d10fa1b394
42
examples/rust-gcoap/Cargo.lock
generated
42
examples/rust-gcoap/Cargo.lock
generated
@ -146,6 +146,16 @@ version = "0.2.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757"
|
checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ciborium-ll"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9"
|
||||||
|
dependencies = [
|
||||||
|
"ciborium-io",
|
||||||
|
"half 2.4.0",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clang-sys"
|
name = "clang-sys"
|
||||||
version = "1.7.0"
|
version = "1.7.0"
|
||||||
@ -290,6 +300,12 @@ version = "1.1.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216"
|
checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crunchy"
|
||||||
|
version = "0.2.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crypto-common"
|
name = "crypto-common"
|
||||||
version = "0.1.6"
|
version = "0.1.6"
|
||||||
@ -422,6 +438,16 @@ version = "1.8.3"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403"
|
checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "half"
|
||||||
|
version = "2.4.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"crunchy",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hash32"
|
name = "hash32"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
@ -711,6 +737,8 @@ name = "riot-coap-handler-demos"
|
|||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
source = "git+https://gitlab.com/etonomy/riot-module-examples/#26a7d27b4c0d518be1d26d07403f57261ee37cd5"
|
source = "git+https://gitlab.com/etonomy/riot-module-examples/#26a7d27b4c0d518be1d26d07403f57261ee37cd5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"ciborium-io",
|
||||||
|
"ciborium-ll",
|
||||||
"coap-handler 0.2.0",
|
"coap-handler 0.2.0",
|
||||||
"coap-handler-implementations",
|
"coap-handler-implementations",
|
||||||
"coap-message 0.3.1",
|
"coap-message 0.3.1",
|
||||||
@ -719,7 +747,9 @@ dependencies = [
|
|||||||
"embedded-graphics",
|
"embedded-graphics",
|
||||||
"embedded-hal 0.2.7",
|
"embedded-hal 0.2.7",
|
||||||
"heapless 0.7.17",
|
"heapless 0.7.17",
|
||||||
|
"hex",
|
||||||
"minicbor",
|
"minicbor",
|
||||||
|
"riot-shell-commands",
|
||||||
"riot-sys",
|
"riot-sys",
|
||||||
"riot-wrappers",
|
"riot-wrappers",
|
||||||
"serde",
|
"serde",
|
||||||
@ -727,6 +757,16 @@ dependencies = [
|
|||||||
"serde_cbor",
|
"serde_cbor",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "riot-shell-commands"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://gitlab.com/etonomy/riot-module-examples/#26a7d27b4c0d518be1d26d07403f57261ee37cd5"
|
||||||
|
dependencies = [
|
||||||
|
"heapless 0.7.17",
|
||||||
|
"riot-sys",
|
||||||
|
"riot-wrappers",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "riot-sys"
|
name = "riot-sys"
|
||||||
version = "0.7.11"
|
version = "0.7.11"
|
||||||
@ -856,7 +896,7 @@ version = "0.11.2"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
|
checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"half",
|
"half 1.8.3",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ riot-wrappers = { version = "^0.8", features = [ "set_panic_handler", "panic_han
|
|||||||
|
|
||||||
coap-message-demos = { git = "https://gitlab.com/chrysn/coap-message-demos/", default-features = false }
|
coap-message-demos = { git = "https://gitlab.com/chrysn/coap-message-demos/", default-features = false }
|
||||||
coap-handler-implementations = "0.5"
|
coap-handler-implementations = "0.5"
|
||||||
riot-coap-handler-demos = { git = "https://gitlab.com/etonomy/riot-module-examples/", features = [ "vfs" ] }
|
riot-coap-handler-demos = { git = "https://gitlab.com/etonomy/riot-module-examples/", features = [ "vfs", "saul" ] }
|
||||||
|
|
||||||
# While currently this exmple does not use any RIOT modules implemented in
|
# While currently this exmple does not use any RIOT modules implemented in
|
||||||
# Rust, that may change; it is best practice for any RIOT application that has
|
# Rust, that may change; it is best practice for any RIOT application that has
|
||||||
|
|||||||
@ -19,9 +19,13 @@ USEMODULE += ztimer_usec
|
|||||||
USEMODULE += ztimer_msec
|
USEMODULE += ztimer_msec
|
||||||
USEMODULE += ztimer_sec
|
USEMODULE += ztimer_sec
|
||||||
|
|
||||||
|
# for the "vfs" feature of riot-coap-handler-demos (and vfs.c)
|
||||||
USEMODULE += vfs
|
USEMODULE += vfs
|
||||||
USEMODULE += constfs
|
USEMODULE += constfs
|
||||||
|
|
||||||
|
# for the "saul" feature of riot-coap-handler-demos
|
||||||
|
USEMODULE += saul_default
|
||||||
|
|
||||||
# Comment this out to disable code in RIOT that does safety checking
|
# Comment this out to disable code in RIOT that does safety checking
|
||||||
# which is not needed in a production environment but helps in the
|
# which is not needed in a production environment but helps in the
|
||||||
# development process:
|
# development process:
|
||||||
@ -30,10 +34,13 @@ DEVELHELP ?= 1
|
|||||||
# Change this to 0 show compiler invocation lines by default:
|
# Change this to 0 show compiler invocation lines by default:
|
||||||
QUIET ?= 1
|
QUIET ?= 1
|
||||||
|
|
||||||
# Add 3k extra stack: The Rust examples take more of it than gcoap expects,
|
# Add 8k extra stack: The Rust examples take more of it than gcoap expects,
|
||||||
# presumably because the example use the standard library's sting formatting
|
# presumably because the example use the standard library's sting formatting
|
||||||
# instead of one of the more optimized formatters.
|
# instead of one of the more optimized formatters.
|
||||||
CFLAGS += -DGCOAP_STACK_SIZE='(THREAD_STACKSIZE_DEFAULT+DEBUG_EXTRA_STACKSIZE+sizeof(coap_pkt_t)+1024)'
|
CFLAGS += -DGCOAP_STACK_SIZE='(THREAD_STACKSIZE_DEFAULT+DEBUG_EXTRA_STACKSIZE+sizeof(coap_pkt_t)+8192)'
|
||||||
|
# This thread needs some more stack for printing the addresses, once more being
|
||||||
|
# hit by string formatting.
|
||||||
|
CFLAGS += -DTHREAD_STACKSIZE_MAIN='(THREAD_STACKSIZE_DEFAULT+THREAD_EXTRA_STACKSIZE_PRINTF+2048)'
|
||||||
|
|
||||||
# The name of crate (as per Cargo.toml package name, but with '-' replaced with '_')
|
# The name of crate (as per Cargo.toml package name, but with '-' replaced with '_')
|
||||||
APPLICATION_RUST_MODULE = rust_gcoap
|
APPLICATION_RUST_MODULE = rust_gcoap
|
||||||
|
|||||||
@ -1,12 +1,26 @@
|
|||||||
BOARD_INSUFFICIENT_MEMORY := \
|
BOARD_INSUFFICIENT_MEMORY := \
|
||||||
airfy-beacon \
|
airfy-beacon \
|
||||||
|
b-l072z-lrwan1 \
|
||||||
blackpill-stm32f103c8 \
|
blackpill-stm32f103c8 \
|
||||||
|
blackpill-stm32f103cb \
|
||||||
bluepill-stm32f030c8 \
|
bluepill-stm32f030c8 \
|
||||||
bluepill-stm32f103c8 \
|
bluepill-stm32f103c8 \
|
||||||
|
bluepill-stm32f103cb \
|
||||||
calliope-mini \
|
calliope-mini \
|
||||||
|
cc1350-launchpad \
|
||||||
|
cc2650-launchpad \
|
||||||
|
cc2650stk \
|
||||||
|
e104-bt5010a-tb \
|
||||||
|
e104-bt5011a-tb \
|
||||||
|
gd32vf103c-start \
|
||||||
|
hifive1 \
|
||||||
|
hifive1b \
|
||||||
i-nucleo-lrwan1 \
|
i-nucleo-lrwan1 \
|
||||||
im880b \
|
im880b \
|
||||||
|
lsn50 \
|
||||||
|
maple-mini \
|
||||||
microbit \
|
microbit \
|
||||||
|
microbit-v2 \
|
||||||
nrf51dongle \
|
nrf51dongle \
|
||||||
nrf6310 \
|
nrf6310 \
|
||||||
nucleo-c031c6 \
|
nucleo-c031c6 \
|
||||||
@ -15,19 +29,22 @@ BOARD_INSUFFICIENT_MEMORY := \
|
|||||||
nucleo-f042k6 \
|
nucleo-f042k6 \
|
||||||
nucleo-f070rb \
|
nucleo-f070rb \
|
||||||
nucleo-f072rb \
|
nucleo-f072rb \
|
||||||
|
nucleo-f103rb \
|
||||||
nucleo-f302r8 \
|
nucleo-f302r8 \
|
||||||
nucleo-f303k8 \
|
nucleo-f303k8 \
|
||||||
nucleo-f334r8 \
|
nucleo-f334r8 \
|
||||||
nucleo-l011k4 \
|
nucleo-l011k4 \
|
||||||
nucleo-l031k6 \
|
nucleo-l031k6 \
|
||||||
nucleo-l053r8 \
|
nucleo-l053r8 \
|
||||||
|
nucleo-l073rz \
|
||||||
|
olimexino-stm32 \
|
||||||
|
opencm904 \
|
||||||
samd10-xmini \
|
samd10-xmini \
|
||||||
saml10-xpro \
|
|
||||||
saml11-xpro \
|
|
||||||
seeedstudio-gd32 \
|
seeedstudio-gd32 \
|
||||||
sipeed-longan-nano \
|
sipeed-longan-nano \
|
||||||
sipeed-longan-nano-tft \
|
sipeed-longan-nano-tft \
|
||||||
slstk3400a \
|
slstk3400a \
|
||||||
|
spark-core \
|
||||||
stk3200 \
|
stk3200 \
|
||||||
stm32f030f4-demo \
|
stm32f030f4-demo \
|
||||||
stm32f0discovery \
|
stm32f0discovery \
|
||||||
|
|||||||
@ -24,6 +24,7 @@ fn main() {
|
|||||||
let handler = coap_message_demos::full_application_tree(None)
|
let handler = coap_message_demos::full_application_tree(None)
|
||||||
.below(&["ps"], riot_coap_handler_demos::ps::ps_tree())
|
.below(&["ps"], riot_coap_handler_demos::ps::ps_tree())
|
||||||
.below(&["vfs"], riot_coap_handler_demos::vfs::vfs("/const"))
|
.below(&["vfs"], riot_coap_handler_demos::vfs::vfs("/const"))
|
||||||
|
.below(&["saul"], riot_coap_handler_demos::saul::SaulHandler::new(&["saul"]))
|
||||||
.with_wkc()
|
.with_wkc()
|
||||||
;
|
;
|
||||||
let mut handler = riot_wrappers::coap_handler::v0_2::GcoapHandler(handler);
|
let mut handler = riot_wrappers::coap_handler::v0_2::GcoapHandler(handler);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user