Just to let you know that I have a basic port of the arduino-uno board
based on an atmega328p uc.
My work is largely based on the atmega2560 port.
For now, I've managed to build the hello-world and
timer_periodic_wakeup examples, and to load and execute generated .elf
using the simavr[1] emulator.
..
main(): This is RIOT! (Version: 2016.07-devel-114-gc449-paddy-uno).
Hello World!.
You are running RIOT on a(n) arduino-uno board..
This board features a(n) atmega328p MCU..
Let me know if you're always interested by this port as suggested in
the Project Idea List[2.
Though, It certaily needs some cleanup and tests on real hardware before PR.
Hi Laurent,
definitely! If you have a working port, provide a PR as soon as you see fit. I personally only have a Arduino Leonardo, but it shouldn’t be hard to find an Arduino Uno. Also: the simulated one could be helpful for future testing runs. Keep us in the loop :-).
Hi Laurent,
definitely! If you have a working port, provide a PR as soon as you see
fit. I personally only have a Arduino Leonardo, but it shouldn't be hard to
find an Arduino Uno. Also: the simulated one could be helpful for future
testing runs. Keep us in the loop :-).
I have one so I'll be able to give a try and test. As a side note, the atmega328p has very limited ressources (32KB flash, 2KB SRAM) so this will limit the use cases with RIOT (no network stack, etc).
First of all: I'm really excited about this. The atmega328p is a very widely
used MCU and having support for RIOT would be wonderful. Thanks for the effort
and definitely +100 for sharing with the community.
I have one so I'll be able to give a try and test. As a side note, the
atmega328p has very limited ressources (32KB flash, 2KB SRAM) so this will
limit the use cases with RIOT (no network stack, etc).
Yes, it's true that this MCU has very limited resources and it will be
challenging to create a useful application. However, I think it can be
possible to run a stripped-down network application with RIOT even on this.
Without any code optimization a minimalistic GNRC application
(examples/gnrc_minimal) requires about 3kB on Z1 (MSP430/16 bit). Compiling
the same application for arduino-mega2560 requires about 1.8kB of RAM, but
without a radio driver (and thus, without allocating stack for the L2 thread).
Hence, we're already close!
Cheers,
Oleg
P.S. Of course, even if GNRC (or another network stack) fits on the device,
the challenge to leave space for a meaningful application remains.
As a newbie in deep embedded world, there are certainly mistakes or
errors, so this is also an RFC.
I thought i had an arduino uno, but in fact it was a duemilanove (the
one with an atmega328p) so very similar to the uno. I've tested the
hello-world example on it and seen the "You are running RIOT on a(n)
arduino-uno board. This board features a(n) atmega328p MCU."
A little update on the situation[1],
What I have personnaly tested on real hardware and works fine is :
- hello_world
- timer_periodic_wakeup
- ipc_pingpong
What should I do now to get it merged ?
From what I've read, I need to create a wiki board page, right ?
Does it need more tests ?
Or should I just wait for more reviewers ?
I just skimmed cpu/atmega328p. It looks like a lot of code is mostly
duplicate of cpu/arduino2560.
We used to "merge if it works, unify later" many ports, but that "later"
tends to get forgotten, with bug fixes / improvements ending up in only
half of the branches...
Could we find a way to consolidate arduino2560 and 328p and move shared
code into atmega_common?
Shared code between atmega260 and atmega328p now live in atmega_common,
except startup.c which I dont find how to move it yet, certainly due
to the "export UNDEF += $(BINDIR)cpu/startup.o" directive.
Tests has been done on emulator since I don't have the mega2560.
Hi Laurent,
don’t want to discourage you, but you do not have to update on this mailing list for every step you do. Just the major ones are enough ;-). Those of us interested (as for example me) will most likely follow your PR anyways.
BTW: when you write your wiki page on the board can you add a section on how to use the emulator?
I now have a new git branch based on recent master which supports uno
and duemilanove models.
all common code is in boards/arduino-common and difference lives in
boards/arduino-uno and boards/arduino-duemilanove.
Should I push -f on original PR [1] ?
Or it is cleaner to close [1] and open a new PR ?