diff --git a/Cargo.lock b/Cargo.lock index 7e95665..850ccfe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -136,9 +136,9 @@ dependencies = [ [[package]] name = "crc" -version = "3.2.1" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" dependencies = [ "crc-catalog", ] @@ -213,9 +213,9 @@ dependencies = [ [[package]] name = "deku" version = "0.19.1" -source = "git+https://github.com/CodeConstruct/deku.git?tag=cc%2Fdeku-v0.19.1%2Fno-alloc-6#e1e2eb703ea7f8d68fb7ff01140ca16e021cb11c" +source = "git+https://github.com/sharksforarms/deku.git?rev=e5363bc11e123bfcfd3467a2a90aeef8b588f432#e5363bc11e123bfcfd3467a2a90aeef8b588f432" dependencies = [ - "deku_derive 0.19.1 (git+https://github.com/CodeConstruct/deku.git?tag=cc%2Fdeku-v0.19.1%2Fno-alloc-6)", + "deku_derive 0.19.1 (git+https://github.com/sharksforarms/deku.git?rev=e5363bc11e123bfcfd3467a2a90aeef8b588f432)", "no_std_io2", "rustversion", ] @@ -234,7 +234,7 @@ dependencies = [ [[package]] name = "deku_derive" version = "0.19.1" -source = "git+https://github.com/CodeConstruct/deku.git?tag=cc%2Fdeku-v0.19.1%2Fno-alloc-6#e1e2eb703ea7f8d68fb7ff01140ca16e021cb11c" +source = "git+https://github.com/sharksforarms/deku.git?rev=e5363bc11e123bfcfd3467a2a90aeef8b588f432#e5363bc11e123bfcfd3467a2a90aeef8b588f432" dependencies = [ "darling", "proc-macro2", @@ -264,28 +264,12 @@ dependencies = [ [[package]] name = "embassy-embedded-hal" -version = "0.3.0" -source = "git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525#bdeeb388fff2462cccf82cf4f8444c0419db5525" -dependencies = [ - "embassy-futures 0.1.1 (git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525)", - "embassy-hal-internal 0.2.0", - "embassy-sync 0.6.2", - "embedded-hal 0.2.7", - "embedded-hal 1.0.0", - "embedded-hal-async", - "embedded-storage", - "embedded-storage-async", - "nb 1.1.0", -] - -[[package]] -name = "embassy-embedded-hal" -version = "0.3.1" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +version = "0.4.0" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ - "embassy-futures 0.1.1 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", - "embassy-hal-internal 0.3.0", - "embassy-sync 0.7.0 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", + "embassy-futures 0.1.1 (git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967)", + "embassy-hal-internal", + "embassy-sync 0.7.1", "embassy-time", "embedded-hal 0.2.7", "embedded-hal 1.0.0", @@ -297,8 +281,8 @@ dependencies = [ [[package]] name = "embassy-executor" -version = "0.7.0" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +version = "0.8.0" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ "cortex-m", "critical-section", @@ -309,8 +293,8 @@ dependencies = [ [[package]] name = "embassy-executor-macros" -version = "0.6.2" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +version = "0.7.0" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ "darling", "proc-macro2", @@ -327,27 +311,12 @@ checksum = "1f878075b9794c1e4ac788c95b728f26aa6366d32eeb10c7051389f898f7d067" [[package]] name = "embassy-futures" version = "0.1.1" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" - -[[package]] -name = "embassy-futures" -version = "0.1.1" -source = "git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525#bdeeb388fff2462cccf82cf4f8444c0419db5525" - -[[package]] -name = "embassy-hal-internal" -version = "0.2.0" -source = "git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525#bdeeb388fff2462cccf82cf4f8444c0419db5525" -dependencies = [ - "cortex-m", - "critical-section", - "num-traits", -] +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" [[package]] name = "embassy-hal-internal" version = "0.3.0" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ "cortex-m", "critical-section", @@ -357,27 +326,22 @@ dependencies = [ [[package]] name = "embassy-net-driver" version = "0.2.0" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" - -[[package]] -name = "embassy-net-driver" -version = "0.2.0" -source = "git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525#bdeeb388fff2462cccf82cf4f8444c0419db5525" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" [[package]] name = "embassy-net-driver-channel" version = "0.3.1" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ - "embassy-futures 0.1.1 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", - "embassy-net-driver 0.2.0 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", - "embassy-sync 0.7.0 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", + "embassy-futures 0.1.1 (git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967)", + "embassy-net-driver", + "embassy-sync 0.7.1", ] [[package]] name = "embassy-stm32" -version = "0.2.0" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +version = "0.3.0" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ "aligned", "bit_field", @@ -388,60 +352,16 @@ dependencies = [ "cortex-m-rt", "critical-section", "document-features", - "embassy-embedded-hal 0.3.1", - "embassy-futures 0.1.1 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", - "embassy-hal-internal 0.3.0", - "embassy-net-driver 0.2.0 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", - "embassy-sync 0.7.0 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", + "embassy-embedded-hal", + "embassy-futures 0.1.1 (git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967)", + "embassy-hal-internal", + "embassy-net-driver", + "embassy-sync 0.7.1", "embassy-time", "embassy-time-driver", "embassy-time-queue-utils", - "embassy-usb-driver 0.2.0", - "embassy-usb-synopsys-otg 0.2.0 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", - "embedded-can", - "embedded-hal 0.2.7", - "embedded-hal 1.0.0", - "embedded-hal-async", - "embedded-hal-nb", - "embedded-io", - "embedded-io-async", - "embedded-storage", - "embedded-storage-async", - "futures-util", - "nb 1.1.0", - "proc-macro2", - "quote", - "rand_core 0.6.4", - "rand_core 0.9.3", - "sdio-host 0.9.0", - "static_assertions", - "stm32-fmc", - "stm32-metapac 16.0.0 (git+https://github.com/embassy-rs/stm32-data-generated?tag=stm32-data-85e2c0f43f3460b3305a2f97962bd39deed09d13)", - "vcell", - "volatile-register", -] - -[[package]] -name = "embassy-stm32" -version = "0.2.0" -source = "git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525#bdeeb388fff2462cccf82cf4f8444c0419db5525" -dependencies = [ - "aligned", - "bit_field", - "bitflags", - "block-device-driver", - "cfg-if", - "cortex-m", - "cortex-m-rt", - "critical-section", - "document-features", - "embassy-embedded-hal 0.3.0", - "embassy-futures 0.1.1 (git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525)", - "embassy-hal-internal 0.2.0", - "embassy-net-driver 0.2.0 (git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525)", - "embassy-sync 0.6.2", - "embassy-usb-driver 0.1.0", - "embassy-usb-synopsys-otg 0.2.0 (git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525)", + "embassy-usb-driver", + "embassy-usb-synopsys-otg", "embedded-can", "embedded-hal 0.2.7", "embedded-hal 1.0.0", @@ -457,27 +377,15 @@ dependencies = [ "proc-macro2", "quote", "rand_core 0.6.4", - "sdio-host 0.5.0", + "rand_core 0.9.3", + "sdio-host", "static_assertions", "stm32-fmc", - "stm32-metapac 16.0.0 (git+https://github.com/embassy-rs/stm32-data-generated?tag=stm32-data-a7a30c9d54e7415709c463a537501691784672db)", + "stm32-metapac", "vcell", "volatile-register", ] -[[package]] -name = "embassy-sync" -version = "0.6.2" -source = "git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525#bdeeb388fff2462cccf82cf4f8444c0419db5525" -dependencies = [ - "cfg-if", - "critical-section", - "embedded-io-async", - "futures-sink", - "futures-util", - "heapless", -] - [[package]] name = "embassy-sync" version = "0.7.0" @@ -494,8 +402,8 @@ dependencies = [ [[package]] name = "embassy-sync" -version = "0.7.0" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +version = "0.7.1" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ "cfg-if", "critical-section", @@ -508,7 +416,7 @@ dependencies = [ [[package]] name = "embassy-time" version = "0.4.0" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ "cfg-if", "critical-section", @@ -523,15 +431,15 @@ dependencies = [ [[package]] name = "embassy-time-driver" version = "0.2.0" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ "document-features", ] [[package]] name = "embassy-time-queue-utils" -version = "0.1.0" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +version = "0.2.0" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ "embassy-executor", "heapless", @@ -540,47 +448,32 @@ dependencies = [ [[package]] name = "embassy-usb" version = "0.5.0" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ - "embassy-futures 0.1.1 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", + "embassy-futures 0.1.1 (git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967)", "embassy-net-driver-channel", - "embassy-sync 0.7.0 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", - "embassy-usb-driver 0.2.0", + "embassy-sync 0.7.1", + "embassy-usb-driver", "embedded-io-async", "heapless", ] -[[package]] -name = "embassy-usb-driver" -version = "0.1.0" -source = "git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525#bdeeb388fff2462cccf82cf4f8444c0419db5525" - [[package]] name = "embassy-usb-driver" version = "0.2.0" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ "embedded-io-async", ] [[package]] name = "embassy-usb-synopsys-otg" -version = "0.2.0" -source = "git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8#0290c8565e9e3443d52edb5c250a53a50f6fc2a8" -dependencies = [ - "critical-section", - "embassy-sync 0.7.0 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", - "embassy-usb-driver 0.2.0", -] - -[[package]] -name = "embassy-usb-synopsys-otg" -version = "0.2.0" -source = "git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525#bdeeb388fff2462cccf82cf4f8444c0419db5525" +version = "0.3.0" +source = "git+https://github.com/embassy-rs/embassy/?rev=a5cb04bdab602bc3bd056d254a9d61cad55bd967#a5cb04bdab602bc3bd056d254a9d61cad55bd967" dependencies = [ "critical-section", - "embassy-sync 0.6.2", - "embassy-usb-driver 0.1.0", + "embassy-sync 0.7.1", + "embassy-usb-driver", ] [[package]] @@ -791,15 +684,15 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "mctp" version = "0.2.0" -source = "git+https://github.com/CodeConstruct/mctp-rs?rev=88c9eba20c6ac62025438bb7ca9b9578c9f2679c#88c9eba20c6ac62025438bb7ca9b9578c9f2679c" +source = "git+https://github.com/CodeConstruct/mctp-rs?rev=d8385ad5f548d0256c89bdb0c187396b29f43e41#d8385ad5f548d0256c89bdb0c187396b29f43e41" [[package]] name = "mctp-estack" version = "0.1.0" -source = "git+https://github.com/CodeConstruct/mctp-rs?rev=88c9eba20c6ac62025438bb7ca9b9578c9f2679c#88c9eba20c6ac62025438bb7ca9b9578c9f2679c" +source = "git+https://github.com/CodeConstruct/mctp-rs?rev=d8385ad5f548d0256c89bdb0c187396b29f43e41#d8385ad5f548d0256c89bdb0c187396b29f43e41" dependencies = [ "crc", - "embassy-sync 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "embassy-sync 0.7.0", "embedded-io-async", "heapless", "log", @@ -811,11 +704,11 @@ dependencies = [ [[package]] name = "mctp-usb-embassy" version = "0.1.0" -source = "git+https://github.com/CodeConstruct/mctp-rs?rev=88c9eba20c6ac62025438bb7ca9b9578c9f2679c#88c9eba20c6ac62025438bb7ca9b9578c9f2679c" +source = "git+https://github.com/CodeConstruct/mctp-rs?rev=d8385ad5f548d0256c89bdb0c187396b29f43e41#d8385ad5f548d0256c89bdb0c187396b29f43e41" dependencies = [ "embassy-futures 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "embassy-usb", - "embassy-usb-driver 0.2.0", + "embassy-usb-driver", "heapless", "log", "mctp", @@ -881,10 +774,10 @@ dependencies = [ [[package]] name = "nvme-mi-dev" version = "0.1.0" -source = "git+https://github.com/CodeConstruct/nvme-mi-dev#6182fd25b196681898d05e644388f17d005adcbc" +source = "git+https://github.com/CodeConstruct/nvme-mi-dev#6dc246aae5fdc46d655b6e0b8126ec34546152d9" dependencies = [ "crc", - "deku 0.19.1 (git+https://github.com/CodeConstruct/deku.git?tag=cc%2Fdeku-v0.19.1%2Fno-alloc-6)", + "deku 0.19.1 (git+https://github.com/sharksforarms/deku.git?rev=e5363bc11e123bfcfd3467a2a90aeef8b588f432)", "flagset", "heapless", "hmac", @@ -929,7 +822,7 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pldm" version = "0.2.0" -source = "git+https://github.com/CodeConstruct/mctp-rs?rev=88c9eba20c6ac62025438bb7ca9b9578c9f2679c#88c9eba20c6ac62025438bb7ca9b9578c9f2679c" +source = "git+https://github.com/CodeConstruct/mctp-rs?rev=d8385ad5f548d0256c89bdb0c187396b29f43e41#d8385ad5f548d0256c89bdb0c187396b29f43e41" dependencies = [ "crc", "deku 0.19.1 (git+https://github.com/CodeConstruct/deku.git?tag=cc%2Fdeku-v0.19.1%2Fno-alloc-3)", @@ -943,7 +836,7 @@ dependencies = [ [[package]] name = "pldm-file" version = "0.1.0" -source = "git+https://github.com/CodeConstruct/mctp-rs?rev=88c9eba20c6ac62025438bb7ca9b9578c9f2679c#88c9eba20c6ac62025438bb7ca9b9578c9f2679c" +source = "git+https://github.com/CodeConstruct/mctp-rs?rev=d8385ad5f548d0256c89bdb0c187396b29f43e41#d8385ad5f548d0256c89bdb0c187396b29f43e41" dependencies = [ "crc", "deku 0.19.1 (git+https://github.com/CodeConstruct/deku.git?tag=cc%2Fdeku-v0.19.1%2Fno-alloc-3)", @@ -958,7 +851,7 @@ dependencies = [ [[package]] name = "pldm-platform" version = "0.1.0" -source = "git+https://github.com/CodeConstruct/mctp-rs?rev=88c9eba20c6ac62025438bb7ca9b9578c9f2679c#88c9eba20c6ac62025438bb7ca9b9578c9f2679c" +source = "git+https://github.com/CodeConstruct/mctp-rs?rev=d8385ad5f548d0256c89bdb0c187396b29f43e41#d8385ad5f548d0256c89bdb0c187396b29f43e41" dependencies = [ "chrono", "deku 0.19.1 (git+https://github.com/CodeConstruct/deku.git?tag=cc%2Fdeku-v0.19.1%2Fno-alloc-3)", @@ -1044,12 +937,6 @@ version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d" -[[package]] -name = "sdio-host" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93c025f9cfe4c388c328ece47d11a54a823da3b5ad0370b22d95ad47137f85a" - [[package]] name = "sdio-host" version = "0.9.0" @@ -1123,17 +1010,9 @@ dependencies = [ [[package]] name = "stm32-metapac" -version = "16.0.0" -source = "git+https://github.com/embassy-rs/stm32-data-generated?tag=stm32-data-85e2c0f43f3460b3305a2f97962bd39deed09d13#ae717bd8f93f9dfd855651ef224b1a5d69f7c387" -dependencies = [ - "cortex-m", - "cortex-m-rt", -] - -[[package]] -name = "stm32-metapac" -version = "16.0.0" -source = "git+https://github.com/embassy-rs/stm32-data-generated?tag=stm32-data-a7a30c9d54e7415709c463a537501691784672db#eb4626497984cba3cad6f381a8745813bd9999d8" +version = "17.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b44329ff285800f88ccc1666218808c6ed0e6dc570383b5f661caadb8101133" dependencies = [ "cortex-m", "cortex-m-rt", @@ -1189,12 +1068,12 @@ dependencies = [ "deku 0.19.1 (git+https://github.com/CodeConstruct/deku.git?tag=cc%2Fdeku-v0.19.1%2Fno-alloc-3)", "embassy-executor", "embassy-futures 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "embassy-stm32 0.2.0 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", - "embassy-sync 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "embassy-stm32", + "embassy-sync 0.7.0", "embassy-time", "embassy-usb", - "embassy-usb-driver 0.2.0", - "embassy-usb-synopsys-otg 0.2.0 (git+https://github.com/embassy-rs/embassy/?rev=0290c8565e9e3443d52edb5c250a53a50f6fc2a8)", + "embassy-usb-driver", + "embassy-usb-synopsys-otg", "embedded-hal-async", "heapless", "hmac", @@ -1254,7 +1133,7 @@ dependencies = [ "cortex-m", "cortex-m-rt", "embassy-executor", - "embassy-stm32 0.2.0 (git+https://github.com/embassy-rs/embassy?rev=bdeeb388fff2462cccf82cf4f8444c0419db5525)", + "embassy-stm32", "log", "neotron-loader", "panic-probe", diff --git a/Cargo.toml b/Cargo.toml index 25d65d2..d0b0004 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,8 @@ cortex-m = { version = "0.7.6", features = ["inline-asm", "critical-section-sing # set-vtor and set-sp necessary when using xspiloader cortex-m-rt = { version = "0.7.0", features = ["set-sp", "set-vtor"] } panic-probe = { version = "1", features = ["print-rtt"] } -embassy-executor = { version = "0.7", features = ["executor-thread"] } +embassy-executor = { version = "0.8", features = ["executor-thread"] } +embassy-stm32 = { version = "0.3", features = ["time-driver-any", "stm32h7s3l8", "unstable-pac", "log"] } [dependencies] embassy-executor = { workspace = true, features = [ @@ -34,8 +35,8 @@ embassy-sync = { workspace = true } embassy-usb = { workspace = true } embassy-usb-driver = { workspace = true } embassy-futures = { workspace = true } -embassy-stm32 = { version = "0.2", features = ["time-driver-any", "stm32h7s3l8"] } -embassy-usb-synopsys-otg = { version = "0.2" } +embassy-stm32 = { workspace = true } +embassy-usb-synopsys-otg = { version = "0.3" } embedded-hal-async = { workspace = true } heapless = { workspace = true } static_cell = "2.1" @@ -62,29 +63,28 @@ num-derive = { version = "0.4", default-features = false } num-traits = { version = "0.2", default-features = false } [patch.crates-io] -# https://github.com/embassy-rs/embassy/pull/3765 Display for Hertz in embassy-stm32 -# https://github.com/embassy-rs/embassy/pull/4401 for USB write performance -embassy-stm32 = { git = "https://github.com/embassy-rs/embassy/", rev = "0290c8565e9e3443d52edb5c250a53a50f6fc2a8" } -embassy-usb-synopsys-otg = { git = "https://github.com/embassy-rs/embassy/", rev = "0290c8565e9e3443d52edb5c250a53a50f6fc2a8" } +# "Fix vrefbuf trace with log" https://github.com/embassy-rs/embassy/pull/4553 +embassy-stm32 = { git = "https://github.com/embassy-rs/embassy/", rev = "a5cb04bdab602bc3bd056d254a9d61cad55bd967" } +embassy-usb-synopsys-otg = { git = "https://github.com/embassy-rs/embassy/", rev = "a5cb04bdab602bc3bd056d254a9d61cad55bd967" } -embassy-time = { git = "https://github.com/embassy-rs/embassy/", rev = "0290c8565e9e3443d52edb5c250a53a50f6fc2a8" } -embassy-time-driver = { git = "https://github.com/embassy-rs/embassy/", rev = "0290c8565e9e3443d52edb5c250a53a50f6fc2a8" } -embassy-usb = { git = "https://github.com/embassy-rs/embassy/", rev = "0290c8565e9e3443d52edb5c250a53a50f6fc2a8" } -embassy-usb-driver = { git = "https://github.com/embassy-rs/embassy/", rev = "0290c8565e9e3443d52edb5c250a53a50f6fc2a8" } -embassy-executor = { git = "https://github.com/embassy-rs/embassy/", rev = "0290c8565e9e3443d52edb5c250a53a50f6fc2a8" } +embassy-time = { git = "https://github.com/embassy-rs/embassy/", rev = "a5cb04bdab602bc3bd056d254a9d61cad55bd967" } +embassy-time-driver = { git = "https://github.com/embassy-rs/embassy/", rev = "a5cb04bdab602bc3bd056d254a9d61cad55bd967" } +embassy-usb = { git = "https://github.com/embassy-rs/embassy/", rev = "a5cb04bdab602bc3bd056d254a9d61cad55bd967" } +embassy-usb-driver = { git = "https://github.com/embassy-rs/embassy/", rev = "a5cb04bdab602bc3bd056d254a9d61cad55bd967" } +embassy-executor = { git = "https://github.com/embassy-rs/embassy/", rev = "a5cb04bdab602bc3bd056d254a9d61cad55bd967" } # Updated for embassy-usb api change -mctp-usb-embassy = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "88c9eba20c6ac62025438bb7ca9b9578c9f2679c" } +mctp-usb-embassy = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "d8385ad5f548d0256c89bdb0c187396b29f43e41" } # Updated to match mtp-usb-embassy. Also has performance and stack size improvements. # Includes ControlEvent change. -mctp-estack = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "88c9eba20c6ac62025438bb7ca9b9578c9f2679c" } -mctp = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "88c9eba20c6ac62025438bb7ca9b9578c9f2679c" } +mctp-estack = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "d8385ad5f548d0256c89bdb0c187396b29f43e41" } +mctp = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "d8385ad5f548d0256c89bdb0c187396b29f43e41" } # pldm-file and pldm-platform are not yet published -pldm = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "88c9eba20c6ac62025438bb7ca9b9578c9f2679c" } -pldm-file = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "88c9eba20c6ac62025438bb7ca9b9578c9f2679c" } -pldm-platform = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "88c9eba20c6ac62025438bb7ca9b9578c9f2679c" } +pldm = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "d8385ad5f548d0256c89bdb0c187396b29f43e41" } +pldm-file = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "d8385ad5f548d0256c89bdb0c187396b29f43e41" } +pldm-platform = { git = "https://github.com/CodeConstruct/mctp-rs", rev = "d8385ad5f548d0256c89bdb0c187396b29f43e41" } [features] default = ["log-usbserial", "nvme-mi", "pldm-file"] diff --git a/ci/runtests.sh b/ci/runtests.sh index 46b942c..8f0de7c 100755 --- a/ci/runtests.sh +++ b/ci/runtests.sh @@ -18,13 +18,12 @@ cargo check --locked cargo clippy # various features -cargo build -cargo build --all-features -cargo build --no-default-features -cargo build --features mctp-bench - -# release builds +cargo build --release cargo build --release --all-features +cargo build --release --no-default-features +cargo build --release --features mctp-bench + +(cd xspiloader && cargo build) # Check syntax cargo doc diff --git a/src/main.rs b/src/main.rs index 1108ede..5d02b08 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,7 +8,6 @@ #![deny(unused_must_use)] #![deny(unsafe_op_in_unsafe_fn)] -use embassy_sync::signal::Signal; #[allow(unused)] use log::{debug, error, info, trace, warn}; @@ -19,10 +18,12 @@ use embassy_executor::{Executor, InterruptExecutor, Spawner}; use embassy_futures::select::{select, Either}; use embassy_stm32::interrupt; use embassy_stm32::interrupt::{InterruptExt, Priority}; -use embassy_stm32::{gpio, Config}; +use embassy_stm32::{bind_interrupts, gpio, mode, peripherals, Config}; use embassy_time::{Duration, Instant, Timer}; use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; +use embassy_sync::mutex::Mutex; +use embassy_sync::signal::Signal; use mctp::{AsyncListener, AsyncRespChannel}; use mctp::{Eid, MsgType}; use mctp_estack::control::ControlEvent; @@ -37,6 +38,10 @@ mod usb; use ccvendor::BenchRequest; +bind_interrupts!(struct Irqs { + HASH => embassy_stm32::hash::InterruptHandler; +}); + const USB_MTU: usize = 251; // Optimal BENCH_LEN is (N*247 - 1). @@ -55,6 +60,11 @@ fn panic(info: &core::panic::PanicInfo) -> ! { loop {} } +type SharedHash = Mutex< + CriticalSectionRawMutex, + embassy_stm32::hash::Hash<'static, peripherals::HASH, mode::Blocking>, +>; + static EXECUTOR_HIGH: InterruptExecutor = InterruptExecutor::new(); static EXECUTOR_MEDIUM: InterruptExecutor = InterruptExecutor::new(); static EXECUTOR_LOW: StaticCell = StaticCell::new(); @@ -87,6 +97,8 @@ fn config() -> Config { divp: Some(PllDiv::DIV1), // 600 MHz divq: Some(PllDiv::DIV2), // 300 MHz divr: Some(PllDiv::DIV2), // 300 MHz + divs: None, + divt: None, }); config.rcc.pll3 = Some(Pll { source: PllSource::HSI, @@ -96,6 +108,8 @@ fn config() -> Config { // 32MHz max for Usbphycsel divq: Some(PllDiv::DIV10), // 32 MHz divr: Some(PllDiv::DIV10), // 32 MHz + divs: None, + divt: None, }); config.rcc.sys = Sysclk::PLL1_P; // 600 MHz config.rcc.ahb_pre = AHBPrescaler::DIV2; // 300 MHz @@ -210,6 +224,12 @@ fn run(low_spawner: Spawner, logger: &'static multilog::MultiLog) { let led = gpio::Output::new(p.PD13, gpio::Level::High, gpio::Speed::Low); + static HASH: StaticCell = StaticCell::new(); + let hash = HASH.init(Mutex::new(embassy_stm32::hash::Hash::new_blocking( + p.HASH, Irqs, + ))); + let _ = hash; + /// Notification of the remote peer. /// /// Set on each Set Endpoint ID call. Initially None. @@ -255,7 +275,7 @@ fn run(low_spawner: Spawner, logger: &'static multilog::MultiLog) { } #[cfg(feature = "pldm-file")] { - let pldm_file = pldm::pldm_file_task(router, &PEER_NOTIFY); + let pldm_file = pldm::pldm_file_task(router, &PEER_NOTIFY, hash); medium_spawner.must_spawn(pldm_file); } #[cfg(feature = "mctp-bench")] diff --git a/src/pldm.rs b/src/pldm.rs index 58707e0..9c8701a 100644 --- a/src/pldm.rs +++ b/src/pldm.rs @@ -8,12 +8,14 @@ use log::{debug, error, info, trace, warn}; use core::future::Future; +use core::mem::MaybeUninit; -use sha2::{Digest, Sha256}; +use static_cell::StaticCell; use pldm_file::PLDM_TYPE_FILE_TRANSFER; use pldm_platform::proto::PdrRecord; +use crate::SharedHash; use embassy_futures::select::select; use embassy_time::Duration; use mctp::{AsyncReqChannel, Eid}; @@ -45,15 +47,27 @@ pub trait PldmTimeout: Future + Sized { impl PldmTimeout for F {} +// Limited by MCTP message size, must be power of two +const PART_SIZE: usize = 4096; +// sram2 is not zeroed at boot, so need MaybeUninit. +#[link_section = ".sram2_uninit"] +static mut PART_BUF: MaybeUninit> = + MaybeUninit::uninit(); + #[embassy_executor::task] pub(crate) async fn pldm_file_task( router: &'static Router<'static>, peer: &'static SignalCS, + hash: &'static SharedHash, ) -> ! { info!("PLDM file task started"); - let mut host = None; + // Safety: will only be written once, no shared references. + #[allow(static_mut_refs)] + let part_buf = unsafe { PART_BUF.write(StaticCell::new()) }; + let part_buf = part_buf.init_with(|| [0u8; _]); + let mut host = None; loop { let target = match host.take() { Some(t) => t, @@ -63,7 +77,8 @@ pub(crate) async fn pldm_file_task( info!("Running PLDM file transfer from {target}"); let run = async { - if let Err(e) = pldm_run_file(target, router).await { + if let Err(e) = pldm_run_file(target, router, hash, part_buf).await + { warn!("Error running file transfer: {e}"); } }; @@ -117,7 +132,7 @@ async fn check_commands( info!("PLDM type {pldm_type} commands: {cmds:#02x?}"); for c in required_commands { if !cmds.contains(c) { - warn!("Required command {c:#02x} missing"); + warn!("Required type {pldm_type} command {c:#02x} missing"); } } } @@ -142,6 +157,8 @@ impl core::fmt::Display for Hex<'_> { async fn pldm_run_file( eid: Eid, router: &'static Router<'static>, + hash: &'static SharedHash, + part_buf: &mut [u8], ) -> Result<(), PldmError> { use pldm_file::client::*; use pldm_file::proto::*; @@ -241,7 +258,10 @@ async fn pldm_run_file( // NegotiateTransferParameters let req_types = [pldm_file::PLDM_TYPE_FILE_TRANSFER]; let (size, neg_types) = ctrq::negotiate_transfer_parameters( - comm, &req_types, &mut buf, 1024, + comm, + &req_types, + &mut buf, + PART_SIZE as u16, ) .await .inspect_err(|e| warn!("Error from Negotiate: {e}"))?; @@ -267,21 +287,35 @@ async fn pldm_run_file( info!("Reading entire file ({} bytes)...", filedesc.file_max_size); let start = embassy_time::Instant::now(); - let mut hash = Sha256::new(); + let mut hash = hash.lock().await; + let mut hash_ctx = hash.start( + embassy_stm32::hash::Algorithm::SHA256, + embassy_stm32::hash::DataType::Width8, + None, + ); let mut count = 0; - df_read_with(comm, fd, 0, filedesc.file_max_size as usize, |b| { - count += b.len(); - hash.update(b); - Ok(()) - }) + df_read_with( + comm, + fd, + 0, + filedesc.file_max_size as usize, + part_buf, + |b| { + count += b.len(); + hash.update_blocking(&mut hash_ctx, b); + Ok(()) + }, + ) .with_timeout(READ_TIMEOUT) .await? .inspect_err(|e| warn!("df_read failed {e}"))?; let time = start.elapsed().as_millis() as usize; - let kbyte_rate = count / time; + let kbyte_rate = count.checked_div(time).unwrap_or(0); + let mut digest = [0u8; 32]; + hash.finish_blocking(hash_ctx, &mut digest); info!("Transfer complete. total {count} bytes, {time} ms, {kbyte_rate} kB/s, sha256 {}", - Hex(&hash.finalize())); + Hex(&digest)); // File Close let attrs = DfCloseAttributes::empty(); diff --git a/xspiloader/Cargo.toml b/xspiloader/Cargo.toml index 6d59b1f..2f4bb50 100644 --- a/xspiloader/Cargo.toml +++ b/xspiloader/Cargo.toml @@ -8,9 +8,7 @@ license = "MIT OR Apache-2.0" embassy-executor = { workspace = true, features = [ "arch-cortex-m", "log", ] } - -# Need unreleased embassy-stm32 for xspi external flash driver -embassy-stm32 = { git = "https://github.com/embassy-rs/embassy", rev = "bdeeb388fff2462cccf82cf4f8444c0419db5525", features = ["stm32h7s3l8", "unstable-pac", "log"] } +embassy-stm32 = { workspace = true } log = { workspace = true, features = ["release_max_level_info"] } rtt-target = { workspace = true, features = ["log"] }