boards: add arduino uno and duemilanove support#5451
Conversation
boards/arduino-uno/board.c
Outdated
| /* | ||
| * Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen | ||
| * 2015 Kaspar Schleiser <[email protected]> | ||
| * 2016 Laurent Navet <[email protected]> |
cpu/atmega328p/periph/uart.c
Outdated
| UART0_RX_IRQ_EN; | ||
| break; | ||
| #endif /* UART_0_EN */ | ||
| #if UART_1_EN |
There was a problem hiding this comment.
There's only one UART on this CPU, so the code referring to uart interfaces > 0 should be removed.
|
Tested on an arduino uno, works if one change the Apart from that and the comment about the UART interfaces, this is a good job, thanks ! |
Do it similar to the cortex-m platforms: make an (or multiple aptly named) |
boards/arduino-uno/Makefile.include
Outdated
| export DEBUGGER_FLAGS = "-x $(RIOTBOARD)/$(BOARD)/dist/gdb.conf $(ELFFILE)" | ||
| export DEBUGGER = $(DIST_PATH)/debug.sh $(DEBUGSERVER_FLAGS) $(DIST_PATH) $(DEBUGSERVER_PORT) | ||
|
|
||
| # PROGRAMMER defaults to stk500v2 which is the internal flasher via USB. Can be |
There was a problem hiding this comment.
programmer needs to be updated in the comment as well
|
Squashing Done. |
|
Actually the squashing should be done when the review is done and the PR is ready to be merged. I put the label just to don't forget to do it... sorry if it made you think that the squashing was needed now... |
|
No problem, will squash again if needed :) |
|
I've added a patch that place shared code between atmega328p and atmega2560 in atmega_common. |
|
Let's wait for #5529, it will simplify the code since only few modifications to the common sources will be needed. |
|
I can if you're interested, at least the duemilanove with the atmega328. |
|
I don't want to force you. But I've got one duemilanove (atmega328) laying around which I never used before :-) |
|
For what I know the only difference between the two is that the Duemilanove uses a FTDI USB chip while the Uno uses a second Atmel who acts as USB-serial converter. So that should be simple |
|
Just looked at the latest commits and you still have the |
add atmega328p support with: uart, timer, spi and gpio
|
@PeterKietzmann, you can remove dust from your duemilanove and test it :-) |
|
a video proof that it works. |
|
I think all issues have been fixed. |
|
@mali. Just tested with an Arduino Uno (I don't have duemilanove) : it works fine. I give an ACK. Let's now wait for Murdock. |
|
@mali, just in case you missed it, Murdock is complaining (search for "Errors" in the page pointed by "Details" above). |
aabadie
left a comment
There was a problem hiding this comment.
@mali with the inline comment, doxygen warning should be fixed.
But I don't really understand what's wrong with the pipe test build failure (malloc.h missing). Maybe @kaspar030 has an idea ?
| */ | ||
|
|
||
| /** | ||
| * @defgroup boards_arduino-common |
There was a problem hiding this comment.
The doxygen warning triggering a Murdock error comes from this line (try make doc at the root of riot repository and look at the first warning).
To fix it, you can change it like this:
* @defgroup boards_arduino-common Arduino common|
Murdock is green :-) |
aabadie
left a comment
There was a problem hiding this comment.
2 things remaining:
- apply changes requested by the comment above
- squash the commits
After that => ACK (again)
tests/pthread/Makefile
Outdated
|
|
||
| BOARD_BLACKLIST := arduino-mega2560 waspmote-pro | ||
| # arduino-mega2560: unknown type name: clockid_t | ||
| BOARD_BLACKLIST += arduino-uno arduino-duemilanove |
There was a problem hiding this comment.
arduino-uno and arduino-duemilanove boards are blacklisted for the same reason (unknown type clockid_t) so no need to add those 2 extra lines, you can just append them to the first line and update the comment above.
There are a other places were this should be changed.
Uno and Duemilanove(atmega328p version) are nearly the same boards. The only difference is that the Duemilanove use an FTDI usb chip, while the Uno use an Atmel which acts as USB/Serial converter. All of the code needed to support these boards is in arduino-common.
- blacklist arduino-uno and arduino-duemilanove for coap, libfixmath_unittests, lwip, nhdp, pthread, pthread_barrier, pthread_cleanup, pthread_condition_variable pthread_cooperation, pthread_rwlock and pthread_tls tests. - fix sys/pipe build - unittests: boards added to BOARD_INSUFICIENT_MEMORY list.
|
New failures comes from #5763 merge |
mali
left a comment
There was a problem hiding this comment.
@kYc0o or @LudwigKnuepfer I would like your opinion on this change related to PR5763
|
Sorry again, @mali. You already backported the change and fixed the failing CI ! Great :) |
|
@aabadie , I had this in queue in another branch ;-) |
|
Just tested it with some examples and tests. It works. ACK and go ! |

Add basic support of :
- atmega328p MCU
- arduino uno board