Timeline for Finite loop runs infinitely
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 20, 2024 at 8:29 | comment | added | zombiesauce | @NickGammon Agreed, that feels like an insane blunder. Although, nightly releases are not meant for consumer consumption, they're (supposed to be, but I hadn't experienced it before till now) very unstable. | |
Aug 20, 2024 at 0:37 | comment | added | Nick Gammon♦ | Nicely explained, although I wonder how this compiler ever got released if it compiles branches incorrectly. It also seems odd that if it can generate the correct assembler code, that this code is not used in the next step (ie. by the gcc assembler). | |
Aug 19, 2024 at 10:15 | comment | added | Edgar Bonet | @zombiesauce: Re "I'm not exactly sure...": Maybe you could launch the Rust compiler driver in verbose mode in order to see exactly how it interacts with the GCC toolchain. If the compiler proper generates an object file to be linked by avr-gcc, you could check whether this file contains intermediate language or machine code. If it's machine code, you could disassemble it and see whether it has the faulty relative jumps. | |
Aug 19, 2024 at 8:50 | vote | accept | zombiesauce | ||
Aug 19, 2024 at 7:49 | comment | added | zombiesauce | I was not claiming that Arduino comes with a Rust compiler. Now I'm not exactly sure how Rust compiles to AVR, but it really offloads a lot of architecture-specific compilation to the GCC AVR toolchain. I think it generates MIR (middle intermediate representation) from the pure Rust toolchain, and the rest of the AVR stuff including linking is done via the those avr-gcc, avr-objcopy and the whole shebang. Now, instead of downloading it from Ubuntu's repository, since I already have Arduino; I have instead just exported their PATH. Hence maybe problem is in Rust <-> AVR toolchain interaction. | |
Aug 18, 2024 at 12:33 | comment | added | Edgar Bonet | @zombiesauce: See amended answer. | |
Aug 18, 2024 at 12:32 | history | edited | Edgar Bonet | CC BY-SA 4.0 |
+ difference between disassembly and compilation to asm.
|
Aug 18, 2024 at 10:45 | comment | added | zombiesauce | All the avr-gcc, avr-g++, avr-objcopy, etc. are just symlink'd from Arduino's IDE. I'm not using some other variant of linker/compiler than the one that Arduino uses, so this is pretty weird - especially if the object code seems correct but the linked code seems wrong (which would've happened with the help of some AVR linker). | |
Aug 18, 2024 at 10:37 | history | answered | Edgar Bonet | CC BY-SA 4.0 |