Fix build profiles

This commit is contained in:
Jakub Hlusička 2026-02-03 00:27:20 +01:00
parent c2e3f1bec3
commit b6d9a71b59
10 changed files with 38 additions and 25 deletions

1
firmware/Cargo.lock generated
View file

@ -6853,6 +6853,7 @@ checksum = "a0f368519fc6c85fc1afdb769fb5a51123f6158013e143656e25a3485a0d401c"
[[package]] [[package]]
name = "spectre-api-sys" name = "spectre-api-sys"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/Limeth/spectre-api-sys?rev=9e844eb056c3dfee8286ac21ec40fa689a8b8aa2#9e844eb056c3dfee8286ac21ec40fa689a8b8aa2"
dependencies = [ dependencies = [
"bindgen", "bindgen",
"cc", "cc",

View file

@ -5,3 +5,22 @@ default-members = []
[workspace.dependencies] [workspace.dependencies]
spectre-api-sys = { git = "https://github.com/Limeth/spectre-api-sys", rev = "9e844eb056c3dfee8286ac21ec40fa689a8b8aa2" } spectre-api-sys = { git = "https://github.com/Limeth/spectre-api-sys", rev = "9e844eb056c3dfee8286ac21ec40fa689a8b8aa2" }
[profile.dev.package.esp-storage]
opt-level = 3
[profile.dev]
# Rust debug is too slow.
# For debug builds always builds with some optimization
opt-level = "s"
lto = 'thin'
[profile.release]
codegen-units = 1 # LLVM can perform better optimizations using a single thread
debug = 2
debug-assertions = false
incremental = false
lto = 'thin'
opt-level = 3
overflow-checks = false

View file

@ -1,6 +1,6 @@
[target.'cfg(all(any(target_arch = "riscv32", target_arch = "xtensa"), target_os = "none"))'] [target.'cfg(all(any(target_arch = "riscv32", target_arch = "xtensa"), target_os = "none"))']
# runner = "espflash flash --monitor" runner = "espflash flash --monitor"
runner = "probe-rs run --chip esp32s3 --preverify" # runner = "probe-rs run --chip esp32s3 --preverify"
[build] [build]
target = "xtensa-esp32s3-none-elf" target = "xtensa-esp32s3-none-elf"

View file

@ -126,25 +126,3 @@ indoc = "2.0.7"
name = "acid-firmware" name = "acid-firmware"
test = false test = false
bench = false bench = false
[profile.release-with-debug]
inherits = "release"
debug = true
[profile.dev.package.esp-storage]
opt-level = 3
[profile.dev]
# Rust debug is too slow.
# For debug builds always builds with some optimization
opt-level = "s"
[profile.release]
codegen-units = 1 # LLVM can perform better optimizations using a single thread
debug = 2
debug-assertions = false
incremental = false
lto = 'thin'
opt-level = 3
overflow-checks = false

View file

@ -46,6 +46,17 @@ Then compile the firmware with:
$env:XKBCOMMON_BUILD_DIR="libxkbcommon/build-debug"; cargo build $env:XKBCOMMON_BUILD_DIR="libxkbcommon/build-debug"; cargo build
``` ```
## Debugging via alternative UART pins
Connect your serial debugger's TX to GPIO5 and its RX to GPIO12.
On Linux, listen to the serial stream using:
```sh
tio -m INLCRNL /dev/ttyUSB1
```
On Windows, use PuTTY with a baudrate of 115200.
### Creating keymaps ### Creating keymaps
To generate an English (US) keymap, the following command may be used: To generate an English (US) keymap, the following command may be used:

View file

@ -26,7 +26,11 @@ pub mod file;
pub unsafe extern "C" fn __xkbc_fopen(filename: *const c_char, mode: *const c_char) -> *mut FILE { pub unsafe extern "C" fn __xkbc_fopen(filename: *const c_char, mode: *const c_char) -> *mut FILE {
warn!( warn!(
"The xkbcommon library is attempting to open a file at path: {:?}", "The xkbcommon library is attempting to open a file at path: {:?}",
unsafe { CStr::from_ptr(filename) } if filename.is_null() {
None
} else {
Some(unsafe { CStr::from_ptr(filename) })
}
); );
null_mut() null_mut()
} }

0
firmware/libsodium-compile.sh Normal file → Executable file
View file

0
firmware/libxkbcommon-compile.sh Normal file → Executable file
View file

0
firmware/redefine-syms.sh Normal file → Executable file
View file

0
firmware/spectre-api-compile.sh Normal file → Executable file
View file