-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unused enum value seems to be breaking generated binary #40
Comments
I compared the binaries generated with and without that change. The only differences were causes by the git-version macro. When I patch that out and replace it by a constant string, I get byte-by-byte identical firmwares whether or not I comment out the unused enum variant So it seems extremely unlikely that your observation is directly related to the warning. Please check again if the issue is reproducible. Perhaps something else went wrong while flashing the firmware. If it is really reproducible, my guess would be that the changed version string (which also changes in length because of the (EDIT: For completeness, tested on commit 224f872, using rust version 1.67.0-beta.4) |
I tried again and it did repro. When I leave the warning in place the probe becomes unresponsive after flashing. Commenting out the unused enum value again caused it to work correctly. I'm also compiling commit 224f872, but using rustc version 1.66.0 |
I get the same issue building with rust 1.66 on windows. |
The only change I see in those objdump outputs is that the text section grows by 24 bytes and the rodata section grows by 8 bytes. I also tried it with 1.66.0 (on linux), with similar results: Commenting out the line causes the same change in section size. After replacing I did not have time to actually flash the generated binaries to an hs-probe, yet. If my theory is correct that the only difference is the length of the git version string, any other change should have the same effect - even if it's not even in the source code, for example a change to README.md. Could you try that? Keep |
Just changing some bytes in |
Before running cargo update, please save your Cargo.lock, in case we want to reproduce the issue later. |
@brychanrobot did you build with nightly? Nightly seems to be broken, |
I just tested tried this on my hsprobe. |
Last toolchain that is capable of building a working firmware is |
The versions of cortex-m-rt with the alignment issue got yanked from crates.io, the version hs-probe is using is older than that. |
I had the same symptoms as here, |
I was trying to update firmware and got a warning that https://github.com/probe-rs/hs-probe-firmware/blob/master/firmware/src/usb/winusb.rs#L31 is unused. The build seemed to still work and it was only a warning so I forged ahead, but I found that when I flashed the firmware the probe became unresponsive including its ability to load new firmware. I shorted the appropriate leads to get it into the fallback stm32 bootloader and tried removing the unused line. This time everything worked perfectly. I'm not sure why a warning would break everything, but thought it was an issue worth raising.
The text was updated successfully, but these errors were encountered: