diff --git a/examples/esp32c6/Cargo.lock b/examples/esp32c6/Cargo.lock
index 395d50fda95..dd1706bee2b 100644
--- a/examples/esp32c6/Cargo.lock
+++ b/examples/esp32c6/Cargo.lock
@@ -1,42 +1,18 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
-version = 3
-
-[[package]]
-name = "adler"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
-
-[[package]]
-name = "aho-corasick"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
-dependencies = [
- "memchr",
-]
+version = 4
[[package]]
name = "anyhow"
-version = "1.0.81"
+version = "1.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247"
-
-[[package]]
-name = "atomic-polyfill"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4"
-dependencies = [
- "critical-section",
-]
+checksum = "6b964d184e89d9b6b67dd2715bc8e74cf3107fb2b529990c90cf517326150bf4"
[[package]]
name = "autocfg"
-version = "1.1.0"
+version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]]
name = "bare-metal"
@@ -55,15 +31,21 @@ dependencies = [
[[package]]
name = "bitfield"
-version = "0.14.0"
+version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac"
+checksum = "f798d2d157e547aa99aab0967df39edd0b70307312b6f8bd2848e6abe40896e0"
[[package]]
name = "bitflags"
-version = "2.5.0"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
+checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
+
+[[package]]
+name = "bytemuck"
+version = "1.21.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3"
[[package]]
name = "byteorder"
@@ -78,38 +60,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
-name = "core-isa-parser"
-version = "0.2.0"
+name = "chrono"
+version = "0.4.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23ec98e54b735872e54b2335c2e5a5c7fa7d9c3bfd45500f75280f84089a0083"
+checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825"
dependencies = [
- "anyhow",
- "enum-as-inner",
- "regex",
- "strum 0.24.1",
- "strum_macros 0.24.3",
-]
-
-[[package]]
-name = "crc32fast"
-version = "1.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa"
-dependencies = [
- "cfg-if",
+ "num-traits",
]
[[package]]
name = "critical-section"
-version = "1.1.2"
+version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216"
+checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b"
[[package]]
name = "darling"
-version = "0.20.8"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391"
+checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989"
dependencies = [
"darling_core",
"darling_macro",
@@ -117,56 +86,118 @@ dependencies = [
[[package]]
name = "darling_core"
-version = "0.20.8"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f"
+checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim",
- "syn 2.0.53",
+ "syn",
]
[[package]]
name = "darling_macro"
-version = "0.20.8"
+version = "0.20.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f"
+checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core",
"quote",
- "syn 2.0.53",
+ "syn",
]
[[package]]
-name = "derive_more"
-version = "0.99.17"
+name = "delegate"
+version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
+checksum = "297806318ef30ad066b15792a8372858020ae3ca2e414ee6c2133b1eb9e9e945"
dependencies = [
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn",
]
[[package]]
name = "document-features"
-version = "0.2.8"
+version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef5282ad69563b5fc40319526ba27e0e7363d552a896f0297d54f767717f9b95"
+checksum = "95249b50c6c185bee49034bcb378a49dc2b5dff0be90ff6616d31d64febab05d"
dependencies = [
"litrs",
]
[[package]]
-name = "embedded-dma"
+name = "embassy-embedded-hal"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41fea5ef5bed4d3468dfd44f5c9fa4cda8f54c86d4fb4ae683eacf9d39e2ea12"
+dependencies = [
+ "embassy-futures",
+ "embassy-sync",
+ "embassy-time",
+ "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-futures"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1f878075b9794c1e4ac788c95b728f26aa6366d32eeb10c7051389f898f7d067"
+
+[[package]]
+name = "embassy-sync"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8d2c8cdff05a7a51ba0087489ea44b0b1d97a296ca6b1d6d1a33ea7423d34049"
+dependencies = [
+ "cfg-if",
+ "critical-section",
+ "embedded-io-async",
+ "futures-sink",
+ "futures-util",
+ "heapless",
+]
+
+[[package]]
+name = "embassy-time"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f820157f198ada183ad62e0a66f554c610cdcd1a9f27d4b316358103ced7a1f8"
+dependencies = [
+ "cfg-if",
+ "critical-section",
+ "document-features",
+ "embassy-time-driver",
+ "embedded-hal 0.2.7",
+ "embedded-hal 1.0.0",
+ "embedded-hal-async",
+ "futures-util",
+]
+
+[[package]]
+name = "embassy-time-driver"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "994f7e5b5cb23521c22304927195f236813053eb9c065dd2226a32ba64695446"
+checksum = "8d45f5d833b6d98bd2aab0c2de70b18bfaa10faf661a1578fd8e5dfb15eb7eba"
dependencies = [
- "stable_deref_trait",
+ "document-features",
+]
+
+[[package]]
+name = "embedded-can"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e9d2e857f87ac832df68fa498d18ddc679175cf3d2e4aa893988e5601baf9438"
+dependencies = [
+ "nb 1.1.0",
]
[[package]]
@@ -186,133 +217,219 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "361a90feb7004eca4019fb28352a9465666b24f840f5c3cddf0ff13920590b89"
[[package]]
-name = "enum-as-inner"
-version = "0.4.0"
+name = "embedded-hal-async"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21cdad81446a7f7dc43f6a77409efeb9733d2fa65553efef6018ef257c959b73"
+checksum = "0c4c685bbef7fe13c3c6dd4da26841ed3980ef33e841cddfa15ce8a8fb3f1884"
+dependencies = [
+ "embedded-hal 1.0.0",
+]
+
+[[package]]
+name = "embedded-hal-nb"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fba4268c14288c828995299e59b12babdbe170f6c6d73731af1b4648142e8605"
+dependencies = [
+ "embedded-hal 1.0.0",
+ "nb 1.1.0",
+]
+
+[[package]]
+name = "embedded-io"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
+
+[[package]]
+name = "embedded-io-async"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3ff09972d4073aa8c299395be75161d582e7629cd663171d62af73c8d50dba3f"
+dependencies = [
+ "embedded-io",
+]
+
+[[package]]
+name = "embedded-storage"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a21dea9854beb860f3062d10228ce9b976da520a73474aed3171ec276bc0c032"
+
+[[package]]
+name = "embedded-storage-async"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1763775e2323b7d5f0aa6090657f5e21cfa02ede71f5dc40eead06d64dcd15cc"
+dependencies = [
+ "embedded-storage",
+]
+
+[[package]]
+name = "enum-as-inner"
+version = "0.6.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc"
dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn",
]
[[package]]
name = "enumset"
-version = "1.1.3"
+version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "226c0da7462c13fb57e5cc9e0dc8f0635e7d27f276a3a7fd30054647f669007d"
+checksum = "d07a4b049558765cef5f0c1a273c3fc57084d768b44d2f98127aef4cceb17293"
dependencies = [
"enumset_derive",
]
[[package]]
name = "enumset_derive"
-version = "0.8.1"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af"
+checksum = "59c3b24c345d8c314966bdc1832f6c2635bfcce8e7cf363bd115987bba2ee242"
dependencies = [
"darling",
"proc-macro2",
"quote",
- "syn 2.0.53",
+ "syn",
]
[[package]]
name = "equivalent"
-version = "1.0.1"
+version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "esp-backtrace"
-version = "0.11.1"
+version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dda6c53c50ed96cce44e8565bd7659f8884d55bac3262184c3a77f748553e3ff"
+checksum = "e4cd70abe47945c9116972781b5c05277ad855a5f5569fe2afd3e2e61a103cc0"
dependencies = [
+ "esp-build",
"esp-println",
]
[[package]]
-name = "esp-hal"
-version = "0.16.1"
+name = "esp-build"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cc3e9b3333d2ae42f5c9b4890e162cb756fb1b067ab5f642b89fc9f29be424fa"
+checksum = "8aa1c8f9954c9506699cf1ca10a2adcc226ff10b6ae3cb9e875cf2c6a0b9a372"
+dependencies = [
+ "quote",
+ "syn",
+ "termcolor",
+]
+
+[[package]]
+name = "esp-config"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "158dba334d3a2acd8d93873c0ae723ca1037cc78eefe5d6b4c5919b0ca28e38e"
+dependencies = [
+ "document-features",
+]
+
+[[package]]
+name = "esp-hal"
+version = "0.23.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a573175c540fd1d21a9cf07b0dee286b5a8f4cfde4b35da0f4f4657de7942c45"
dependencies = [
"basic-toml",
"bitfield",
"bitflags",
+ "bytemuck",
"cfg-if",
+ "chrono",
"critical-section",
+ "delegate",
"document-features",
- "embedded-dma",
- "embedded-hal 0.2.7",
+ "embassy-embedded-hal",
+ "embassy-futures",
+ "embassy-sync",
+ "embedded-can",
+ "embedded-hal 1.0.0",
+ "embedded-hal-async",
+ "embedded-hal-nb",
+ "embedded-io",
+ "embedded-io-async",
"enumset",
+ "esp-build",
+ "esp-config",
"esp-hal-procmacros",
+ "esp-metadata",
"esp-riscv-rt",
- "esp32",
- "esp32c2",
- "esp32c3",
"esp32c6",
- "esp32h2",
- "esp32p4",
- "esp32s2",
- "esp32s3",
"fugit",
+ "instability",
"nb 1.1.0",
"paste",
"portable-atomic",
"rand_core",
- "riscv",
+ "riscv 0.12.1",
"serde",
- "strum 0.26.2",
+ "strum",
+ "ufmt-write",
"void",
+ "xtensa-lx",
"xtensa-lx-rt",
]
[[package]]
name = "esp-hal-procmacros"
-version = "0.9.0"
+version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05084ecf8446fe60e0aff6c3873c96dca56dc383a449324ca555edbb80ae60c0"
+checksum = "e4a3297005c2b31cd00e2ba50037edc9bddf99da3afe1c97a2d1b0165a312eab"
dependencies = [
"darling",
"document-features",
"litrs",
"object",
"proc-macro-crate",
- "proc-macro-error",
+ "proc-macro-error2",
"proc-macro2",
"quote",
- "syn 2.0.53",
+ "syn",
+]
+
+[[package]]
+name = "esp-metadata"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb15c17e50f4cccb0d88305c19eae2d5533d750f0a05b6a05f1c99864974758e"
+dependencies = [
+ "anyhow",
+ "basic-toml",
+ "serde",
+ "strum",
]
[[package]]
name = "esp-println"
-version = "0.9.1"
+version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e98f0f58453dd2ce08d99228fc8757fad39d05dfd26643665d1093b8844f42cc"
-
-[[package]]
-name = "esp-riscv-rt"
-version = "0.7.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e599762d31156fa2322db4d5a0784c13b6122b79c1fa7bed70953de2f7d731f1"
+checksum = "960703930f9f3c899ddedd122ea27a09d6a612c22323157e524af5b18876448e"
dependencies = [
- "document-features",
- "riscv",
- "riscv-rt-macros",
+ "critical-section",
+ "esp-build",
+ "log",
+ "portable-atomic",
]
[[package]]
-name = "esp32"
-version = "0.29.0"
+name = "esp-riscv-rt"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "343ac30c4537d3f8526490db4264091a9785a55bcdfc22fc34482751a501d8d2"
+checksum = "94aca65db6157aa5f42d9df6595b21462f28207ca4230b799aa3620352ef6a72"
dependencies = [
- "critical-section",
- "vcell",
- "xtensa-lx",
+ "document-features",
+ "riscv 0.12.1",
+ "riscv-rt-macros",
]
[[package]]
@@ -324,90 +441,19 @@ dependencies = [
"esp-println",
"esp32c6",
"rtic",
-]
-
-[[package]]
-name = "esp32c2"
-version = "0.18.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55e30c9147b7a1f388887dfd2fe7da4d6159a0248603674af5f3a5282a46cd11"
-dependencies = [
- "critical-section",
- "vcell",
-]
-
-[[package]]
-name = "esp32c3"
-version = "0.21.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a7ee710c1e4f16b5e840cdfec3f4e7642b7517a877c5c4b7e1cafa9a14117c5"
-dependencies = [
- "critical-section",
- "vcell",
+ "rtic-monotonics",
]
[[package]]
name = "esp32c6"
-version = "0.12.0"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ff0275425ea3a7675b7b5903163a93b65e8ce5b9c8a7749ed397279ed2ade3e3"
+checksum = "fd38a7771b65cb640cc4a79324a6301ba4ac3bf2987caca5d3aa34492238fdb9"
dependencies = [
"critical-section",
"vcell",
]
-[[package]]
-name = "esp32h2"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e606c8e60d3e68afda997fa9fcc8d8fe1d2e3c172505bb03eb9ab79b4bca4d6a"
-dependencies = [
- "critical-section",
- "vcell",
-]
-
-[[package]]
-name = "esp32p4"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c03c0bc7973e6805e3c3c3c979e9418ba30380d8c16989a477440dbce8cf1965"
-dependencies = [
- "critical-section",
- "vcell",
-]
-
-[[package]]
-name = "esp32s2"
-version = "0.20.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0fbcb8e9a4097fbf1c455fc776ad46a4bb7861d5bad3c3cd4549b666ad906ce4"
-dependencies = [
- "critical-section",
- "vcell",
- "xtensa-lx",
-]
-
-[[package]]
-name = "esp32s3"
-version = "0.24.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "044e216560a33aa5d6c98163c8ae4278845ec3bae7b9cab520da0697be4f23a6"
-dependencies = [
- "critical-section",
- "vcell",
- "xtensa-lx",
-]
-
-[[package]]
-name = "flate2"
-version = "1.0.28"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e"
-dependencies = [
- "crc32fast",
- "miniz_oxide",
-]
-
[[package]]
name = "fnv"
version = "1.0.7"
@@ -423,6 +469,36 @@ dependencies = [
"gcd",
]
+[[package]]
+name = "futures-core"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
+
+[[package]]
+name = "futures-sink"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
+
+[[package]]
+name = "futures-task"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
+
+[[package]]
+name = "futures-util"
+version = "0.3.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "pin-project-lite",
+ "pin-utils",
+]
+
[[package]]
name = "gcd"
version = "2.3.0"
@@ -430,16 +506,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d758ba1b47b00caf47f24925c0074ecb20d6dfcffe7f6d53395c0465674841a"
[[package]]
-name = "hashbrown"
-version = "0.14.3"
+name = "hash32"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604"
+checksum = "47d60b12902ba28e2730cd37e95b8c9223af2808df9e902d4df49588d1470606"
+dependencies = [
+ "byteorder",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.15.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
+
+[[package]]
+name = "heapless"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bfb9eb618601c89945a70e254898da93b13be0388091d42117462b265bb3fad"
+dependencies = [
+ "hash32",
+ "stable_deref_trait",
+]
[[package]]
name = "heck"
-version = "0.4.1"
+version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "ident_case"
@@ -449,14 +544,33 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
[[package]]
name = "indexmap"
-version = "2.2.5"
+version = "2.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4"
+checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652"
dependencies = [
"equivalent",
"hashbrown",
]
+[[package]]
+name = "indoc"
+version = "2.0.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
+
+[[package]]
+name = "instability"
+version = "0.3.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf9fed6d91cfb734e7476a06bde8300a1b94e217e1b523b6f0cd1a01998c71d"
+dependencies = [
+ "darling",
+ "indoc",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
[[package]]
name = "litrs"
version = "0.4.1"
@@ -467,45 +581,26 @@ dependencies = [
]
[[package]]
-name = "lock_api"
-version = "0.4.11"
+name = "log"
+version = "0.4.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45"
-dependencies = [
- "autocfg",
- "scopeguard",
-]
+checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
[[package]]
name = "memchr"
-version = "2.7.1"
+version = "2.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
+checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
[[package]]
name = "minijinja"
-version = "1.0.14"
+version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fe5b00f90b3542f74bb9aaaccd2627920c16367787de103883461365580e5481"
+checksum = "cff7b8df5e85e30b87c2b0b3f58ba3a87b68e133738bf512a7713769326dbca9"
dependencies = [
"serde",
]
-[[package]]
-name = "miniz_oxide"
-version = "0.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7"
-dependencies = [
- "adler",
-]
-
-[[package]]
-name = "mutex-trait"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b4bb1638d419e12f8b1c43d9e639abd0d1424285bdea2f76aa231e233c63cd3a"
-
[[package]]
name = "nb"
version = "0.1.3"
@@ -522,75 +617,92 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d5439c4ad607c3c23abf66de8c8bf57ba8adcd1f129e699851a6e43935d339d"
[[package]]
-name = "object"
-version = "0.33.0"
+name = "num-traits"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d8dd6c0cdf9429bce006e1362bfce61fa1bfd8c898a643ed8d2b471934701d3d"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "object"
+version = "0.36.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87"
dependencies = [
- "flate2",
"memchr",
- "ruzstd",
]
[[package]]
name = "paste"
-version = "1.0.14"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c"
+checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
+
+[[package]]
+name = "pin-utils"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
[[package]]
name = "portable-atomic"
-version = "1.6.0"
+version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0"
+checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
[[package]]
name = "proc-macro-crate"
-version = "3.1.0"
+version = "3.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284"
+checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b"
dependencies = [
"toml_edit",
]
[[package]]
-name = "proc-macro-error"
-version = "1.0.4"
+name = "proc-macro-error-attr2"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
+checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5"
dependencies = [
- "proc-macro-error-attr",
"proc-macro2",
"quote",
- "syn 1.0.109",
- "version_check",
]
[[package]]
-name = "proc-macro-error-attr"
-version = "1.0.4"
+name = "proc-macro-error2"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
+checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802"
dependencies = [
+ "proc-macro-error-attr2",
"proc-macro2",
"quote",
- "version_check",
+ "syn",
]
[[package]]
name = "proc-macro2"
-version = "1.0.79"
+version = "1.0.93"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e"
+checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.35"
+version = "1.0.38"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
+checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
dependencies = [
"proc-macro2",
]
@@ -607,69 +719,92 @@ version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
-[[package]]
-name = "regex"
-version = "1.10.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-automata",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-automata"
-version = "0.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.8.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
-
[[package]]
name = "riscv"
-version = "0.11.1"
+version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f5c1b8bf41ea746266cdee443d1d1e9125c86ce1447e1a2615abd34330d33a9"
+checksum = "5ea8ff73d3720bdd0a97925f0bf79ad2744b6da8ff36be3840c48ac81191d7a7"
dependencies = [
"critical-section",
"embedded-hal 1.0.0",
+ "paste",
+ "riscv-macros 0.1.0",
+ "riscv-pac",
]
[[package]]
-name = "riscv-rt-macros"
-version = "0.2.1"
+name = "riscv"
+version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8d100d466dbb76681ef6a9386f3da9abc570d57394e86da0ba5af8c4408486d"
+checksum = "afa3cdbeccae4359f6839a00e8b77e5736caa200ba216caf38d24e4c16e2b586"
+dependencies = [
+ "critical-section",
+ "embedded-hal 1.0.0",
+ "paste",
+ "riscv-macros 0.2.0",
+ "riscv-pac",
+]
+
+[[package]]
+name = "riscv-macros"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f265be5d634272320a7de94cea15c22a3bfdd4eb42eb43edc528415f066a1f25"
dependencies = [
"proc-macro2",
"quote",
- "syn 1.0.109",
+ "syn",
+]
+
+[[package]]
+name = "riscv-macros"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e8c4aa1ea1af6dcc83a61be12e8189f9b293c3ba5a487778a4cd89fb060fdbbc"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "riscv-pac"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8188909339ccc0c68cfb5a04648313f09621e8b87dc03095454f1a11f6c5d436"
+
+[[package]]
+name = "riscv-rt-macros"
+version = "0.2.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "30f19a85fe107b65031e0ba8ec60c34c2494069fe910d6c297f5e7cb5a6f76d0"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
]
[[package]]
name = "rtic"
-version = "2.1.1"
+version = "2.1.2"
dependencies = [
- "atomic-polyfill",
"bare-metal",
"critical-section",
"esp32c6",
- "riscv",
+ "portable-atomic",
+ "riscv 0.13.0",
"rtic-core",
"rtic-macros",
]
+[[package]]
+name = "rtic-common"
+version = "1.0.1"
+dependencies = [
+ "critical-section",
+ "portable-atomic",
+]
+
[[package]]
name = "rtic-core"
version = "1.0.0"
@@ -678,65 +813,72 @@ checksum = "d9369355b04d06a3780ec0f51ea2d225624db777acbc60abd8ca4832da5c1a42"
[[package]]
name = "rtic-macros"
-version = "2.1.0"
+version = "2.1.2"
dependencies = [
"indexmap",
- "proc-macro-error",
+ "proc-macro-error2",
"proc-macro2",
"quote",
- "syn 2.0.53",
+ "syn",
+]
+
+[[package]]
+name = "rtic-monotonics"
+version = "2.0.3"
+dependencies = [
+ "cfg-if",
+ "esp32c6",
+ "fugit",
+ "portable-atomic",
+ "riscv 0.13.0",
+ "rtic-time",
+]
+
+[[package]]
+name = "rtic-time"
+version = "2.0.0"
+dependencies = [
+ "critical-section",
+ "embedded-hal 1.0.0",
+ "embedded-hal-async",
+ "fugit",
+ "futures-util",
+ "rtic-common",
]
[[package]]
name = "rustversion"
-version = "1.0.14"
+version = "1.0.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4"
-
-[[package]]
-name = "ruzstd"
-version = "0.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5174a470eeb535a721ae9fdd6e291c2411a906b96592182d05217591d5c5cf7b"
-dependencies = [
- "byteorder",
- "derive_more",
- "twox-hash",
-]
-
-[[package]]
-name = "scopeguard"
-version = "1.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
+checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
[[package]]
name = "serde"
-version = "1.0.197"
+version = "1.0.218"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2"
+checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.197"
+version = "1.0.218"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b"
+checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.53",
+ "syn",
]
[[package]]
-name = "spin"
-version = "0.9.8"
+name = "serde_spanned"
+version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
dependencies = [
- "lock_api",
+ "serde",
]
[[package]]
@@ -745,64 +887,39 @@ version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
-[[package]]
-name = "static_assertions"
-version = "1.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
-
[[package]]
name = "strsim"
-version = "0.10.0"
+version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "strum"
-version = "0.24.1"
+version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f"
-
-[[package]]
-name = "strum"
-version = "0.26.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29"
+checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
dependencies = [
- "strum_macros 0.26.2",
+ "strum_macros",
]
[[package]]
name = "strum_macros"
-version = "0.24.3"
+version = "0.26.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59"
+checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
dependencies = [
"heck",
"proc-macro2",
"quote",
"rustversion",
- "syn 1.0.109",
-]
-
-[[package]]
-name = "strum_macros"
-version = "0.26.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946"
-dependencies = [
- "heck",
- "proc-macro2",
- "quote",
- "rustversion",
- "syn 2.0.53",
+ "syn",
]
[[package]]
name = "syn"
-version = "1.0.109"
+version = "2.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
+checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1"
dependencies = [
"proc-macro2",
"quote",
@@ -810,48 +927,59 @@ dependencies = [
]
[[package]]
-name = "syn"
-version = "2.0.53"
+name = "termcolor"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032"
+checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
+ "winapi-util",
+]
+
+[[package]]
+name = "toml"
+version = "0.8.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148"
+dependencies = [
+ "serde",
+ "serde_spanned",
+ "toml_datetime",
+ "toml_edit",
]
[[package]]
name = "toml_datetime"
-version = "0.6.5"
+version = "0.6.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1"
+checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
+dependencies = [
+ "serde",
+]
[[package]]
name = "toml_edit"
-version = "0.21.1"
+version = "0.22.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1"
+checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474"
dependencies = [
"indexmap",
+ "serde",
+ "serde_spanned",
"toml_datetime",
"winnow",
]
[[package]]
-name = "twox-hash"
-version = "1.6.3"
+name = "ufmt-write"
+version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
-dependencies = [
- "cfg-if",
- "static_assertions",
-]
+checksum = "e87a2ed6b42ec5e28cc3b94c09982969e9227600b2e3dcbc1db927a84c06bd69"
[[package]]
name = "unicode-ident"
-version = "1.0.12"
+version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
+checksum = "00e2473a93778eb0bad35909dff6a10d28e63f792f16ed15e404fca9d5eeedbe"
[[package]]
name = "vcell"
@@ -859,12 +987,6 @@ version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77439c1b53d2303b20d9459b1ade71a83c716e3f9c34f3228c00e6f185d6c002"
-[[package]]
-name = "version_check"
-version = "0.9.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
-
[[package]]
name = "void"
version = "1.0.2"
@@ -872,46 +994,132 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
[[package]]
-name = "winnow"
-version = "0.5.40"
+name = "winapi-util"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"
+checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "windows-sys"
+version = "0.59.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
+dependencies = [
+ "windows-targets",
+]
+
+[[package]]
+name = "windows-targets"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+dependencies = [
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
+]
+
+[[package]]
+name = "windows_aarch64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
+
+[[package]]
+name = "windows_aarch64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+
+[[package]]
+name = "windows_i686_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+
+[[package]]
+name = "windows_i686_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+
+[[package]]
+name = "windows_i686_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+
+[[package]]
+name = "windows_x86_64_gnu"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+
+[[package]]
+name = "windows_x86_64_gnullvm"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+
+[[package]]
+name = "windows_x86_64_msvc"
+version = "0.52.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+
+[[package]]
+name = "winnow"
+version = "0.7.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1"
dependencies = [
"memchr",
]
[[package]]
name = "xtensa-lx"
-version = "0.9.0"
+version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e758f94e1a1f71758f94052a2766dcb12604998eb372b8b2e30576e3ab1ba1e6"
+checksum = "51cbb46c78cfd284c9378070ab90bae9d14d38b3766cb853a97c0a137f736d5b"
dependencies = [
- "bare-metal",
- "mutex-trait",
- "spin",
+ "critical-section",
+ "document-features",
]
[[package]]
name = "xtensa-lx-rt"
-version = "0.16.0"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "904102108b780c9a5e3275c5f3c63dc348ec43ae5da5237868515498b447d51a"
+checksum = "689c2ef159d9cd4fc9503603e9999968a84a30db9bde0f0f880d0cceea0190a9"
dependencies = [
- "bare-metal",
- "core-isa-parser",
+ "anyhow",
+ "document-features",
+ "enum-as-inner",
"minijinja",
"r0",
+ "serde",
+ "strum",
+ "toml",
+ "xtensa-lx",
"xtensa-lx-rt-proc-macros",
]
[[package]]
name = "xtensa-lx-rt-proc-macros"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "082cdede098bbec9af15b0e74085e5f3d16f2923597de7aed7b8112003af2da7"
+checksum = "11277b1e4cbb7ffe44678c668518b249c843c81df249b8f096701757bc50d7ee"
dependencies = [
"darling",
"proc-macro2",
"quote",
- "syn 2.0.53",
+ "syn",
]
diff --git a/examples/esp32c6/Cargo.toml b/examples/esp32c6/Cargo.toml
index b53aaeebd95..3e92817c0ea 100644
--- a/examples/esp32c6/Cargo.toml
+++ b/examples/esp32c6/Cargo.toml
@@ -7,18 +7,19 @@ license = "MIT OR Apache-2.0"
[workspace]
[dependencies]
-rtic = {path = "../../rtic/"}
-esp-hal = { version = "0.16.1", features = ["esp32c6", "direct-vectoring", "interrupt-preemption"] }
-esp-backtrace = { version = "0.11.0", features = [
+rtic = { path = "../../rtic/" }
+rtic-monotonics = {path = "../../rtic-monotonics/"}
+esp-hal = { version = "0.23.1", features = ["esp32c6"] }
+esp-backtrace = { version = "0.15.1", features = [
"esp32c6",
"panic-handler",
"exception-handler",
"println",
] }
-esp32c6 = {version = "0.12.0", features = ["critical-section"]}
-esp-println = { version = "0.9.0", default-features=false, features = ["esp32c6", "uart"] }
+esp32c6 = {version = "0.18.0", features = ["critical-section"]}
+esp-println = { version = "0.13.1", features = ["esp32c6", "auto"] }
[features]
test-critical-section = []
-riscv-esp32c6-backend = ["rtic/riscv-esp32c6-backend"]
+riscv-esp32c6-backend = ["rtic/riscv-esp32c6-backend", "rtic-monotonics/esp32c6-systimer"]
diff --git a/examples/esp32c6/README.md b/examples/esp32c6/README.md
index ac57914161f..883c0635c2f 100644
--- a/examples/esp32c6/README.md
+++ b/examples/esp32c6/README.md
@@ -1,4 +1,4 @@
-### ESP32-C3 RTIC template
+### ESP32-C6 RTIC template
This crate showcases a simple RTIC application for the ESP32-C6.
## Prerequisites
@@ -20,7 +20,7 @@ This crate uses the most convenient option in ``cargo-espflash`` and ``espflash`
should do the trick.
# Expected behavior
-The program
+The example ``sw_and_hw``
- Prints ``init``
- Enters a high prio task
- During the execution of the high prio task, the button should be non-functional
@@ -31,3 +31,9 @@ The program
- Exits the low prio task
- Prints ``idle``
+The example ``monotonic``
+- Prints ``init``
+- Spawns the ``foo``, ``bar``, ``baz`` tasks (because of hardware interrupt latency dispatch, the order here may vary).
+- Each task prints ``hello from $TASK`` on entry
+- The tasks wait for 1, 2, 3 seconds respectively
+- Once the wait period is over, each task exits printing ``bye from $TASK`` (now in the proper order).
diff --git a/examples/esp32c6/examples/monotonic.rs b/examples/esp32c6/examples/monotonic.rs
new file mode 100644
index 00000000000..8d53fb011ee
--- /dev/null
+++ b/examples/esp32c6/examples/monotonic.rs
@@ -0,0 +1,51 @@
+#![no_main]
+#![no_std]
+use esp_backtrace as _;
+#[rtic::app(device = esp32c6, dispatchers = [])]
+mod app {
+ use rtic_monotonics::esp32c6::prelude::*;
+ esp32c6_systimer_monotonic!(Mono);
+ use esp_hal as _;
+ use esp_println::println;
+
+ #[shared]
+ struct Shared {}
+
+ #[local]
+ struct Local {}
+
+ #[init]
+ fn init(cx: init::Context) -> (Shared, Local) {
+ println!("init");
+ let timer = cx.device.SYSTIMER;
+
+ Mono::start(timer);
+
+ foo::spawn().unwrap();
+ bar::spawn().unwrap();
+ baz::spawn().unwrap();
+
+ (Shared {}, Local {})
+ }
+
+ #[task]
+ async fn foo(_cx: foo::Context) {
+ println!("hello from foo");
+ Mono::delay(2_u64.secs()).await;
+ println!("bye from foo");
+ }
+
+ #[task]
+ async fn bar(_cx: bar::Context) {
+ println!("hello from bar");
+ Mono::delay(3_u64.secs()).await;
+ println!("bye from bar");
+ }
+
+ #[task]
+ async fn baz(_cx: baz::Context) {
+ println!("hello from baz");
+ Mono::delay(4_u64.secs()).await;
+ println!("bye from baz");
+ }
+}
diff --git a/examples/esp32c6/examples/sw_and_hw.rs b/examples/esp32c6/examples/sw_and_hw.rs
index c5343bc173b..7feb985d1a7 100644
--- a/examples/esp32c6/examples/sw_and_hw.rs
+++ b/examples/esp32c6/examples/sw_and_hw.rs
@@ -4,27 +4,23 @@
#[rtic::app(device = esp32c6, dispatchers=[FROM_CPU_INTR0, FROM_CPU_INTR1])]
mod app {
use esp_backtrace as _;
- use esp_hal::{
- gpio::{Event, Gpio9, Input, PullUp, IO},
- peripherals::Peripherals,
- prelude::*,
- };
+ use esp_hal::gpio::{Event, Input, Pull};
use esp_println::println;
+
#[shared]
struct Shared {}
#[local]
struct Local {
- button: Gpio9>,
+ button: Input<'static>,
}
// do nothing in init
#[init]
fn init(_: init::Context) -> (Shared, Local) {
println!("init");
- let peripherals = Peripherals::take();
- let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
- let mut button = io.pins.gpio9.into_pull_up_input();
+ let peripherals = esp_hal::init(esp_hal::Config::default());
+ let mut button = Input::new(peripherals.GPIO9, Pull::Up);
button.listen(Event::FallingEdge);
foo::spawn().unwrap();
(Shared {}, Local { button })
@@ -41,17 +37,18 @@ mod app {
bar::spawn().unwrap(); //enqueue low prio task
println!("Inside high prio task, press button now!");
let mut x = 0;
- while x < 5000000 {
+ while x < 50000000 {
x += 1; //burn cycles
esp_hal::riscv::asm::nop();
}
println!("Leaving high prio task.");
}
+
#[task(priority = 2)]
async fn bar(_: bar::Context) {
println!("Inside low prio task, press button now!");
let mut x = 0;
- while x < 5000000 {
+ while x < 50000000 {
x += 1; //burn cycles
esp_hal::riscv::asm::nop();
}
diff --git a/examples/esp32c6/rust-toolchain.toml b/examples/esp32c6/rust-toolchain.toml
index 446d6fe524f..236ba12da84 100644
--- a/examples/esp32c6/rust-toolchain.toml
+++ b/examples/esp32c6/rust-toolchain.toml
@@ -1,4 +1,4 @@
[toolchain]
channel = "nightly-2023-11-14"
components = ["rust-src"]
-targets = ["riscv32imc-unknown-none-elf"]
+targets = ["riscv32imac-unknown-none-elf"]
diff --git a/rtic-macros/src/codegen/bindings/esp32c6.rs b/rtic-macros/src/codegen/bindings/esp32c6.rs
index 65ea3848847..8e0af337d4f 100644
--- a/rtic-macros/src/codegen/bindings/esp32c6.rs
+++ b/rtic-macros/src/codegen/bindings/esp32c6.rs
@@ -86,23 +86,30 @@ mod esp32c6 {
}
stmts
}
+
pub fn pre_init_enable_interrupts(app: &App, analysis: &CodegenAnalysis) -> Vec {
let mut stmts = vec![];
let rt_err = util::rt_err_ident();
let max_prio: usize = 15; //unfortunately this is not part of pac, but we know that max prio is 15.
+ let min_prio: usize = 1;
let interrupt_ids = analysis.interrupts.iter().map(|(p, (id, _))| (p, id));
// Unmask interrupts and set their priorities
- for ((&priority, name), curr_cpu_id) in interrupt_ids.chain(
- app.hardware_tasks
- .values()
- .filter_map(|task| Some((&task.args.priority, &task.args.binds))),
- ).zip(EXTERNAL_INTERRUPTS) {
+ for ((&priority, name), curr_cpu_id) in interrupt_ids
+ .chain(
+ app.hardware_tasks
+ .values()
+ .filter_map(|task| Some((&task.args.priority, &task.args.binds))),
+ )
+ .zip(EXTERNAL_INTERRUPTS)
+ {
let es = format!(
"Maximum priority used by interrupt vector '{name}' is more than supported by hardware"
);
+ let es_zero = format!("Priority {priority} used by interrupt vector '{name}' is less than supported by hardware");
// Compile time assert that this priority is supported by the device
stmts.push(quote!(
const _: () = if (#max_prio) <= #priority as usize { ::core::panic!(#es); };
+ const _: () = if (#min_prio) > #priority as usize { ::core::panic!(#es_zero);};
));
stmts.push(quote!(
rtic::export::enable(
@@ -207,13 +214,11 @@ mod esp32c6 {
stmts
}
- pub fn async_prio_limit(app: &App, analysis: &CodegenAnalysis) -> Vec {
+ pub fn async_prio_limit(_app: &App, analysis: &CodegenAnalysis) -> Vec {
let max = if let Some(max) = analysis.max_async_prio {
quote!(#max)
} else {
- // No limit
- let device = &app.args.device;
- quote!(1 << #device::NVIC_PRIO_BITS)
+ quote!(u8::MAX) // No limit
};
vec![quote!(
@@ -222,6 +227,7 @@ mod esp32c6 {
static RTIC_ASYNC_MAX_LOGICAL_PRIO: u8 = #max;
)]
}
+
pub fn handler_config(
app: &App,
analysis: &CodegenAnalysis,
@@ -229,14 +235,20 @@ mod esp32c6 {
) -> Vec {
let mut stmts = vec![];
let interrupt_ids = analysis.interrupts.iter().map(|(p, (id, _))| (p, id));
- for ((_, name), curr_cpu_id) in interrupt_ids.chain(
- app.hardware_tasks
- .values()
- .filter_map(|task| Some((&task.args.priority, &task.args.binds))),
- ).zip(EXTERNAL_INTERRUPTS) {
- if *name == dispatcher_name {
- let ret = &("cpu_int_".to_owned() + &curr_cpu_id.to_string() + "_handler");
- stmts.push(quote!(#[export_name = #ret]));
+ for ((_, name), curr_cpu_id) in interrupt_ids
+ .chain(
+ app.hardware_tasks
+ .values()
+ .filter_map(|task| Some((&task.args.priority, &task.args.binds))),
+ )
+ .zip(EXTERNAL_INTERRUPTS)
+ {
+ // interrupt1...interrupt19 are already defined in esp_hal
+ if curr_cpu_id > 19 {
+ if *name == dispatcher_name {
+ let ret = &("interrupt".to_owned() + &curr_cpu_id.to_string());
+ stmts.push(quote!(#[export_name = #ret]));
+ }
}
}
diff --git a/rtic-monotonics/Cargo.toml b/rtic-monotonics/Cargo.toml
index 89f57bb180e..366cd833381 100644
--- a/rtic-monotonics/Cargo.toml
+++ b/rtic-monotonics/Cargo.toml
@@ -32,6 +32,7 @@ features = [
"stm32_tim5",
"stm32_tim15",
"esp32c3-systimer",
+ "esp32c6-systimer",
]
rustdoc-flags = ["--cfg", "docsrs"]
@@ -66,10 +67,9 @@ stm32-metapac = { version = "15.0.0", optional = true }
# i.MX RT
imxrt-ral = { version = "0.5.3", optional = true }
-
esp32c3 = {version = "0.28.0", optional = true }
-riscv = {version = "0.12.1", optional = true }
-
+esp32c6 = {version = "0.18.0", optional = true }
+riscv = {version = "0.13.0", optional = true }
[build-dependencies]
proc-macro2 = { version = "1.0.36", optional = true }
@@ -110,8 +110,9 @@ imxrt = ["dep:cortex-m", "dep:imxrt-ral"]
imxrt_gpt1 = ["imxrt"]
imxrt_gpt2 = ["imxrt"]
-# ESP32-C3 Timer
+# ESP32 Timers
esp32c3-systimer = ["dep:esp32c3", "dep:riscv"]
+esp32c6-systimer = ["dep:esp32c6", "dep:riscv"]
# STM32 timers
# Use as `features = ["stm32g081kb", "stm32_tim15"]`
diff --git a/rtic-monotonics/src/esp32c6.rs b/rtic-monotonics/src/esp32c6.rs
new file mode 100644
index 00000000000..60a81752963
--- /dev/null
+++ b/rtic-monotonics/src/esp32c6.rs
@@ -0,0 +1,187 @@
+//! [`Monotonic`](rtic_time::Monotonic) implementation for ESP32-C6's SYSTIMER.
+//!
+//! Always runs at a fixed rate of 16 MHz.
+//!
+//! # Example
+//!
+//! ```
+//! use rtic_monotonics::esp32c6::prelude::*;
+//!
+//! esp32c6_systimer_monotonic!(Mono);
+//!
+//! fn init() {
+//! # // This is normally provided by the selected PAC
+//! # let timer = unsafe { esp32c6::Peripherals::steal() }.SYSTIMER;
+//! #
+//! // Start the monotonic
+//! Mono::start(timer);
+//! }
+//!
+//! async fn usage() {
+//! loop {
+//! // Use the monotonic
+//! let timestamp = Mono::now();
+//! Mono::delay(100.millis()).await;
+//! }
+//! }
+//! ```
+
+/// Common definitions and traits for using the ESP32-C6 timer monotonic
+pub mod prelude {
+ pub use crate::esp32c6_systimer_monotonic;
+
+ pub use crate::Monotonic;
+
+ pub use fugit::{self, ExtU64, ExtU64Ceil};
+}
+use crate::TimerQueueBackend;
+use esp32c6::{INTERRUPT_CORE0, INTPRI, SYSTIMER};
+use rtic_time::timer_queue::TimerQueue;
+
+/// Timer implementing [`TimerQueueBackend`].
+pub struct TimerBackend;
+
+impl TimerBackend {
+ /// Starts the monotonic timer.
+ ///
+ /// **Do not use this function directly.**
+ ///
+ /// Use the prelude macros instead.
+ pub fn _start(timer: SYSTIMER) {
+ let interrupt_number = 57 as isize;
+ let cpu_interrupt_number = 31 as isize;
+
+ unsafe {
+ (INTERRUPT_CORE0::ptr() as *mut u32)
+ .offset(interrupt_number as isize)
+ .write_volatile(cpu_interrupt_number as u32);
+
+ // Set the interrupt's priority:
+ (*INTPRI::ptr())
+ .cpu_int_pri(cpu_interrupt_number as usize)
+ .write(|w| w.bits(15 as u32));
+
+ // Finally, enable the CPU interrupt:
+ (*INTPRI::ptr())
+ .cpu_int_enable()
+ .modify(|r, w| w.bits((1 << cpu_interrupt_number) | r.bits()));
+ }
+
+ timer.conf().write(|w| w.timer_unit0_work_en().set_bit());
+ timer
+ .conf()
+ .write(|w| w.timer_unit1_core0_stall_en().clear_bit());
+
+ TIMER_QUEUE.initialize(Self {})
+ }
+}
+
+static TIMER_QUEUE: TimerQueue = TimerQueue::new();
+use esp32c6;
+impl TimerQueueBackend for TimerBackend {
+ type Ticks = u64;
+ fn now() -> Self::Ticks {
+ let peripherals = unsafe { esp32c6::Peripherals::steal() };
+ peripherals
+ .SYSTIMER
+ .unit0_op()
+ .write(|w| w.update().set_bit());
+ // this must be polled until value is valid
+ while peripherals.SYSTIMER.unit0_op().read().value_valid() == false {}
+ let instant: u64 = (peripherals.SYSTIMER.unit_value(0).lo().read().bits() as u64)
+ | ((peripherals.SYSTIMER.unit_value(0).hi().read().bits() as u64) << 32);
+ instant
+ }
+
+ fn set_compare(instant: Self::Ticks) {
+ let systimer = unsafe { esp32c6::Peripherals::steal() }.SYSTIMER;
+ systimer
+ .target0_conf()
+ .write(|w| w.timer_unit_sel().set_bit());
+ systimer
+ .target0_conf()
+ .write(|w| w.period_mode().clear_bit());
+ systimer
+ .trgt(0)
+ .lo()
+ .write(|w| unsafe { w.bits((instant & 0xFFFFFFFF).try_into().unwrap()) });
+ systimer
+ .trgt(0)
+ .hi()
+ .write(|w| unsafe { w.bits((instant >> 32).try_into().unwrap()) });
+ systimer.comp0_load().write(|w| w.load().set_bit()); //sync period to comp register
+ systimer.conf().write(|w| w.target0_work_en().set_bit());
+ systimer.int_ena().write(|w| w.target0().set_bit());
+ }
+
+ fn clear_compare_flag() {
+ unsafe { esp32c6::Peripherals::steal() }
+ .SYSTIMER
+ .int_clr()
+ .write(|w| w.target0().bit(true));
+ }
+
+ fn pend_interrupt() {
+ extern "C" {
+ fn interrupt31();
+ }
+ //run the timer interrupt handler in a critical section to emulate a max priority
+ //interrupt.
+ //since there is no hardware support for pending a timer interrupt.
+ riscv::interrupt::disable();
+ unsafe { interrupt31() };
+ unsafe { riscv::interrupt::enable() };
+ }
+
+ fn timer_queue() -> &'static TimerQueue {
+ &TIMER_QUEUE
+ }
+}
+
+/// Create an ESP32-C6 SysTimer based monotonic and register the necessary interrupt for it.
+///
+/// See [`crate::esp32c6`] for more details.
+///
+/// # Arguments
+///
+/// * `name` - The name that the monotonic type will have.
+#[macro_export]
+macro_rules! esp32c6_systimer_monotonic {
+ ($name:ident) => {
+ /// A `Monotonic` based on the ESP32-C6 SysTimer peripheral.
+ pub struct $name;
+
+ impl $name {
+ /// Starts the `Monotonic`.
+ ///
+ /// This method must be called only once.
+ pub fn start(timer: esp32c6::SYSTIMER) {
+ #[export_name = "interrupt31"]
+ #[allow(non_snake_case)]
+ unsafe extern "C" fn Systimer() {
+ use $crate::TimerQueueBackend;
+ $crate::esp32c6::TimerBackend::timer_queue().on_monotonic_interrupt();
+ }
+
+ $crate::esp32c6::TimerBackend::_start(timer);
+ }
+ }
+
+ impl $crate::TimerQueueBasedMonotonic for $name {
+ type Backend = $crate::esp32c6::TimerBackend;
+ type Instant = $crate::fugit::Instant<
+ ::Ticks,
+ 1,
+ 16_000_000,
+ >;
+ type Duration = $crate::fugit::Duration<
+ ::Ticks,
+ 1,
+ 16_000_000,
+ >;
+ }
+
+ $crate::rtic_time::impl_embedded_hal_delay_fugit!($name);
+ $crate::rtic_time::impl_embedded_hal_async_delay_fugit!($name);
+ };
+}
diff --git a/rtic-monotonics/src/lib.rs b/rtic-monotonics/src/lib.rs
index 38f3b5380b7..a02ddb5e79c 100644
--- a/rtic-monotonics/src/lib.rs
+++ b/rtic-monotonics/src/lib.rs
@@ -54,6 +54,9 @@ pub use rtic_time::{
#[cfg(feature = "esp32c3-systimer")]
pub mod esp32c3;
+#[cfg(feature = "esp32c6-systimer")]
+pub mod esp32c6;
+
#[cfg(feature = "cortex-m-systick")]
pub mod systick;
diff --git a/rtic/Cargo.toml b/rtic/Cargo.toml
index c9a5287dceb..eeac81b78ac 100644
--- a/rtic/Cargo.toml
+++ b/rtic/Cargo.toml
@@ -28,7 +28,7 @@ name = "rtic"
riscv-slic = { version = "0.2.0", optional = true }
esp32c3 = { version = "0.28.0", optional = true }
esp32c6 = { version = "0.19.0", optional = true }
-riscv = { version = "0.12.1", optional = true }
+riscv = { version = "0.13.0", optional = true }
cortex-m = { version = "0.7.0", optional = true }
bare-metal = "1.0.0"
portable-atomic = { version = "1", default-features = false }
diff --git a/rtic/src/export/riscv_esp32c6.rs b/rtic/src/export/riscv_esp32c6.rs
index f1df3de6033..b06bf5d17d2 100644
--- a/rtic/src/export/riscv_esp32c6.rs
+++ b/rtic/src/export/riscv_esp32c6.rs
@@ -72,13 +72,13 @@ pub unsafe fn lock(ptr: *mut T, ceiling: u8, f: impl FnOnce(&mut T) -> R)
unsafe {
(*INTPRI::ptr())
.cpu_int_thresh()
- .write(|w| w.cpu_int_thresh().bits(ceiling + 1))
+ .write(|w| w.cpu_int_thresh().bits(ceiling + 1));
} //esp32c6 lets interrupts with prio equal to threshold through so we up it by one
let r = f(&mut *ptr);
unsafe {
(*INTPRI::ptr())
.cpu_int_thresh()
- .write(|w| w.cpu_int_thresh().bits(current))
+ .write(|w| w.cpu_int_thresh().bits(current));
}
r
}
@@ -107,7 +107,7 @@ pub fn pend(int: Interrupt) {
.cpu_intr_from_cpu_3()
.write(|w| w.cpu_intr_from_cpu_3().bit(true)),
_ => panic!("Unsupported software interrupt"), //should never happen, checked at compile time
- }
+ };
}
}
@@ -133,29 +133,25 @@ pub fn unpend(int: Interrupt) {
.cpu_intr_from_cpu_3()
.write(|w| w.cpu_intr_from_cpu_3().bit(false)),
_ => panic!("Unsupported software interrupt"),
- }
+ };
}
}
pub fn enable(int: Interrupt, prio: u8, cpu_int_id: u8) {
- const INTERRUPT_MAP_BASE: *mut u32 =
- unsafe { core::mem::transmute::<_, *mut u32>(INTERRUPT_CORE0::ptr()) };
- let interrupt_number = int as isize;
- let cpu_interrupt_number = cpu_int_id as isize;
-
unsafe {
- let intr_map_base = INTERRUPT_MAP_BASE as *mut u32;
- intr_map_base
- .offset(interrupt_number)
- .write_volatile(cpu_interrupt_number as u32);
+ // Map the peripheral interrupt to a CPU interrupt:
+ (INTERRUPT_CORE0::ptr() as *mut u32)
+ .offset(int as isize)
+ .write_volatile(cpu_int_id as u32);
- let intr_prio_base = (*INTPRI::ptr()).cpu_int_pri_0().as_ptr();
- intr_prio_base
- .offset(cpu_interrupt_number)
- .write_volatile(prio as u32);
+ // Set the interrupt's priority:
+ (*INTPRI::ptr())
+ .cpu_int_pri(cpu_int_id as usize)
+ .write(|w| w.bits(prio as u32));
+ // Finally, enable the CPU interrupt:
(*INTPRI::ptr())
.cpu_int_enable()
- .modify(|r, w| w.bits((1 << cpu_interrupt_number) | r.bits()));
+ .modify(|r, w| w.bits((1 << cpu_int_id) | r.bits()));
}
}
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index fe0c92a05ae..93283c11741 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -1,4 +1,4 @@
[toolchain]
channel = "stable"
components = [ "rust-src", "rustfmt", "llvm-tools-preview" ]
-targets = [ "thumbv6m-none-eabi", "thumbv7m-none-eabi", "thumbv8m.base-none-eabi", "thumbv8m.main-none-eabi" ]
+targets = [ "thumbv6m-none-eabi", "thumbv7m-none-eabi", "thumbv8m.base-none-eabi", "thumbv8m.main-none-eabi", "riscv32imc-unknown-none-elf" ]