Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    rahix
    @rahix:matrix.org
    [m]
    If you can test that as well, I'll merge the PR and add the board to the template repository
    enaut
    @enaut:matrix.org
    [m]
    sorry I'm not sure I can follow here... I installed ravedude from the git version and then I can use it. My current dependency on avr-hal looks like: [dependencies.arduino-uno] git = "https://github.com/Rahix/avr-hal" features=["arduino-nano"]
    what should work after that does not work before?
    rahix
    @rahix:matrix.org
    [m]
    add rev = "e72faada6bb7f67990216525aeb2132bbb3d53e9" and change the features to features = ["nano168"]

    what should work after that does not work before?

    as the two chips are almost identical, most likely nothing. But to keep everything clean I'd want to have the 168 version be handled separate, ontop of its own HAL layer. This means if there ever are any differences to care for, it is easy to differentiate the two.

    So more than supporting anything new, I just wanted to make sure I did not break anything with my changeset ;)
    enaut
    @enaut:matrix.org
    [m]
    I fail to be successfull... I added the small blink example to a git repository: https://github.com/enaut/temp-test
    ```
    ❯ cargo run
        Updating git repository `https://github.com/Rahix/avr-hal.git`
    error: no matching package named `arduino-uno` found
    location searched: https://github.com/Rahix/avr-hal.git?rev=e72faada6bb7f67990216525aeb2132bbb3d53e9
    perhaps you meant: arduino-hal
    required by package `rust-arduino-blink v0.1.0 (/home/dietrich/Projekte/Source/rust-arduino-blink)`
    what do I do wrong?
    rahix
    @rahix:matrix.org
    [m]
    hmm, wait a moment
    ooh, I totally missed that you're still using the old version of avr-hal... Sorry :(
    In that case, give me another minute - I'll prepare the new project template for the board, then you can just use that to test
    (We did some rather large changes to the crate-architecture of avr-hal recently... Maybe check https://github.com/Rahix/avr-hal#repository-structure to familiarize yourself with the new layout if you intend to update your own projects)
    enaut
    @enaut:matrix.org
    [m]
    OH thank you I suspected something like that!
    as that is my only proof of concept project so far no need to upgrade ;)
    rahix
    @rahix:matrix.org
    [m]
    alright, try generating a project with cargo generate --git https://github.com/Rahix/avr-hal-template.git --branch wip and then selecting Nano168 as the board. If I didn't mess anything up, cargo run should be enough with that to make your board blink (might need to set a port with cargo run -- -P /dev/ttyFOO).
    enaut
    @enaut:matrix.org
    [m]
    rahix Thank you so much! unfortunately I'm still not getting there... result now is:
    cargo run --bin test-nano168
        Finished dev [optimized + debuginfo] target(s) in 0.02s
         Running `ravedude nano168 -cb 57600 -P /dev/ttyUSB0 target/avr-atmega168/debug/test-nano168.elf`
           Board Nano Clone (ATmega168)
     Programming target/avr-atmega168/debug/test-nano168.elf => /dev/ttyUSB0
    and then nothing happens
    the weired thing is my other project works now with only cargo run (after I pasted the code from your example)
    rahix
    @rahix:matrix.org
    [m]
    huh, that is super strange
    enaut
    @enaut:matrix.org
    [m]
    Oh I found the difference what does profile=minimal in toolchain.toml do?
    on removing that everything works as expected
    rahix
    @rahix:matrix.org
    [m]
    oh really? that is confusing
    it shouldn't have an influence whatsoever... here is relevant documentation: https://rust-lang.github.io/rustup/concepts/profiles.html
    it just controls whether rustfmt and clippy are installed for the toolchain
    enaut
    @enaut:matrix.org
    [m]
    that is indeed confusing...
    rahix
    @rahix:matrix.org
    [m]
    especially because it should have influenced the other project exactly the same...
    enaut
    @enaut:matrix.org
    [m]
    dammit I'm dumb...
    I searched for the difference... and the only issue was... I was still connected to the Serial port in the other window...
    So the template works just fine!
    rahix
    @rahix:matrix.org
    [m]
    ooh, yeah that makes a lot of sense :)
    alright, then I'll go ahead and get all those changes merged now
    enaut
    @enaut:matrix.org
    [m]
    And thank you so much for solving my problem immediately!
    rahix
    @rahix:matrix.org
    [m]
    heh, no problem :) if you need anything else let me know!
    enaut
    @enaut:matrix.org
    [m]
    I will get better and bother you with harder problems 😛
    rahix
    @rahix:matrix.org
    [m]
    haha, challenge accepted :p
    enaut
    @enaut:matrix.org
    [m]
    Rahix (Rahix) I have ported the blink and the adc example (the second without the temperature) see pr
    *ported to the atmega168
    rahix
    @rahix:matrix.org
    [m]
    nice, thanks! :)
    enaut
    @enaut:matrix.org
    [m]
    rahix - in the pr you requested to change the comment to Nano 168 - shouldn't that be consistent with the verbose naming in the feature doc: "Nano clone (ATmega168)"?
    or do you prefer the more readable variant?
    rahix
    @rahix:matrix.org
    [m]
    honestly it does not matter much at all - I just was a bit weary about reading "Arduino" in code related to a board which is not an official one
    so choose whatever you think is best, it's not important ;)
    enaut
    @enaut:matrix.org
    [m]
    either me or my git allways gets confused... sometimes both... :) I work too much alone...
    but now it should be as desired in the pr (force pushed)
    enaut
    @enaut:matrix.org
    [m]
    what are good settings for rust-analyzer? Currently it is allways failing with the macros like ufmt::uwriteln! so whenever I open a project or file depending on avr-hal it is complaining about so many problems.
    rahix
    @rahix:matrix.org
    [m]
    I just disabled the lint complaining about those macros
    enaut
    @enaut:matrix.org
    [m]
    ok