-
Notifications
You must be signed in to change notification settings - Fork 0
Dev environment
Here I try to document how my dev system is setup.
Ideally, this would help other devs to get started with the besteLampe! projects. In practice, my dev system is rather unstable and I will mainly use this page to look what I did last time to make it work. I might also use it to get help when nothing is working any more.
I'm using a MacBook Pro with Apple M1 (ARM) processor. I'm running MacOS 14.2. I do not use (Docker) dev containers.
This project is based on the ESP32-C6 which has one or two RISC-V cores (depending on how you count). So I try to ignore as many setup steps as possible which are only needed for Extensa Cores.
Running rustup show
reports these toolchains:
- stable-aarch64-apple-darwin
- nightly-aarch64-apple-darwin
- 1.76.0-aarch64-apple-darwin
- 1.77-aarch64-apple-darwin
- esp (default)
I don't know where the custom esp
toolchain comes from. Maybe I created it manually but forgot? Maybe they come from espup
?
rustc -V
prints rustc 1.77.0-nightly (424037dcb 2024-03-18) (1.77.0.0)
.
I have espup version 0.11.0
. Running espup update
prompted me to source the file /Users/lena/export-esp.sh
which contains:
export PATH="/Users/lena/.rustup/toolchains/esp/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin:$PATH"
export LIBCLANG_PATH="/Users/lena/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-16.0.4-20231113/esp-clang/lib"
There is a surprising amount of xtensa
in those paths, considering that I don't plan to use extensa-based chips!
The current config can be looked up directly in this repo. At the point of writing this, it is:
-
software
-
bestelampe
-
Cargo.toml
-
[package]
rust-version = "1.77"
-
[build-dependencies]
embuild = "0.31.3"
-
[patch.crates-io]
cc = { git = "https://github.com/rust-lang/cc-rs", tag = "1.0.83" }
-
-
rust-toolchain.toml
- I deleted this file recenently -
.cargo
-
config.toml
- too much relevant content to quote inline
-
-
-
Contents of config.toml
:
[build]
target = "riscv32imac-esp-espidf"
[target.riscv32imac-esp-espidf]
linker = "ldproxy"
# runner = "espflash --monitor" # Select this runner for espflash v1.x.x
runner = "espflash flash --monitor" # Select this runner for espflash v2.x.x
rustflags = ["--cfg", "espidf_time64", "-C", "default-linker-libraries", "-C", "force-frame-pointers"]
[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.1.3"
#ESP_IDF_TOOLS_INSTALL_DIR = { value = "global" } # so that this project won't contain another copy of the ESP IDF