Restart xiao project

This commit is contained in:
Invariantspace 2025-06-22 13:54:55 -05:00 committed by macronova
parent dfb4b1e765
commit 574d4d08bc
Signed by: macronova
GPG key ID: CE969670FB4B4A56
9 changed files with 91 additions and 1988 deletions

200
flake.lock generated
View file

@ -9,16 +9,20 @@
"devenv" "devenv"
], ],
"git-hooks": [ "git-hooks": [
"devenv" "devenv",
"git-hooks"
], ],
"nixpkgs": "nixpkgs" "nixpkgs": [
"devenv",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1742042642, "lastModified": 1748883665,
"narHash": "sha256-D0gP8srrX0qj+wNYNPdtVJsQuFzIng3q43thnHXQ/es=", "narHash": "sha256-R0W7uAg+BLoHjMRMQ8+oiSbTq8nkGz5RDpQ+ZfxxP3A=",
"owner": "cachix", "owner": "cachix",
"repo": "cachix", "repo": "cachix",
"rev": "a624d3eaf4b1d225f918de8543ed739f2f574203", "rev": "f707778d902af4d62d8dd92c269f8e70de09acbe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -34,14 +38,14 @@
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"git-hooks": "git-hooks", "git-hooks": "git-hooks",
"nix": "nix", "nix": "nix",
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1745604263, "lastModified": 1750615580,
"narHash": "sha256-aima9vLLpnVH3vyoCsgsoEZLo5ZPceQkCeQk77J9Bz4=", "narHash": "sha256-8ucRXBCG5vA1nHCH1agRDBZaiuPKuqb/RsPxQEsHeVk=",
"owner": "cachix", "owner": "cachix",
"repo": "devenv", "repo": "devenv",
"rev": "36807c727e743e7a00999922e7f737a0cc4e05ac", "rev": "e5dfaa34eed24f1ec79e99624666b15f51c4be97",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -53,14 +57,14 @@
"espkgs": { "espkgs": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_4" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1738140586, "lastModified": 1746690306,
"narHash": "sha256-Vn4PD4eH18QklgDY1vnjXJqNPmP3SJNejcBroW0yTTA=", "narHash": "sha256-bMp4BCrTOX7VDLVU8TzMSQj1hviBrARz9iiqNq6Vbnk=",
"owner": "mirrexagon", "owner": "mirrexagon",
"repo": "nixpkgs-esp-dev", "repo": "nixpkgs-esp-dev",
"rev": "29517b39abe729e04118bf77af526f9947f6c476", "rev": "6c34f2436015eb6c107970d9b88f3d5d4600c6fa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -71,15 +75,15 @@
}, },
"fenix": { "fenix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_4",
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1745649180, "lastModified": 1750574187,
"narHash": "sha256-3Ptviong+IYr9y3W6ddJMQDn/VpnTQHgwGU3i022HtA=", "narHash": "sha256-A2v6EQCnGk67cZstf5nxfH4ZUr9DpUovAvSrLaAfhUM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "585fc772cd167cad7d30222b2eb5f5e4bb2166b9", "rev": "263d9d394e9b9606a82c73941c4145052007799a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -91,11 +95,11 @@
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1733328505, "lastModified": 1747046372,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -107,11 +111,11 @@
"flake-compat_2": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1696426674, "lastModified": 1733328505,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -129,11 +133,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1712014858, "lastModified": 1733312601,
"narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -181,7 +185,8 @@
"git-hooks": { "git-hooks": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
"devenv" "devenv",
"flake-compat"
], ],
"gitignore": "gitignore", "gitignore": "gitignore",
"nixpkgs": [ "nixpkgs": [
@ -190,11 +195,10 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1742649964, "lastModified": 1749636823,
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", "rev": "623c56286de5a3193aa38891a6991b28f9bab056",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -213,7 +217,6 @@
}, },
"locked": { "locked": {
"lastModified": 1709087332, "lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "gitignore.nix", "repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
@ -225,62 +228,47 @@
"type": "github" "type": "github"
} }
}, },
"libgit2": {
"flake": false,
"locked": {
"lastModified": 1697646580,
"narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=",
"owner": "libgit2",
"repo": "libgit2",
"rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5",
"type": "github"
},
"original": {
"owner": "libgit2",
"repo": "libgit2",
"type": "github"
}
},
"nix": { "nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
"devenv" "devenv",
"flake-compat"
], ],
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"libgit2": "libgit2", "git-hooks-nix": [
"nixpkgs": "nixpkgs_2", "devenv",
"git-hooks"
],
"nixpkgs": "nixpkgs",
"nixpkgs-23-11": [ "nixpkgs-23-11": [
"devenv" "devenv"
], ],
"nixpkgs-regression": [ "nixpkgs-regression": [
"devenv" "devenv"
],
"pre-commit-hooks": [
"devenv"
] ]
}, },
"locked": { "locked": {
"lastModified": 1745500508, "lastModified": 1750117611,
"narHash": "sha256-eUYh7+PgqLXTt8/9IOxEuW2qyxADECmTic8QNhEwKSw=", "narHash": "sha256-LTwASICtyN3AjzlF9l2ZNAIVZqclio3yRcwwZy3QSJA=",
"owner": "domenkozar", "owner": "cachix",
"repo": "nix", "repo": "nix",
"rev": "090394819020afda8eae69e395b1accba9c0fab2", "rev": "9e4fc95c388e2223d47da865503dee20d179776a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "domenkozar", "owner": "cachix",
"ref": "devenv-2.24", "ref": "devenv-2.30",
"repo": "nix", "repo": "nix",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1733212471, "lastModified": 1747179050,
"narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", "narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", "rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -293,14 +281,14 @@
"nixpkgs-python": { "nixpkgs-python": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1745481253, "lastModified": 1749760516,
"narHash": "sha256-WuhJw2qNrpdB73/E/Tfh2tFu4wzfp2QAhWwRGkBtau0=", "narHash": "sha256-koLwnVjVrR4yS2ea1owMj6ps2sOhH67ObTIld9H27Yo=",
"owner": "cachix", "owner": "cachix",
"repo": "nixpkgs-python", "repo": "nixpkgs-python",
"rev": "04de4e5da5e55a0af5dc28ed4058a63e4458e73a", "rev": "908dbb466af5955ea479ac95953333fd64387216",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -311,27 +299,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1717432640, "lastModified": 1746807397,
"narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=", "narHash": "sha256-zU2z0jlkJGWLhdNr/8AJSxqK8XD0IlQgHp3VZcP56Aw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "88269ab3044128b7c2f4c7d68448b2fb50456870",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1733477122,
"narHash": "sha256-qamMCz5mNpQmgBwc8SB5tVMlD5sbwVIToVZtSxMph9s=",
"owner": "cachix", "owner": "cachix",
"repo": "devenv-nixpkgs", "repo": "devenv-nixpkgs",
"rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857", "rev": "c5208b594838ea8e6cca5997fbf784b7cca1ca90",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -341,7 +313,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1729501122, "lastModified": 1729501122,
"narHash": "sha256-tScdcYQ37kMqlyqb5yizNDTKXZASLB4zHitlHwOg+/o=", "narHash": "sha256-tScdcYQ37kMqlyqb5yizNDTKXZASLB4zHitlHwOg+/o=",
@ -356,13 +328,13 @@
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_5": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1745526057, "lastModified": 1750365781,
"narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f771eb401a46846c1aebd20552521b233dd7e18b", "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -372,34 +344,34 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": {
"locked": {
"lastModified": 1750365781,
"narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1745526057, "lastModified": 1743367904,
"narHash": "sha256-ITSpPDwvLBZBnPRS2bUcHY3gZSwis/uTe255QgMtTLA=", "narHash": "sha256-sOos1jZGKmT6xxPvxGQyPTApOunXvScV4lNjBCXd/CI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f771eb401a46846c1aebd20552521b233dd7e18b", "rev": "7ffe0edc685f14b8c635e3d6591b0bbb97365e6c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1719253556,
"narHash": "sha256-A/76RFUVxZ/7Y8+OMVL1Lc8LRhBxZ8ZE2bpMnvZ1VpY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fc07dc3bdf2956ddd64f24612ea7fc894933eb2e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -410,18 +382,18 @@
"espkgs": "espkgs", "espkgs": "espkgs",
"fenix": "fenix", "fenix": "fenix",
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_5",
"nixpkgs-python": "nixpkgs-python" "nixpkgs-python": "nixpkgs-python"
} }
}, },
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1745591749, "lastModified": 1750538096,
"narHash": "sha256-ynI1QfQEMHHuO+hJ8RLzhCo31XLm86vI7zRjKMQ45BQ=", "narHash": "sha256-8/KtURbFw0cd15WcqKJOMeF3JoxBbmjk2AWJ8Ud80WY=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "df594ba8f4f72064002a4170eea031ba4300f087", "rev": "0ddaf2cd7b5c020addb5c35b09dc5ef409701522",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -35,7 +35,10 @@
env = { env = {
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib"; LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
}; };
git-hooks.hooks.alejandra.enable = true; git-hooks.hooks = {
alejandra.enable = true;
taplo.enable = true;
};
languages = { languages = {
nix.enable = true; nix.enable = true;
python.enable = true; python.enable = true;
@ -58,6 +61,7 @@
espflash espflash
espPkgs.esp-idf-esp32c6 espPkgs.esp-idf-esp32c6
ldproxy ldproxy
sops
]; ];
} }
]; ];

