diff --git a/boards/arduino-nano/Makefile b/boards/arduino-nano/Makefile new file mode 100644 index 0000000000..8c6f44eb53 --- /dev/null +++ b/boards/arduino-nano/Makefile @@ -0,0 +1,5 @@ +MODULE = board + +DIRS = $(RIOTBOARD)/common/arduino-atmega + +include $(RIOTBASE)/Makefile.base diff --git a/boards/arduino-nano/Makefile.dep b/boards/arduino-nano/Makefile.dep new file mode 100644 index 0000000000..580e800f2f --- /dev/null +++ b/boards/arduino-nano/Makefile.dep @@ -0,0 +1,3 @@ +USEMODULE += boards_common_arduino-atmega + +include $(RIOTBOARD)/common/arduino-atmega/Makefile.dep diff --git a/boards/arduino-nano/Makefile.features b/boards/arduino-nano/Makefile.features new file mode 100644 index 0000000000..b3d37cc98b --- /dev/null +++ b/boards/arduino-nano/Makefile.features @@ -0,0 +1,3 @@ +include $(RIOTBOARD)/common/arduino-atmega/Makefile.features + +include $(RIOTCPU)/atmega328p/Makefile.features diff --git a/boards/arduino-nano/Makefile.include b/boards/arduino-nano/Makefile.include new file mode 100644 index 0000000000..c6908754f3 --- /dev/null +++ b/boards/arduino-nano/Makefile.include @@ -0,0 +1,23 @@ +# define the cpu used by the Arduino Nano board +export CPU = atmega328p + +# configure the terminal program +PORT_LINUX ?= /dev/ttyUSB0 +PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*))) +BAUD ?= 9600 + +PROGRAMMER ?= arduino + +ifeq (arduino,$(PROGRAMMER)) + # the Arduino Nano bootloader is 2KiB in size + BOOTLOADER_SIZE ?= 2048 + # the Nano's bootloader uses 57600 baud for programming + FFLAGS_EXTRA += -b 57600 +else + # not using the bootloader for programming, thus the whole flash can be used + BOOTLOADER_SIZE ?= 0 +endif + +ROM_RESERVED ?= $(BOOTLOADER_SIZE) + +include $(RIOTBOARD)/common/arduino-atmega/Makefile.include diff --git a/boards/arduino-nano/doc.txt b/boards/arduino-nano/doc.txt new file mode 100644 index 0000000000..22b5877726 --- /dev/null +++ b/boards/arduino-nano/doc.txt @@ -0,0 +1,42 @@ +/** +@defgroup boards_arduino-nano Arduino Nano +@ingroup boards +@brief Support for the Arduino Nano board + +## Overview + +The Arduino Nano is the cheapest member of the Arduino family. It is based on +Atmel's AVR architecture and sports an ATmega328p MCU. It is like many Arduinos +extensible by using shields. + +### MCU +| MCU | ATmega328p | +|:------------- |:--------------------------------------------- | +| Family | AVR/ATmega | +| Vendor | Atmel | +| RAM | 2 KiB | +| Flash | 32 KiB (2 KiB reserved for the bootloader) | +| Frequency | 16 MHz | +| Timers | 3 (2x 8bit, 1x 16bit) | +| ADCs | 6 analog input pins | +| UARTs | 1 | +| SPIs | 1 | +| I2Cs | 1 (called TWI) | +| Vcc | 5.0V | +| MCU Datasheet | [ATmega328p datasheet](http://ww1.microchip.com/downloads/en/DeviceDoc/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061A.pdf) | +| Board Manual | [Board Manual](https://www.arduino.cc/en/uploads/Main/ArduinoNanoManual23.pdf) | + +## Flashing the device +Flashing RIOT on the Arduino Nano is quite straight forward, just connect your +Arduino Nano via the USB connector to your host computer and type: + +`make BOARD=arduino-nano flash` + +This should take care of everything! + +We use the open `avrdude` tool to write the new code into the ATmega328p's +flash + +##Caution +Don't expect having a working network stack due to very limited resources. + */ diff --git a/boards/arduino-nano/include/board.h b/boards/arduino-nano/include/board.h new file mode 100644 index 0000000000..caf484f4f3 --- /dev/null +++ b/boards/arduino-nano/include/board.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2017 Freie Universität Berlin + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup boards_arduino-nano + * @{ + * + * @file + * @brief Board specific definitions for the Arduino Uno board + * + * @author Martine Lenders + */ + +#ifndef BOARD_H +#define BOARD_H + +#include "board_common.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* BOARD_H */ +/** @} */