Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Jonah Dahlquist
    @jonahbron
    @davidlenfesty What platform are you on, how did you install avr-gcc?
    David Lenfesty
    @davidlenfesty
    Manjaro
    pacman -S avr-gcc
    So I looked at the rust source tree, and traced back to the option that enables disables that flag
    Jonah Dahlquist
    @jonahbron
    aw dang okay. Good thing I didn't act on my inclination to switch to Arch to fix the problem.
    David Lenfesty
    @davidlenfesty
    and it seems to be false
    Jonah Dahlquist
    @jonahbron
    Really? You're saying it shouldn't even be on?
    David Lenfesty
    @davidlenfesty
    Not from what's master. Hold on a bit and I'll show the code path
    last link is the line that says it's false
    Jonah Dahlquist
    @jonahbron
    Yeah that sure seems like it should be false.
    Maybe it's time to file a ticket on the Rust repo.
    David Lenfesty
    @davidlenfesty
    Probably, I want to verify what commit I'm running
    Jonah Dahlquist
    @jonahbron
    Okay. Link to your issue so I can +1 it.
    David Lenfesty
    @davidlenfesty
    Good thing I did my homework before filing the issue
    a rustup update fixed the issue
    And looking at my command history I didn't update until after the first time, so that was definitely it.
    @jonahbron
    Jonah Dahlquist
    @jonahbron
    Oh sweet
    @davidlenfesty I'm still having the same issue :(
    rustup update gave me version rustc 1.47.0-nightly (d6953df14 2020-07-25)
    But I still get unrecognized option '--eh-frame-hdr'
    Jonah Dahlquist
    @jonahbron
    Is that the version you're on? Did you change your config at all?
    Eyyy found the problem, I had it in my avr-atmega328p.json file.
    Getting a fresh copy from Rahix's avr-hal repo fixed it. https://github.com/Rahix/avr-hal/blob/master/chips/atmega328p-hal/avr-atmega328p.json
    Plecra
    @Plecra
    https://github.com/shepmaster/rust-arduino-blink-led-no-core-with-cargo/blob/a6bfaff51f97fef2d2d13c8358a9f550c2c54ece/interrupt_vector.S
    How are processor-specific APIs like this going to be shared? Can they somehow be bundled with a crate?
    Jake Goulding
    @shepmaster
    @Plecra it’ss possible that avr-Hal already handles that (or they rely on what GCC wrote)
    however, it could do something similar to what the ruduino crate does now: inspect the target processor, then generate that code at runtime and compile it in
    Although, my code is kind of a special case for when you want to write all the device code without any C
    Ayke
    @aykevl
    Also just a note that http://packs.download.atmel.com/ exists, where you can download interrupt vectors (and much, much more) in machine readable format. I use it in TinyGo to generate register access packages, interrupt vector code and linker script fragments for setting the memory size.
    I haven't seen it often so just mention it again so people are aware that it exists.
    Gregor
    @Gregoor
    Heya, I have a bit of a beginner question that I had no success googling: When learning new things I like having a tight feedback loop, mostly achieved by printing all kinds of information at runtime. Is that a thing when doing microcontroller development? Or alternatively, what does your workflow look like?
    Ben Schattinger
    @lights0123
    @aykevl that's what @Rahix's avr-device uses that powers avr-hal
    Jonah Dahlquist
    @jonahbron
    @Gregoor Yes definitely. If you've got a serial connection you can print to it as much as you want, and monitor it with screen
    Rahix
    @Rahix
    aykevl: We talked at 34C3 a bit about those ATDF files and even if it's a bit late, I've created the converter for them: https://github.com/Rahix/atdf2svd
    shepmaster: avr-device currently relies on avr-libc but I want to get rid of that at some point and ship a completely custom runtime
    Your work looks like a great starting point for that :)
    Gregor
    @Gregoor
    @jonahbron great thanks! I guess I'd have to look for something chip specific, like https://github.com/avr-rust/ruduino#hardware-serial-port, for writing to the serial port?
    Jonah Dahlquist
    @jonahbron
    @Gregoor I'd recommend using the avr-hal implementation of the embedded_hal Serial trait.
    https://github.com/Rahix/avr-hal
    it supports serial on atmega328p and atmega32u4
    Do you have either of those?
    Gregor
    @Gregoor
    @jonahbron I think I have a chip based on ESP8266. But maybe I'll just get one supported by avr-hal then
    Jonah Dahlquist
    @jonahbron
    @Gregoor ESP is not AVR I don't think...
    This should be your starting point
    Good news is that you don't need the AVR compiler.
    Gregor
    @Gregoor
    Oh my confusion :grinning: Though I also have something like an Arduino Nano, I guess for that one I'd need AVR?
    Jonah Dahlquist
    @jonahbron
    The bad news is that the ESP compiler target still lives in a fork :'(