View file

@ -1,16 +0,0 @@
[build]
target = "riscv32imac-esp-espidf"
[target.riscv32imac-esp-espidf]
linker = "ldproxy"
runner = "espflash flash --monitor"
rustflags = [ "--cfg", "espidf_time64"]
[unstable]
build-std = ["std", "panic_abort"]
[env]
MCU="esp32c6"
# Note: this variable is not used by the pio builder (`cargo build --features pio`)
# ESP_IDF_VERSION = "v5.2.3"

1786
xiao-esp32c6/Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,31 +0,0 @@
[package]
name = "xiao-esp32c6"
version = "0.1.0"
edition = "2024"
[[bin]]
name = "xiao-esp32c6"
harness = false
[build-dependencies]
embuild = "*"
[dependencies]
critical-section = { version = "*", features = ["std"] }
embassy-executor = { version = "*", features = ["arch-std", "executor-thread", "log"] }
esp-idf-svc = { version = "*", features = ["embassy-time-driver"] }
log = "*"
riscv-rt = "*"
static_cell = "*"
[features]
default = []
experimental = ["esp-idf-svc/experimental"]
[profile.release]
opt-level = "s"
[profile.dev]
debug = true
opt-level = "z"

View file

@ -1,3 +0,0 @@
fn main() {
embuild::espidf::sysenv::output();
}

