-
Notifications
You must be signed in to change notification settings - Fork 2k
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
boards/arduino-nano: Support for the Arduino Nano #9499
Conversation
TODO: Is the serial device on Linux really |
@maribu I think you need to find someone with an Arduino Nano in order to complete this PR. Your similar board is not enough because we have no guarantee that it will translate over to the Arduino Nano. |
@ZetaR60: All Arduino clones I saw so far use the same PIN layout, the same MCU, and the same bootloader. Some use a different USB to UART chip, which is a minor inconvenience on Linux machines. E.g. the device file of official Arduino UNO will be located at This PR uses |
@SemjonKerner, @sebastiankliem, @smlng: You were active in the old and apparently dead Arduino Nano PR. Did you test that PR on original hardware? If so, could test this PR, also? |
@maribu The code would probably end up okay, but in my opinion should still be tested at least once on an original. I think it is fine to go ahead and work on the PR, as it shouldn't be too hard to find someone that has one. |
@ZetaR60: I totally agree that this should be tested on an original Arduino. I just wanted to point out, that apart from the |
Another issue: Currently this PR contains no C code or header files. As result, Doxygen documentation for this board is available. May creating a Or maybe the whole folder should be dropped and instead some Makefile magic like ifeq($(BOARD),arduino-nano)
export PROGRAMMER_SPEED ?= 57600
BOARD := arduino-uno
endif should be used? |
Please look at #9130, I'd like to avoid more code duplication by adding more atmega based boards. I know the PR seems big but I'll try to split it once they allow me to squash. |
@kYc0o: I'm not sure if I got you. Are you suggesting to wait until #9130 is merged, than rebase this PR against it? Actually, I'm not even sure if this PR is really required. Updating the wiki page to tell users to just use treat the Nano as an Arduino Uno with a different programmer speed might be just as fine. E.g. like this: make BOARD=arduino-uno PROGRAMMER_SPEED=57600 flash
make BOARD=arduino-uno term |
I did not test the code on original hardware. Unfortunately, I do not have any capacity to work on this further. |
I'd say yes, wait to unify and clean up the code. Then we continue to add more boards. For the sake of consistency, I think the board folder is needed, along with the required (minimal) files. After #9130 is merged this should be 2 or 3 files max. |
Maybe @miri64 might want to take a look, as I shamelessly stole all code in this PR from her ;-) In the meantime I verified that |
Again: not my domain (I only reviewed #7306 because I happened to have it in my drawer ;-)). |
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.
Untested ACK.
There are basically no changes to the base code, however I'd like someone to test it. Unfortunately I don't have the hardware.
If it doesn't get tested you might merge it before the soft feature freeze.
You need to blacklist the board on some tests before Murdock is happy. |
Removing approval so we don't accidentally merge this PR untested ;-)
I believe I have a nano at home. If so I can test this PR by beginning of the next week. |
My "nano" is indeed a clone. The PR works out of the box, but sadly I couldn't flash some tests and examples, like I did nothing but install the compiler, and make |
Thats expexted, this doesn't work for the Uno either. Thanks for testing! |
Everything seems ok but (again...) the board needs to be marked as insufficient memory... |
The Arduino Nano board is the cheapest member of the Arduino family and used the same MCU as the Arduino Uno. It differs in the form factor (the Nano is much smaller), it uses an integrated FT232RL TTL adapter instead of an ATmega16u2 to provide access to the serial console via USB, and it uses a different bootloader (which occupies 2 KiB of the 32 KiB flash instead of 0.5 KiB occupied on the Arduino Uno). This commit mostly copy pastes code from the Arduino Uno.
Added arduino-nano to BOARD_INSUFFICIENT_MEMORY/BOARD_BLACKLIST following suit of how arduino-uno is marked, as arduino-nano is mostly an Uno in a different form factor.
Added arduino-nano to BOARD_INSUFFICIENT_MEMORY/BOARD_BLACKLIST following suit of how arduino-uno is marked, as arduino-nano is mostly an Uno in a different form factor.
So, after updating 141 Makefiles and adding the Nano @kYc0o: Mind to merge before anyone touches one of the 141 Makefiles? Otherwise I would need to rebase again and solve the merge conflicts. |
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.
ACK.
Oops, the latest commit message has "Upadte" twice, but it's rather a detail. Thanks for your contribution @maribu ! |
That kind of error is really typical for me... |
Contribution description
This PR adds support for the Arduino Nano. The Arduino Nano board is the cheapest member of the Arduino family and used the same MCU as the Arduino Uno. It differs in the form factor (the Nano is much smaller), it uses an integrated FT232RL TTL adapter instead of an ATmega16u2 to provide access to the serial console via USB, and it uses a different bootloader (which occupies 2 KiB of the 32 KiB flash instead of 0.5 KiB occupied on the Arduino Uno). This commit mostly copy pastes code from the Arduino Uno.
Testing procedure
make BOARD=arduino-nano flash
andmake BOARD=arduino-nano term
works forexamples/hello-world
As this shares most code with the Arduino UNO, no huge troubles are expected.
Issues/PRs references
None