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

Open
atse wants to merge 1 commits from atse/thermostat:workaround-llvm-bug into master

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
8c8ac71a6f Use arm-none-eabi-objcopy instead of llvm-objcopy
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.

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.

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.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b atse-workaround-llvm-bug master
git pull workaround-llvm-bug

Step 2:

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff atse-workaround-llvm-bug
git push origin master
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
There is no content yet.