View file

@ -1,10 +0,0 @@
# Rust often needs a bit of an extra main task stack size compared to C (the default is 3K)
CONFIG_ESP_MAIN_TASK_STACK_SIZE=8000
# Use this to set FreeRTOS kernel tick frequency to 1000 Hz (100 Hz by default).
# This allows to use 1 ms granularity for thread sleeps (10 ms by default).
#CONFIG_FREERTOS_HZ=1000
# Workaround for https://github.com/espressif/esp-idf/issues/7631
#CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=n
#CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL=n

View file

@ -1,16 +0,0 @@
#![no_main]
use embassy_executor::Executor;
use static_cell::StaticCell;
use xiao_esp32c6::entrypoint;
static EXECUTOR: StaticCell<Executor> = StaticCell::new();
#[unsafe(no_mangle)]
fn main() {
EXECUTOR.init(Executor::new()).run(|spawner| {
spawner
.spawn(entrypoint(spawner))
.expect("Embassy should be able to spawn entrypoint task");
});
}

View file

@ -1,11 +0,0 @@
use embassy_executor::Spawner;
#[embassy_executor::task]
pub async fn entrypoint(_spawner: Spawner) {
// It is necessary to call this function once. Otherwise some patches to the runtime
// implemented by esp-idf-sys might not link properly. See https://github.com/esp-rs/esp-idf-template/issues/71
esp_idf_svc::sys::link_patches();
// Bind the log crate to the ESP Logging facilities
esp_idf_svc::log::EspLogger::initialize_default();
}