-
Notifications
You must be signed in to change notification settings - Fork 2.1k
boards: add arduino uno and duemilanove support #5451
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
Conversation
/* | ||
* Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen | ||
* 2015 Kaspar Schleiser <kaspar@schleiser.de> | ||
* 2016 Laurent Navet <laurent.navet@gmail.com> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation off
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
UART0_RX_IRQ_EN; | ||
break; | ||
#endif /* UART_0_EN */ | ||
#if UART_1_EN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's only one UART on this CPU, so the code referring to uart interfaces > 0 should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
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) |
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
programmer needs to be updated in the comment as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed, fixed
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. |
Started a wiki page : https://github.com/RIOT-OS/RIOT/wiki/Board:-Arduino-Uno |
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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thank's !
Murdock is green :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 things remaining:
- apply changes requested by the comment above
- squash the commits
After that => ACK (again)
@@ -3,6 +3,8 @@ include ../Makefile.tests_common | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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