Use arm-none-eabi-objcopy instead of llvm-objcopy #95

Closed
atse wants to merge 1 commits from atse:workaround-llvm-bug into master
Contributor

Since LLVM v15, llvm-objcopy seems to produce broken (misaligned?) binaries, which when combined with some difficult to debug timing issues caused by the calibrate_dac_feedback routine, would cause the independent watchdog to kick in, and bootloop the Thermostat.

As NixOS 23.11 ships LLVM v16, upgrading to it breaks builds. Using rust-objcopy from cargo-binutils does not help either since the pinned version of Rust uses LLVM v15.

arm-none-eabi-objcopy doesn't have this problem, so use it instead.

See https://github.com/llvm/llvm-project/issues/58407 and https://github.com/rust-lang/rust/issues/102983.

Since LLVM v15, llvm-objcopy seems to produce broken (misaligned?) binaries, which when combined with some difficult to debug timing issues caused by the calibrate_dac_feedback routine, would cause the independent watchdog to kick in, and bootloop the Thermostat. As NixOS 23.11 ships LLVM v16, upgrading to it breaks builds. Using rust-objcopy from cargo-binutils does not help either since the pinned version of Rust uses LLVM v15. arm-none-eabi-objcopy doesn't have this problem, so use it instead. See https://github.com/llvm/llvm-project/issues/58407 and https://github.com/rust-lang/rust/issues/102983.
atse added 1 commit 2024-01-24 10:53:23 +08:00
Since LLVM v15, llvm-objcopy seems to produce broken (misaligned?)
binaries, which when combined with some difficult to debug timing issues
caused by the calibrate_dac_feedback routine, would cause the
independent watchdog to kick in, and bootloop the Thermostat.

As NixOS 23.11 ships LLVM v16, upgrading to it breaks builds. Using
rust-objcopy from cargo-binutils does not help either since the pinned
version of Rust uses LLVM v15.

arm-none-eabi-objcopy doesn't have this problem, so use it instead.

See https://github.com/llvm/llvm-project/issues/58407 and
https://github.com/rust-lang/rust/issues/102983.
Owner

Well, good that you found the source of that problem, but installing an entire GCC toolchain sounds rather heavy-handed and bloated.

Well, good that you found the source of that problem, but installing an entire GCC toolchain sounds rather heavy-handed and bloated.
Owner

Maybe changing the linker file would fix it. And either way I think there are more important issues than updating rustc/llvm right now.

Maybe changing the linker file would fix it. And either way I think there are more important issues than updating rustc/llvm right now.
Author
Contributor

This seems to be irrelevant now with LLVM v17 in NixOS 24.05, closing.

This seems to be irrelevant now with LLVM v17 in NixOS 24.05, closing.
atse closed this pull request 2024-08-07 18:09:26 +08:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/thermostat#95
No description provided.