diff --git a/firmware/.gitignore b/firmware/.gitignore index cafb6e2..a686c46 100644 --- a/firmware/.gitignore +++ b/firmware/.gitignore @@ -1,2 +1 @@ /.cargo -/.zed diff --git a/firmware/.zed/debug.json b/firmware/.zed/debug.json new file mode 100644 index 0000000..e914025 --- /dev/null +++ b/firmware/.zed/debug.json @@ -0,0 +1,14 @@ +// Project-local debug tasks +// +// For more documentation on how to configure debug tasks, +// see: https://zed.dev/docs/debugger +[ + { + "label": "Launch probe-rs debugging", + "adapter": "probe-rs", + "request": "launch", + "cwd": "$ZED_WORKTREE_ROOT", + "server": "127.0.0.1:50000 ", + "coreConfigs": [], + }, +] diff --git a/firmware/.zed/settings.json b/firmware/.zed/settings.json new file mode 100644 index 0000000..ed6f1f8 --- /dev/null +++ b/firmware/.zed/settings.json @@ -0,0 +1,36 @@ +{ + "lsp": { + "rust-analyzer": { + "initialization_options": { + // Which project to enable + "linkedProjects": ["acid-firmware/Cargo.toml"], + "cargo": { + // This must match the target MCU's target + "target": "xtensa-esp32s3-none-elf", + // Prevents rust-analyzer from blocking cargo + "targetDir": "target/rust-analyzer", + "extraEnv": { + // ESP32-S3 is an Xtensa MCU, we need to work with the esp toolchain + "RUSTUP_TOOLCHAIN": "esp", + // Rest of the environment variables must be kept in sync with `acid-firmware/.cargo/config.toml`: + "EXPLICITLY_INCLUDE_DEFAULT_DIRS": "true", + "XKBCOMMON_BUILD_DIR": "../libxkbcommon/build-esp32s3", + "SPECTRE_API_BUILD_DIR": "../spectre-api-c/build-esp32s3", + "SODIUM_INSTALL_DIR": "../libsodium/install", + "XKBCOMMON_BUILD_DIR_NAME": "build-esp32s3", + "SPECTRE_API_BUILD_DIR_NAME": "build-esp32s3", + "SODIUM_INSTALL_DIR_NAME": "install", + "SPECTRE_API_SYS_CC": "xtensa-esp32s3-elf-cc.exe", + "ESP_LOG": "warn", + "ESP_BACKTRACE_CONFIG_BACKTRACE_FRAMES": "20", + "SLINT_FONT_SIZES": "8,11,10,12,13,14,15,16,18,20,22,24,32", + }, + "extraArgs": ["-Zbuild-std=core,alloc"], + // Enable device support and a wide set of features on the esp-rtos crate. + "noDefaultFeatures": true, + "features": ["rtt-log"], + }, + }, + }, + }, +}