From f3526b1d95ad7dc07731735d2a43f7aebee7c24c Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 3 Jun 2016 20:14:37 +0300 Subject: [PATCH] Add support for Arduboy --- HISTORY.rst | 1 + docs/frameworks/arduino.rst | 20 +++++++++++++++++++ docs/platforms/atmelavr.rst | 20 +++++++++++++++++++ docs/platforms/embedded_boards.rst | 20 +++++++++++++++++++ platformio/boards/misc.json | 32 ++++++++++++++++++++++++++++++ platformio/util.py | 2 +- 6 files changed, 94 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index d9c94813..6836d2e1 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,7 @@ PlatformIO 2.0 2.9.3 (2016-06-??) ~~~~~~~~~~~~~~~~~~ +* Added support for Arduboy, the game system the size of a credit card * Refactored firmware uploading to the embedded boards with SAM-BA bootloader 2.9.2 (2016-06-02) diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 90054e71..b4fcf0e7 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -176,6 +176,26 @@ Adafruit - 8 Kb - 0.5 Kb +Arduboy +~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``arduboy`` + - `Arduboy `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + Arduino ~~~~~~~ diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index 30f5aa76..d1e26c13 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.rst @@ -166,6 +166,26 @@ Adafruit - 8 Kb - 0.5 Kb +Arduboy +~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``arduboy`` + - `Arduboy `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + Arduino ~~~~~~~ diff --git a/docs/platforms/embedded_boards.rst b/docs/platforms/embedded_boards.rst index 440ddb8c..9b755937 100644 --- a/docs/platforms/embedded_boards.rst +++ b/docs/platforms/embedded_boards.rst @@ -162,6 +162,26 @@ Adafruit - 8 Kb - 0.5 Kb +Arduboy +~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``arduboy`` + - `Arduboy `_ + - ATMEGA32U4 + - 16 MHz + - 32 Kb + - 2.5 Kb + Arduino ~~~~~~~ diff --git a/platformio/boards/misc.json b/platformio/boards/misc.json index bbff9241..4d65abdb 100644 --- a/platformio/boards/misc.json +++ b/platformio/boards/misc.json @@ -738,5 +738,37 @@ }, "url": "http://www.atmel.com/devices/ATTINY85.aspx", "vendor": "Generic ATTiny" + }, + + "arduboy": { + "build": { + "core": "arduino", + "extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_LEONARDO", + "f_cpu": "16000000L", + "mcu": "atmega32u4", + "usb_product": "Arduino Leonardo", + "variant": "leonardo", + "hwid": [ + ["0x2341", "0x0036"], + ["0x2341", "0x8036"], + ["0x2A03", "0x0036"], + ["0x2A03", "0x8036"] + ] + }, + "frameworks": ["arduino"], + "name": "Arduboy", + "platform": "atmelavr", + "upload": { + "disable_flushing": true, + "maximum_ram_size": 2560, + "maximum_size": 28672, + "protocol": "avr109", + "require_upload_port" : true, + "speed": 57600, + "use_1200bps_touch": true, + "wait_for_upload_port": true + }, + "url": "https://www.arduboy.com", + "vendor": "Arduboy" } } diff --git a/platformio/util.py b/platformio/util.py index 36576295..864e0ea8 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -300,7 +300,7 @@ def get_serialports(): # fix for PySerial if not result and system() == "Darwin": for p in glob("/dev/tty.*"): - result.append({"port": p, "description": "", "hwid": ""}) + result.append({"port": p, "description": "n/a", "hwid": "n/a"}) return result