Dylan McKay

Results 142 comments of Dylan McKay

I think there are a few unresolved questions with switch tables: * Switch tables cannot be placed in memory on MCUs without the load program memory (`lpm`) instruction * Therefore,...

I have a WIP branch [here](https://github.com/dylanmckay/llvm/compare/master...dylanmckay:disable-lookup-tables).

[rust-arduino-blink-led-no-core-with-cargo/blink/arduino.json](https://github.com/shepmaster/rust-arduino-blink-led-no-core-with-cargo/blob/75ddae7ade0485725b0867f44fc5adfbd86cd3c7/blink/arduino.json) Interesting, that makes sense.

> Is there a way to tell Cargo to compile and link in a C source? Yes. In a build script, you can invoke GCC, generate an object file, and...

Maybe a macro that expands to something like ``` llvm::assume(PORTB::read() == 0); ... ``` We could tell all users to insert this into the top of `main`.

For example, we could write an `avr-interrupts` crate or something to do this. It is probably not a good idea baking this into the avr-rust/rust compiler itself because that will...

Whatever method we come up with, we need to be able to guarantee that the interrupt vector table will be linked **before** any other object file in any AVR-Rust program....

> I just tried out this framework on the leonardo/promicro/atmega32u4 and had to change some addresses around to get for example serial working What addresses were these? Did you have...

AVR-LLVM itself supports hundreds of different AVR microcontrollers, so the problem is likely that Rust needs to pass extra arguments to the linker.