From 4f0b48174bcdae62566794f2402b8329c2394172 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 28 Apr 2016 16:27:53 +0300 Subject: [PATCH] Add support for MightyCore boards // Resolve #585 --- HISTORY.rst | 3 + docs/frameworks/arduino.rst | 62 ++++++++++++++ docs/frameworks/simba.rst | 3 + docs/platforms/atmelavr.rst | 62 ++++++++++++++ docs/platforms/espressif.rst | 6 ++ platformio/boards/mightycore.json | 133 ++++++++++++++++++++++++++++++ scripts/docspregen.py | 3 + 7 files changed, 272 insertions(+) create mode 100644 platformio/boards/mightycore.json diff --git a/HISTORY.rst b/HISTORY.rst index 0c36b218..e1be4bcf 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -26,6 +26,9 @@ PlatformIO 2.0 * Added support for Generic ATTiny boards: ATTiny13, ATTiny24, ATTiny25, ATTiny45 and ATTiny85 (`issue #636 `_) +* Added support for MightyCore boards: ATmega1284, ATmega644, ATmega324, + ATmega164, ATmega32, ATmega16 and ATmega8535 + (`issue #585 `_) * Added support for `TI MSP430 `__ boards: TI LaunchPad w/ msp430fr4133 and TI LaunchPad w/ msp430fr6989 * Updated Arduino core for Espressif platform to 2.2.0 diff --git a/docs/frameworks/arduino.rst b/docs/frameworks/arduino.rst index 09b720b7..31ff07eb 100644 --- a/docs/frameworks/arduino.rst +++ b/docs/frameworks/arduino.rst @@ -808,6 +808,13 @@ Generic ATTiny - Flash - RAM + * - ``attiny13`` + - `Generic ATTiny13 `_ + - ATTINY13 + - 9 MHz + - 1 Kb + - 0.0625 Kb + * - ``attiny24`` - `Generic ATTiny24 `_ - ATTINY24 @@ -917,6 +924,61 @@ LowPowerLab - 128 Kb - 16 Kb +Mcudude +~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``mightycore1284`` + - `MightyCore ATmega1284 `_ + - ATMEGA1284P + - 16 MHz + - 128 Kb + - 16 Kb + + * - ``mightycore16`` + - `MightyCore ATmega16 `_ + - ATMEGA16 + - 16 MHz + - 16 Kb + - 1 Kb + + * - ``mightycore164`` + - `MightyCore ATmega164 `_ + - ATMEGA164P + - 16 MHz + - 16 Kb + - 1 Kb + + * - ``mightycore32`` + - `MightyCore ATmega32 `_ + - ATMEGA32 + - 16 MHz + - 32 Kb + - 2 Kb + + * - ``mightycore324`` + - `MightyCore ATmega324 `_ + - ATMEGA324P + - 16 MHz + - 32 Kb + - 2 Kb + + * - ``mightycore644`` + - `MightyCore ATmega644 `_ + - ATMEGA644P + - 16 MHz + - 64 Kb + - 4 Kb + Microduino ~~~~~~~~~~ diff --git a/docs/frameworks/simba.rst b/docs/frameworks/simba.rst index d16ca1c6..c179ebc7 100644 --- a/docs/frameworks/simba.rst +++ b/docs/frameworks/simba.rst @@ -33,6 +33,9 @@ Platforms * - :ref:`platform_atmelsam` - Atmel | SMART offers Flash- based ARM products based on the ARM Cortex-M0+, Cortex-M3 and Cortex-M4 architectures, ranging from 8KB to 2MB of Flash including a rich peripheral and feature mix. + * - :ref:`platform_espressif` + - Espressif Systems is a privately held fabless semiconductor company. They provide wireless communications and Wi-Fi chips which are widely used in mobile devices and the Internet of Things applications. + Boards ------ diff --git a/docs/platforms/atmelavr.rst b/docs/platforms/atmelavr.rst index cb466aed..da5eac55 100644 --- a/docs/platforms/atmelavr.rst +++ b/docs/platforms/atmelavr.rst @@ -510,6 +510,13 @@ Generic ATTiny - Flash - RAM + * - ``attiny13`` + - `Generic ATTiny13 `_ + - ATTINY13 + - 9 MHz + - 1 Kb + - 0.0625 Kb + * - ``attiny24`` - `Generic ATTiny24 `_ - ATTINY24 @@ -599,6 +606,61 @@ LowPowerLab - 128 Kb - 16 Kb +Mcudude +~~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller + - Frequency + - Flash + - RAM + + * - ``mightycore1284`` + - `MightyCore ATmega1284 `_ + - ATMEGA1284P + - 16 MHz + - 128 Kb + - 16 Kb + + * - ``mightycore16`` + - `MightyCore ATmega16 `_ + - ATMEGA16 + - 16 MHz + - 16 Kb + - 1 Kb + + * - ``mightycore164`` + - `MightyCore ATmega164 `_ + - ATMEGA164P + - 16 MHz + - 16 Kb + - 1 Kb + + * - ``mightycore32`` + - `MightyCore ATmega32 `_ + - ATMEGA32 + - 16 MHz + - 32 Kb + - 2 Kb + + * - ``mightycore324`` + - `MightyCore ATmega324 `_ + - ATMEGA324P + - 16 MHz + - 32 Kb + - 2 Kb + + * - ``mightycore644`` + - `MightyCore ATmega644 `_ + - ATMEGA644P + - 16 MHz + - 64 Kb + - 4 Kb + Microduino ~~~~~~~~~~ diff --git a/docs/platforms/espressif.rst b/docs/platforms/espressif.rst index f1e31659..d14329d3 100644 --- a/docs/platforms/espressif.rst +++ b/docs/platforms/espressif.rst @@ -31,6 +31,9 @@ Packages * - ``toolchain-xtensa`` - `xtensa-gcc `_, `GDB `_ + * - ``framework-simba`` + - `Simba Framework `_ + * - ``tool-esptool`` - `esptool-ck `_ @@ -67,6 +70,9 @@ Frameworks * - :ref:`framework_arduino` - Arduino Wiring-based Framework allows writing cross-platform software to control devices attached to a wide range of Arduino boards to create all kinds of creative coding, interactive objects, spaces or physical experiences. + * - :ref:`framework_simba` + - Simba is an RTOS and build framework. It aims to make embedded programming easy and portable. + Boards ------ diff --git a/platformio/boards/mightycore.json b/platformio/boards/mightycore.json new file mode 100644 index 00000000..88730431 --- /dev/null +++ b/platformio/boards/mightycore.json @@ -0,0 +1,133 @@ +{ + "mightycore1284": { + "build": { + "core": "MightyCore", + "extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_ATmega1284", + "f_cpu": "16000000L", + "mcu": "atmega1284p", + "variant": "mightycore" + }, + "frameworks": ["arduino"], + "name": "MightyCore ATmega1284", + "platform": "atmelavr", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 130048, + "protocol": "arduino", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "https://www.tindie.com/products/MCUdude/dip-40-arduino-compatible-development-board", + "vendor": "Mcudude" + }, + + "mightycore644": { + "build": { + "core": "MightyCore", + "extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_ATmega644", + "f_cpu": "16000000L", + "mcu": "atmega644p", + "variant": "mightycore" + }, + "frameworks": ["arduino"], + "name": "MightyCore ATmega644", + "platform": "atmelavr", + "upload": { + "maximum_ram_size": 4096, + "maximum_size": 64512, + "protocol": "arduino", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "https://www.tindie.com/products/MCUdude/dip-40-arduino-compatible-development-board", + "vendor": "Mcudude" + }, + + "mightycore324": { + "build": { + "core": "MightyCore", + "extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_ATmega324", + "f_cpu": "16000000L", + "mcu": "atmega324p", + "variant": "mightycore" + }, + "frameworks": ["arduino"], + "name": "MightyCore ATmega324", + "platform": "atmelavr", + "upload": { + "maximum_ram_size": 2048, + "maximum_size": 32256, + "protocol": "arduino", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "https://www.tindie.com/products/MCUdude/dip-40-arduino-compatible-development-board", + "vendor": "Mcudude" + }, + + "mightycore164": { + "build": { + "core": "MightyCore", + "extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_ATmega164", + "f_cpu": "16000000L", + "mcu": "atmega164p", + "variant": "mightycore" + }, + "frameworks": ["arduino"], + "name": "MightyCore ATmega164", + "platform": "atmelavr", + "upload": { + "maximum_ram_size": 1024, + "maximum_size": 15872, + "protocol": "arduino", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "https://www.tindie.com/products/MCUdude/dip-40-arduino-compatible-development-board", + "vendor": "Mcudude" + }, + + "mightycore32": { + "build": { + "core": "MightyCore", + "extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_ATmega32", + "f_cpu": "16000000L", + "mcu": "atmega32", + "variant": "mightycore" + }, + "frameworks": ["arduino"], + "name": "MightyCore ATmega32", + "platform": "atmelavr", + "upload": { + "maximum_ram_size": 2048, + "maximum_size": 32256, + "protocol": "arduino", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "https://www.tindie.com/products/MCUdude/dip-40-arduino-compatible-development-board", + "vendor": "Mcudude" + }, + + "mightycore16": { + "build": { + "core": "MightyCore", + "extra_flags": "-DARDUINO_ARCH_AVR -DARDUINO_AVR_ATmega16", + "f_cpu": "16000000L", + "mcu": "atmega16", + "variant": "mightycore" + }, + "frameworks": ["arduino"], + "name": "MightyCore ATmega16", + "platform": "atmelavr", + "upload": { + "maximum_ram_size": 1024, + "maximum_size": 15872, + "protocol": "arduino", + "require_upload_port" : true, + "speed": 115200 + }, + "url": "https://www.tindie.com/products/MCUdude/dip-40-arduino-compatible-development-board", + "vendor": "Mcudude" + } +} \ No newline at end of file diff --git a/scripts/docspregen.py b/scripts/docspregen.py index 61d8835e..023b9bcb 100644 --- a/scripts/docspregen.py +++ b/scripts/docspregen.py @@ -34,6 +34,9 @@ def is_compat_platform_and_framework(platform, framework): def generate_boards(boards): def _round_memory_size(size): + if size == 1: + return 1; + size = ceil(size) for b in (64, 32, 16, 8, 4, 2, 1): if b < size: