basic wubbel
This commit is contained in:
parent
dac87a1696
commit
6068827dfb
3 changed files with 29 additions and 92 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
name = "firmware"
|
name = "firmware"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
|
|
@ -9,7 +9,7 @@ path = "./src/bin/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
esp-bootloader-esp-idf = "0.1.0"
|
esp-bootloader-esp-idf = "0.1.0"
|
||||||
esp-hal = { version = "=1.0.0-beta.1", features = ["esp32", "unstable"] }
|
esp-hal = { version = "=1.0.0-beta.1", features = ["esp32", "unstable"] }
|
||||||
|
|
||||||
bleps = { git = "https://github.com/bjoernQ/bleps", package = "bleps", rev = "a5148d8ae679e021b78f53fd33afb8bb35d0b62e", features = [
|
bleps = { git = "https://github.com/bjoernQ/bleps", package = "bleps", rev = "a5148d8ae679e021b78f53fd33afb8bb35d0b62e", features = [
|
||||||
"async",
|
"async",
|
||||||
|
|
@ -47,10 +47,10 @@ smoltcp = { version = "0.12.0", default-features = false, features = [
|
||||||
opt-level = "s"
|
opt-level = "s"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
codegen-units = 1 # LLVM can perform better optimizations using a single thread
|
codegen-units = 1 # LLVM can perform better optimizations using a single thread
|
||||||
debug = 2
|
debug = 2
|
||||||
debug-assertions = false
|
debug-assertions = false
|
||||||
incremental = false
|
incremental = false
|
||||||
lto = 'fat'
|
lto = 'fat'
|
||||||
opt-level = 's'
|
opt-level = 's'
|
||||||
overflow-checks = false
|
overflow-checks = false
|
||||||
|
|
|
||||||
37
flake.lock
generated
37
flake.lock
generated
|
|
@ -16,44 +16,9 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1744536153,
|
|
||||||
"narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs"
|
||||||
"rust-overlay": "rust-overlay"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rust-overlay": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": "nixpkgs_2"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1751423951,
|
|
||||||
"narHash": "sha256-AowKhJGplXRkAngSvb+32598DTiI6LOzhAnzgvbCtYM=",
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"rev": "1684ed5b15859b655caf41b467d046e29a994d04",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "oxalica",
|
|
||||||
"repo": "rust-overlay",
|
|
||||||
"type": "github"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
68
flake.nix
68
flake.nix
|
|
@ -1,59 +1,31 @@
|
||||||
{
|
{
|
||||||
description = "A Nix-flake-based Rust development environment for ESP";
|
description = "A Nix-flake-based Rust ESP IDF development environment";
|
||||||
|
|
||||||
inputs = {
|
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, rust-overlay }:
|
outputs = { self, nixpkgs }:
|
||||||
let
|
let
|
||||||
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||||
|
|
||||||
|
nixpkgs-esp-dev = builtins.fetchGit {
|
||||||
|
url = "https://github.com/mirrexagon/nixpkgs-esp-dev.git";
|
||||||
|
|
||||||
|
# Optionally pin to a specific commit of `nixpkgs-esp-dev`.
|
||||||
|
rev = "6c34f2436015eb6c107970d9b88f3d5d4600c6fa";
|
||||||
|
};
|
||||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs { inherit system; overlays = [ (import "${nixpkgs-esp-dev}/overlay.nix") ]; };
|
||||||
inherit system;
|
|
||||||
overlays = [ rust-overlay.overlays.default ];
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells = forEachSupportedSystem ({ pkgs }:
|
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||||
let
|
default = pkgs.mkShell {
|
||||||
rust-toolchain = pkgs.rust-bin.fromRustupToolchainFile ./firmware/rust-toolchain.toml;
|
packages = with pkgs; [
|
||||||
in
|
esp-idf-full
|
||||||
{
|
espflash
|
||||||
default = pkgs.mkShell {
|
];
|
||||||
packages = with pkgs; [
|
};
|
||||||
rust-toolchain
|
});
|
||||||
cargo-flamegraph
|
|
||||||
espup
|
|
||||||
|
|
||||||
ldproxy
|
|
||||||
|
|
||||||
gcc
|
|
||||||
git
|
|
||||||
gnumake
|
|
||||||
flex
|
|
||||||
bison
|
|
||||||
gperf
|
|
||||||
python313
|
|
||||||
cmake
|
|
||||||
ninja
|
|
||||||
ccache
|
|
||||||
dfu-util
|
|
||||||
libusb1
|
|
||||||
python313Packages.pip
|
|
||||||
|
|
||||||
esp-generate
|
|
||||||
|
|
||||||
espflash
|
|
||||||
probe-rs
|
|
||||||
];
|
|
||||||
env = {
|
|
||||||
LIBCLANG_PATH = "/home/clara/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-19.1.2_20250225/esp-clang/lib";
|
|
||||||
PATH = "/home/clara/.rustup/toolchains/esp/xtensa-esp-elf/esp-14.2.0_20240906/xtensa-esp-elf/bin:$PATH";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue