-
Notifications
You must be signed in to change notification settings - Fork 231
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
Arduino Nano Every support #97
Comments
You're free to do whatever you want :) That said, I fully support adding Nano Every support, if you want to go for that, that's great! |
I start review of this board. Looks like there is inconsistency in chip and board clock setup arduino/Arduino#9017 |
I'd stick with 16 MHz for the default. If someone wants to reconfigure the MCU, they can always do that in their application code. |
I'm interested in getting board support for this hardware, and I'd be willing to help. I saw that support for ATmega4809 has been added to avr-device. What are next steps, can I somehow support the effort? |
As the ATmega4809 is the first newer generation AVR device we will support, there are lots of things that need to happen. For starters, the entire architecture of the API needs to be redesigned to allow easy support for both the old and the new hardware peripherals under a common API. I've started experimenting with a possible design in #116 and others are looking at different parts in #114. We'll first need to get those designs sorted out. Once that is done, there are a lot of different things where you could help, as all HAL drivers need to be converted. For now, I think the best thing we could use is feedback on the changes we're doing and asking questions to see whether the new designs that are being tested are really bullet proof ;) Or, if you're adventurous, you could try hacking on the PRs themselves like e.g. trying to add ATmega4809 support to #116 as an experiment (Not sure how feasible this is at this point) ... |
Okay, unfortunately we're hitting a bit of a road-block with this board right now: The version of So, to move forward with this, I think the next logical step is something that was inevitable anyway: To get rid of our dependence on the C runtime and instead rewrite it in Rust (yay). I'll look into this eventually, but I want to get #129 rolling first, so I'll have to push this back a little, unfortunately. Maybe we can find a way to hack around this by using a different CRT in the meantime... |
Okay, I was able to get a blinky working by using a CRT for a different MCU + architecture but this feels super fragile and is not something I'd want to label as "proper support" in any way... So I think waiting for the non-C runtime is probably the better solution here... |
I believe Arduino uses Atmel's fork of avr-libc: https://www.microchip.com/mymicrochip/filehandler.aspx?ddocname=en611560 |
Well possible... In any case we want to drop our dependency on |
Hey there, Thanks for all the effort on
Not sure if I'm missing anything, but |
avrdude's support for newer AVRs is very buggy and from what I've seem it's borderline unmaintained. Adding support for |
Though, it looks like you're building a binary for |
I'll be honest, I've not got a clue what it is I'm doing 😂 |
In that case, you probably don't want to be using Rust on AVR, especially on a currently unsupported platform like the Nano Every. It's currently very early. Hopefully it'll improve with time, but if you want something you can use with Rust now then I'd recommend either following the Embedded Rust Book with an STM32F3DISCOVERY or using atsamd-rs with any ATSAMD board, preferably one compatible with |
Oh I'd love to. Unfortunately I'm 'stuck' with the every. For now I'll use C then, and move to rust as soon as it's supported. Thanks! |
I've encountered this same issue while working on #357. I also was able to get it working with the toolchain provided by Arduino. Looks like upstream avr-libc added support for this family earlier this year (avrdudes/avr-libc@960a359) so it will probably be in the next release. @Rahix If you don't want to merge #139 / #357 to main yet, then in the meantime, would you consider creating a feature branch for avrxmega3 to make collaboration easier? We both wrote the same crate independently 😅. I also saw some discussion about making an |
Yes, they do ship the support because they need it for the Nano Every.
Interesting! That's good news! But I'm still in favor of dropping the dependency on avr-libc entirely as soon as possible. But at least this means we'll have a stop-gap solution soon.
Hm, actually I think I'd be fine with merging directly to |
Hi, Not sure if λ cargo run
Finished dev [optimized + debuginfo] target(s) in 0.04s
Running `ravedude nano -cb 57600 -P /dev/tty.usbserial-A10LWGNO target/avr-atmega328p/debug/led.elf`
Board Arduino Nano
Programming target/avr-atmega328p/debug/led.elf => /dev/tty.usbserial-A10LWGNO
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 |
It is not. The Nano you have is based on the ATMega328 while the Nano Every is based on the ATMega4809. From my understanding The core processor architecture is the same, but most of the built in peripherals and bootloader are different. |
Some good news: avrdudes/avr-libc#890 was fixed upstream. Once the fix trickles down into distro packages, we can maybe move forward on the Nano Every support. |
I want to add support for Arduino Nano Every board and ATMega4809 chip.
Will start after #88
@Rahix should I wait and implement other tickets? I can start in first week of November.
The text was updated successfully, but these errors were encountered: