Update docs for embedded platforms, frameworks and boards

This commit is contained in:
Ivan Kravets
2016-09-03 16:26:52 +03:00
parent c8849a4648
commit 7f1b569d6f
27 changed files with 288 additions and 327 deletions

View File

@@ -151,7 +151,7 @@ Adafruit
* - ``protrinket3ftdi`` * - ``protrinket3ftdi``
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_ - `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P - ATMEGA328P
- 16 MHz - 12 MHz
- 32 Kb - 32 Kb
- 2 Kb - 2 Kb

View File

@@ -266,6 +266,26 @@ Freescale
- 256 Kb - 256 Kb
- 32 Kb - 32 Kb
Generic
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``bluepill_f103c8``
- `BluePill F103C8 <http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103c8.html>`_
- STM32F103C8T6
- 72 MHz
- 64 Kb
- 20 Kb
JKSoft JKSoft
~~~~~~ ~~~~~~

View File

@@ -28,21 +28,34 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``toolchain-atmelavr`` * - ``framework-arduinoavr``
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_, `GDB <http://www.gnu.org/software/gdb/>`_, `AVaRICE <http://avarice.sourceforge.net/>`_, `SimulAVR <http://www.nongnu.org/simulavr/>`_ - `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
* - ``tool-avrdude``
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
* - ``framework-simba`` * - ``framework-simba``
- `Simba Framework <https://github.com/eerimoq/simba>`_ - `Simba Framework <https://github.com/eerimoq/simba>`_
* - ``framework-arduinoavr`` * - ``tool-avrdude``
- `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_ - `AVRDUDE <http://www.nongnu.org/avrdude/>`_
* - ``tool-micronucleus`` * - ``tool-micronucleus``
- `Micronucleus <https://github.com/micronucleus/micronucleus>`_ - `Micronucleus <https://github.com/micronucleus/micronucleus>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-atmelavr``
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_, `GDB <http://www.gnu.org/software/gdb/>`_, `AVaRICE <http://avarice.sourceforge.net/>`_, `SimulAVR <http://www.nongnu.org/simulavr/>`_
.. warning::
**Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
**Windows Users:** Please check that you have correctly installed USB
driver from board manufacturer
Frameworks Frameworks
---------- ----------
.. list-table:: .. list-table::
@@ -124,7 +137,7 @@ Adafruit
* - ``protrinket3ftdi`` * - ``protrinket3ftdi``
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_ - `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P - ATMEGA328P
- 16 MHz - 12 MHz
- 32 Kb - 32 Kb
- 2 Kb - 2 Kb

View File

@@ -28,30 +28,30 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``framework-arduinosam`` * - ``framework-arduinosam``
- `Arduino Wiring-based Framework (SAM Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_ - `Arduino Wiring-based Framework (SAM Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
* - ``ldscripts`` * - ``framework-mbed``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_ - `mbed Framework <http://mbed.org>`_
* - ``framework-simba`` * - ``framework-simba``
- `Simba Framework <https://github.com/eerimoq/simba>`_ - `Simba Framework <https://github.com/eerimoq/simba>`_
* - ``tool-openocd``
- `OpenOCD <http://openocd.org>`_
* - ``tool-avrdude`` * - ``tool-avrdude``
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_ - `AVRDUDE <http://www.nongnu.org/avrdude/>`_
* - ``tool-bossac`` * - ``tool-bossac``
- `BOSSA CLI <https://sourceforge.net/projects/b-o-s-s-a/>`_ - `BOSSA CLI <https://sourceforge.net/projects/b-o-s-s-a/>`_
* - ``tool-openocd``
- `OpenOCD <http://openocd.org>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file). `99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).
@@ -73,12 +73,12 @@ Frameworks
* - :ref:`framework_arduino` * - :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. - 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_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
* - :ref:`framework_simba` * - :ref:`framework_simba`
- Simba is an RTOS and build framework. It aims to make embedded programming easy and portable. - Simba is an RTOS and build framework. It aims to make embedded programming easy and portable.
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
Boards Boards
------ ------

View File

@@ -137,7 +137,7 @@ Adafruit
* - ``protrinket3ftdi`` * - ``protrinket3ftdi``
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_ - `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
- ATMEGA328P - ATMEGA328P
- 16 MHz - 12 MHz
- 32 Kb - 32 Kb
- 2 Kb - 2 Kb
@@ -1123,6 +1123,26 @@ Fubarino
- 512 Kb - 512 Kb
- 128 Kb - 128 Kb
Generic
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``bluepill_f103c8``
- `BluePill F103C8 <http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103c8.html>`_
- STM32F103C8T6
- 72 MHz
- 64 Kb
- 20 Kb
Generic ATTiny Generic ATTiny
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

View File

@@ -28,26 +28,26 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``toolchain-xtensa`` * - ``framework-arduinoespressif``
- `xtensa-gcc <https://github.com/jcmvbkbc/gcc-xtensa>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_
* - ``framework-simba`` * - ``framework-simba``
- `Simba Framework <https://github.com/eerimoq/simba>`_ - `Simba Framework <https://github.com/eerimoq/simba>`_
* - ``sdk-esp8266``
- `ESP8266 SDK <http://bbs.espressif.com>`_
* - ``tool-esptool`` * - ``tool-esptool``
- `esptool-ck <https://github.com/igrr/esptool-ck>`_ - `esptool-ck <https://github.com/igrr/esptool-ck>`_
* - ``tool-mkspiffs`` * - ``tool-mkspiffs``
- `Tool to build and unpack SPIFFS images <https://github.com/igrr/mkspiffs>`_ - `Tool to build and unpack SPIFFS images <https://github.com/igrr/mkspiffs>`_
* - ``framework-arduinoespressif`` * - ``tool-scons``
- `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_ - `SCons software construction tool <http://www.scons.org>`_
* - ``ldscripts`` * - ``toolchain-xtensa``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_ - `xtensa-gcc <https://github.com/jcmvbkbc/gcc-xtensa>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``sdk-esp8266``
- `ESP8266 SDK <http://bbs.espressif.com>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file

View File

@@ -31,6 +31,9 @@ Packages
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmnoneeabi`` * - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_

View File

@@ -34,6 +34,9 @@ Packages
* - ``tool-arduino101load`` * - ``tool-arduino101load``
- `Genuino101 uploader <https://github.com/01org/intel-arduino-tools>`_ - `Genuino101 uploader <https://github.com/01org/intel-arduino-tools>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-intelarc32`` * - ``toolchain-intelarc32``
- `GCC for Intel ARC <https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain>`_ - `GCC for Intel ARC <https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain>`_

View File

@@ -28,6 +28,9 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-icestorm`` * - ``toolchain-icestorm``
- `GCC for FPGA IceStorm <http://www.clifford.at/icestorm/>`_ - `GCC for FPGA IceStorm <http://www.clifford.at/icestorm/>`_

View File

@@ -31,6 +31,9 @@ Packages
* - ``framework-wiringpi`` * - ``framework-wiringpi``
- `GPIO Interface library for the Raspberry Pi <http://wiringpi.com>`_ - `GPIO Interface library for the Raspberry Pi <http://wiringpi.com>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmlinuxgnueabi`` * - ``toolchain-gccarmlinuxgnueabi``
- `GCC for Linux ARM GNU EABI <https://gcc.gnu.org>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `GCC for Linux ARM GNU EABI <https://gcc.gnu.org>`_, `GDB <http://www.gnu.org/software/gdb/>`_

View File

@@ -28,5 +28,8 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gcclinux32`` * - ``toolchain-gcclinux32``
- `GCC for Linux i686 <https://gcc.gnu.org>`_ - `GCC for Linux i686 <https://gcc.gnu.org>`_

View File

@@ -15,7 +15,7 @@ Platform ``linux_x86_64``
========================= =========================
Linux x86_64 (64-bit) is a Unix-like and mostly POSIX-compliant computer operating system (OS) assembled under the model of free and open-source software development and distribution. Using host OS (Mac OS X or Linux 64-bit) you can build native application for Linux x86_64 platform. Linux x86_64 (64-bit) is a Unix-like and mostly POSIX-compliant computer operating system (OS) assembled under the model of free and open-source software development and distribution. Using host OS (Mac OS X or Linux 64-bit) you can build native application for Linux x86_64 platform.
For more detailed information please visit `vendor site <http://platformio.org/platforms/linux_i686>`_. For more detailed information please visit `vendor site <http://platformio.org/platforms/linux_x86_64>`_.
.. contents:: .. contents::
@@ -28,5 +28,8 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gcclinux64`` * - ``toolchain-gcclinux64``
- `GCC for Linux x86_64 <https://gcc.gnu.org>`_ - `GCC for Linux x86_64 <https://gcc.gnu.org>`_

View File

@@ -31,12 +31,15 @@ Packages
* - ``framework-arduinomicrochippic32`` * - ``framework-arduinomicrochippic32``
- `Arduino Wiring-based Framework (PIC32 Core) <https://github.com/chipKIT32/chipKIT-core>`_ - `Arduino Wiring-based Framework (PIC32 Core) <https://github.com/chipKIT32/chipKIT-core>`_
* - ``toolchain-microchippic32``
- `GCC for Microchip PIC32 <https://github.com/chipKIT32/chipKIT-cxx>`_
* - ``tool-pic32prog`` * - ``tool-pic32prog``
- `pic32prog <https://github.com/sergev/pic32prog>`_ - `pic32prog <https://github.com/sergev/pic32prog>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-microchippic32``
- `GCC for Microchip PIC32 <https://github.com/chipKIT32/chipKIT-cxx>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file
`99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file). `99-platformio-udev.rules <https://github.com/platformio/platformio/blob/develop/scripts/99-platformio-udev.rules>`_ (an instruction is located in the file).

View File

@@ -17,4 +17,16 @@ Native development platform is intended to be used for desktop OS. This platform
For more detailed information please visit `vendor site <http://platformio.org/platforms/native>`_. For more detailed information please visit `vendor site <http://platformio.org/platforms/native>`_.
.. contents:: .. contents::
Packages
--------
.. list-table::
:header-rows: 1
* - Name
- Contents
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_

View File

@@ -28,20 +28,23 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``framework-arduinonordicnrf51``
- `Arduino Wiring-based Framework (RFduino Core) <https://github.com/RFduino/RFduino>`_
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``tool-rfdloader`` * - ``tool-rfdloader``
- `rfdloader <https://github.com/RFduino/RFduino>`_ - `rfdloader <https://github.com/RFduino/RFduino>`_
* - ``toolchain-gccarmnoneeabi`` * - ``tool-scons``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `SCons software construction tool <http://www.scons.org>`_
* - ``tool-sreccat`` * - ``tool-sreccat``
- `Merging tool <https://github.com/marcows/SRecord>`_ - `Merging tool <https://github.com/marcows/SRecord>`_
* - ``framework-arduinonordicnrf51`` * - ``toolchain-gccarmnoneeabi``
- `Arduino Wiring-based Framework (RFduino Core) <https://github.com/RFduino/RFduino>`_ - `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file

View File

@@ -31,6 +31,9 @@ Packages
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmnoneeabi`` * - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_

View File

@@ -31,6 +31,9 @@ Packages
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmnoneeabi`` * - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_

View File

@@ -28,26 +28,26 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``framework-libopencm3``
- `libOpenCM3 Framework <http://www.libopencm3.org/>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``tool-stlink``
- `ST-Link <https://github.com/texane/stlink>`_
* - ``framework-spl``
- `Standard Peripheral Library for STM32 MCUs <http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257890>`_
* - ``framework-cmsis`` * - ``framework-cmsis``
- `Vendor-independent hardware abstraction layer for the Cortex-M processor series <http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php>`_ - `Vendor-independent hardware abstraction layer for the Cortex-M processor series <http://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php>`_
* - ``framework-libopencm3``
- `libOpenCM3 Framework <http://www.libopencm3.org/>`_
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``ldscripts`` * - ``framework-spl``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_ - `Standard Peripheral Library for STM32 MCUs <http://www.st.com/web/catalog/tools/FM147/CL1794/SC961/SS1743/PF257890>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``tool-stlink``
- `ST-Link <https://github.com/texane/stlink>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file
@@ -73,12 +73,12 @@ Frameworks
* - :ref:`framework_libopencm3` * - :ref:`framework_libopencm3`
- The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. - The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others.
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
* - :ref:`framework_spl` * - :ref:`framework_spl`
- The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal directly with the registers. - The ST Standard Peripheral Library provides a set of functions for handling the peripherals on the STM32 Cortex-M3 family. The idea is to save the user (the new user, in particular) having to deal directly with the registers.
* - :ref:`framework_mbed`
- The mbed framework The mbed SDK has been designed to provide enough hardware abstraction to be intuitive and concise, yet powerful enough to build complex projects. It is built on the low-level ARM CMSIS APIs, allowing you to code down to the metal if needed. In addition to RTOS, USB and Networking libraries, a cookbook of hundreds of reusable peripheral and module libraries have been built on top of the SDK by the mbed Developer Community.
Boards Boards
------ ------
@@ -142,6 +142,26 @@ Armstrap
- 512 Kb - 512 Kb
- 192 Kb - 192 Kb
Generic
~~~~~~~
.. list-table::
:header-rows: 1
* - Type ``board``
- Name
- Microcontroller
- Frequency
- Flash
- RAM
* - ``bluepill_f103c8``
- `BluePill F103C8 <http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f1-series/stm32f103/stm32f103c8.html>`_
- STM32F103C8T6
- 72 MHz
- 64 Kb
- 20 Kb
MultiTech MultiTech
~~~~~~~~~ ~~~~~~~~~

View File

@@ -15,7 +15,7 @@ Platform ``teensy``
=================== ===================
Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects. All programming is done via the USB port. No special programmer is needed, only a standard USB cable and a PC or Macintosh with a USB port. Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects. All programming is done via the USB port. No special programmer is needed, only a standard USB cable and a PC or Macintosh with a USB port.
For more detailed information please visit `vendor site <https://www.pjrc.com/teensy>`_. For more detailed information please visit `vendor site <ttps://www.pjrc.com/teensy>`_.
.. contents:: .. contents::
@@ -31,20 +31,20 @@ Packages
* - ``framework-arduinoteensy`` * - ``framework-arduinoteensy``
- `Arduino Wiring-based Framework <http://arduino.cc/en/Reference/HomePage>`_ - `Arduino Wiring-based Framework <http://arduino.cc/en/Reference/HomePage>`_
* - ``tool-teensy``
- `Teensy Loader <https://www.pjrc.com/teensy/loader.html>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``framework-mbed`` * - ``framework-mbed``
- `mbed Framework <http://mbed.org>`_ - `mbed Framework <http://mbed.org>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``tool-teensy``
- `Teensy Loader <https://www.pjrc.com/teensy/loader.html>`_
* - ``toolchain-atmelavr`` * - ``toolchain-atmelavr``
- `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_, `GDB <http://www.gnu.org/software/gdb/>`_, `AVaRICE <http://avarice.sourceforge.net/>`_, `SimulAVR <http://www.nongnu.org/simulavr/>`_ - `avr-gcc <https://gcc.gnu.org/wiki/avr-gcc>`_, `GDB <http://www.gnu.org/software/gdb/>`_, `AVaRICE <http://avarice.sourceforge.net/>`_, `SimulAVR <http://www.nongnu.org/simulavr/>`_
* - ``ldscripts`` * - ``toolchain-gccarmnoneeabi``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_ - `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file

View File

@@ -28,17 +28,20 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``toolchain-timsp430`` * - ``framework-arduinomsp430``
- `msp-gcc <http://sourceforge.net/projects/mspgcc/>`_, `GDB <http://www.gnu.org/software/gdb/>`_ - `Arduino Wiring-based Framework (MSP430 Core) <http://arduino.cc/en/Reference/HomePage>`_
* - ``tool-mspdebug``
- `MSPDebug <http://mspdebug.sourceforge.net/>`_
* - ``framework-energiamsp430`` * - ``framework-energiamsp430``
- `Energia Wiring-based Framework (MSP430 Core) <http://energia.nu/reference/>`_ - `Energia Wiring-based Framework (MSP430 Core) <http://energia.nu/reference/>`_
* - ``framework-arduinomsp430`` * - ``tool-mspdebug``
- `Arduino Wiring-based Framework (MSP430 Core) <http://arduino.cc/en/Reference/HomePage>`_ - `MSPDebug <http://mspdebug.sourceforge.net/>`_
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-timsp430``
- `msp-gcc <http://sourceforge.net/projects/mspgcc/>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file

View File

@@ -28,20 +28,20 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``ldscripts`` * - ``framework-energiativa``
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_ - `Energia Wiring-based Framework (LM4F Core) <http://energia.nu/reference/>`_
* - ``framework-libopencm3`` * - ``framework-libopencm3``
- `libOpenCM3 Framework <http://www.libopencm3.org/>`_ - `libOpenCM3 Framework <http://www.libopencm3.org/>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
* - ``tool-lm4flash`` * - ``tool-lm4flash``
- `Flash Programmer <http://www.ti.com/tool/lmflashprogrammer>`_ - `Flash Programmer <http://www.ti.com/tool/lmflashprogrammer>`_
* - ``framework-energiativa`` * - ``tool-scons``
- `Energia Wiring-based Framework (LM4F Core) <http://energia.nu/reference/>`_ - `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccarmnoneeabi``
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
.. warning:: .. warning::
**Linux Users:** Don't forget to install "udev" rules file **Linux Users:** Don't forget to install "udev" rules file
@@ -61,12 +61,12 @@ Frameworks
* - Name * - Name
- Description - Description
* - :ref:`framework_energia`
- Energia Wiring-based framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before.
* - :ref:`framework_libopencm3` * - :ref:`framework_libopencm3`
- The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others. - The libOpenCM3 framework aims to create a free/libre/open-source firmware library for various ARM Cortex-M0(+)/M3/M4 microcontrollers, including ST STM32, Ti Tiva and Stellaris, NXP LPC 11xx, 13xx, 15xx, 17xx parts, Atmel SAM3, Energy Micro EFM32 and others.
* - :ref:`framework_energia`
- Energia Wiring-based framework enables pretty much anyone to start easily creating microcontroller-based projects and applications. Its easy-to-use libraries and functions provide developers of all experience levels to start blinking LEDs, buzzing buzzers and sensing sensors more quickly than ever before.
Boards Boards
------ ------

View File

@@ -28,5 +28,8 @@ Packages
* - Name * - Name
- Contents - Contents
* - ``tool-scons``
- `SCons software construction tool <http://www.scons.org>`_
* - ``toolchain-gccmingw32`` * - ``toolchain-gccmingw32``
- `MinGW <http://www.mingw.org>`_ - `MinGW <http://www.mingw.org>`_

View File

@@ -138,7 +138,7 @@ def platform_list(json_output):
"title": p.title, "title": p.title,
"description": p.description, "description": p.description,
"version": p.version, "version": p.version,
"url": p.manifest.get("url"), "url": p.vendor_url,
"packages": p.get_installed_packages().keys(), "packages": p.get_installed_packages().keys(),
'forDesktop': any([ 'forDesktop': any([
p.name.startswith(n) for n in ("native", "linux", "windows") p.name.startswith(n) for n in ("native", "linux", "windows")

View File

@@ -333,6 +333,10 @@ class PlatformBase(PlatformPackagesMixin, PlatformRunMixin):
def homepage(self): def homepage(self):
return self._manifest.get("homepage") return self._manifest.get("homepage")
@property
def vendor_url(self):
return self._manifest.get("url")
@property @property
def license(self): def license(self):
return self._manifest.get("license") return self._manifest.get("license")

View File

@@ -429,45 +429,6 @@ def get_api_result(path, params=None, data=None):
"Please try later.") "Please try later.")
@memoized
def _lookup_frameworks():
frameworks = {}
frameworks_path = join(get_source_dir(), "builder", "scripts",
"frameworks")
frameworks_list = [f[:-3] for f in os.listdir(frameworks_path)
if not f.startswith("__") and f.endswith(".py")]
for _type in frameworks_list:
script_path = join(frameworks_path, "%s.py" % _type)
with open(script_path) as f:
fcontent = f.read()
assert '"""' in fcontent
_doc_start = fcontent.index('"""') + 3
fdoc = fcontent[_doc_start:fcontent.index('"""',
_doc_start)].strip()
doclines = [l.strip() for l in fdoc.splitlines() if l.strip()]
frameworks[_type] = {
"name": doclines[0],
"description": " ".join(doclines[1:-1]),
"url": doclines[-1],
"script": script_path
}
return frameworks
def get_frameworks(type_=None):
frameworks = _lookup_frameworks()
if type_ is None:
return frameworks
else:
if type_ not in frameworks:
raise exception.UnknownFramework(type_)
return frameworks[type_]
return frameworks
def get_pythonexe_path(): def get_pythonexe_path():
return os.environ.get("PYTHONEXEPATH", normpath(sys.executable)) return os.environ.get("PYTHONEXEPATH", normpath(sys.executable))

View File

@@ -20,12 +20,17 @@ from sys import path
path.append("..") path.append("..")
from platformio import util from platformio import util
from platformio.platforms.base import PlatformFactory, get_packages from platformio.managers.platform import PlatformFactory, PlatformManager
API_PACKAGES = util.get_api_result("/packages")
API_FRAMEWORKS = util.get_api_result("/frameworks")
BOARDS = PlatformManager().get_installed_boards()
PLATFORM_MANIFESTS = PlatformManager().get_installed()
def is_compat_platform_and_framework(platform, framework): def is_compat_platform_and_framework(platform, framework):
p = PlatformFactory.newPlatform(platform) p = PlatformFactory.newPlatform(platform)
for pkg in p.get_packages().keys(): for pkg in p.packages.keys():
if pkg.startswith("framework-%s" % framework): if pkg.startswith("framework-%s" % framework):
return True return True
return False return False
@@ -56,34 +61,29 @@ def generate_boards(boards):
- Flash - Flash
- RAM""") - RAM""")
for board in sorted(boards): for data in sorted(boards, key=lambda item: item['id']):
for type_, data in board.iteritems(): board_ram = float(data['ram']) / 1024
assert type_ in util.get_boards() lines.append("""
board_ram = float(data['upload']['maximum_ram_size']) / 1024 * - ``{id}``
lines.append("""
* - ``{type}``
- `{name} <{url}>`_ - `{name} <{url}>`_
- {mcu} - {mcu}
- {f_cpu:d} MHz - {f_cpu:d} MHz
- {rom} Kb - {rom} Kb
- {ram} Kb""".format( - {ram} Kb""".format(
type=type_, id=data['id'],
name=data['name'], name=data['name'],
url=data['url'], url=data['url'],
mcu=data['build']['mcu'].upper(), mcu=data['mcu'].upper(),
f_cpu=int((data['build']['f_cpu'][:-1])) / 1000000, f_cpu=int(data['fcpu']) / 1000000,
ram=int(board_ram) if board_ram % 1 == 0 else board_ram, ram=int(board_ram) if board_ram % 1 == 0 else board_ram,
rom=_round_memory_size( rom=_round_memory_size(data['rom'] / 1024)))
data['upload']['maximum_size'] / 1024)
))
return "\n".join(lines + [""]) return "\n".join(lines + [""])
def generate_packages(platform, packages, is_embedded): def generate_packages(platform, packagenames, is_embedded):
if not packages: if not packagenames:
return return
allpackages = get_packages()
lines = [] lines = []
lines.append(""" lines.append("""
Packages Packages
@@ -94,17 +94,15 @@ Packages
* - Name * - Name
- Contents""") - Contents""")
for type_, data in packages.iteritems(): for name in sorted(packagenames):
assert type_ in allpackages assert name in API_PACKAGES
contitems = [ contitems = [
"`%s <%s>`_" % (name, url) "`{name} <{url}>`_".format(**item) for item in API_PACKAGES[name]
for name, url in allpackages[type_]
] ]
lines.append(""" lines.append("""
* - ``{type_}`` * - ``{name}``
- {contents}""".format( - {contents}""".format(
type_=type_, name=name, contents=", ".join(contitems)))
contents=", ".join(contitems)))
if is_embedded: if is_embedded:
lines.append(""" lines.append("""
@@ -134,7 +132,8 @@ def generate_platform(name):
print "Processing platform: %s" % name print "Processing platform: %s" % name
lines = [] lines = []
lines.append(""".. Copyright 2014-present PlatformIO <contact@platformio.org> lines.append(
""".. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@@ -154,33 +153,31 @@ def generate_platform(name):
lines.append("=" * len(_title)) lines.append("=" * len(_title))
p = PlatformFactory.newPlatform(name) p = PlatformFactory.newPlatform(name)
lines.append(p.get_description()) lines.append(p.description)
lines.append(""" lines.append("""
For more detailed information please visit `vendor site <%s>`_.""" % For more detailed information please visit `vendor site <%s>`_.""" %
p.get_vendor_url()) p.vendor_url)
lines.append(""" lines.append("""
.. contents::""") .. contents::""")
# #
# Packages # Packages
# #
_packages_content = generate_packages(name, p.get_packages(), p.is_embedded()) _packages_content = generate_packages(name, p.packages.keys(),
p.is_embedded())
if _packages_content: if _packages_content:
lines.append(_packages_content) lines.append(_packages_content)
# #
# Frameworks # Frameworks
# #
_frameworks = util.get_frameworks()
_frameworks_lines = [] _frameworks_lines = []
for framework in sorted(_frameworks.keys()): for framework in API_FRAMEWORKS:
if not is_compat_platform_and_framework(name, framework): if not is_compat_platform_and_framework(name, framework['name']):
continue continue
_frameworks_lines.append(""" _frameworks_lines.append("""
* - :ref:`framework_{type_}` * - :ref:`framework_{name}`
- {description}""".format( - {description}""".format(**framework))
type_=framework,
description=_frameworks[framework]['description']))
if _frameworks_lines: if _frameworks_lines:
lines.append(""" lines.append("""
@@ -197,14 +194,13 @@ Frameworks
# Boards # Boards
# #
vendors = {} vendors = {}
for board, data in util.get_boards().items(): for board in BOARDS:
platform = data['platform'] vendor = board['vendor']
vendor = data['vendor'] if name in board['platform']:
if name in platform:
if vendor in vendors: if vendor in vendors:
vendors[vendor].append({board: data}) vendors[vendor].append(board)
else: else:
vendors[vendor] = [{board: data}] vendors[vendor] = [board]
if vendors: if vendors:
lines.append(""" lines.append("""
@@ -227,9 +223,10 @@ Boards
def update_platform_docs(): def update_platform_docs():
for name in PlatformFactory.get_platforms().keys(): for manifest in PLATFORM_MANIFESTS:
platforms_dir = join(dirname(realpath(__file__)), name = manifest['name']
"..", "docs", "platforms") platforms_dir = join(
dirname(realpath(__file__)), "..", "docs", "platforms")
rst_path = join(platforms_dir, "%s.rst" % name) rst_path = join(platforms_dir, "%s.rst" % name)
with open(rst_path, "w") as f: with open(rst_path, "w") as f:
f.write(generate_platform(name)) f.write(generate_platform(name))
@@ -241,7 +238,8 @@ def generate_framework(type_, data):
print "Processing framework: %s" % type_ print "Processing framework: %s" % type_
lines = [] lines = []
lines.append(""".. Copyright 2014-present PlatformIO <contact@platformio.org> lines.append(
""".. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@@ -276,16 +274,15 @@ Platforms
- Description""") - Description""")
_found_platform = False _found_platform = False
for platform in sorted(PlatformFactory.get_platforms().keys()): for manifest in PLATFORM_MANIFESTS:
if not is_compat_platform_and_framework(platform, type_): if not is_compat_platform_and_framework(manifest['name'], type_):
continue continue
_found_platform = True _found_platform = True
p = PlatformFactory.newPlatform(platform) p = PlatformFactory.newPlatform(manifest['name'])
lines.append(""" lines.append("""
* - :ref:`platform_{type_}` * - :ref:`platform_{type_}`
- {description}""".format( - {description}""".format(
type_=platform, type_=manifest['name'], description=p.description))
description=p.get_description()))
if not _found_platform: if not _found_platform:
del lines[-1] del lines[-1]
@@ -300,14 +297,14 @@ Boards
""") """)
vendors = {} vendors = {}
for board, data in util.get_boards().items(): for data in BOARDS:
frameworks = data['frameworks'] frameworks = data['frameworks']
vendor = data['vendor'] vendor = data['vendor']
if type_ in frameworks: if type_ in frameworks:
if vendor in vendors: if vendor in vendors:
vendors[vendor].append({board: data}) vendors[vendor].append(data)
else: else:
vendors[vendor] = [{board: data}] vendors[vendor] = [data]
for vendor, boards in sorted(vendors.iteritems()): for vendor, boards in sorted(vendors.iteritems()):
lines.append(str(vendor)) lines.append(str(vendor))
lines.append("~" * len(vendor)) lines.append("~" * len(vendor))
@@ -316,18 +313,18 @@ Boards
def update_framework_docs(): def update_framework_docs():
for name, data in util.get_frameworks().items(): for framework in API_FRAMEWORKS:
frameworks_dir = join(dirname(realpath(__file__)), name = framework['name']
"..", "docs", "frameworks") frameworks_dir = join(
dirname(realpath(__file__)), "..", "docs", "frameworks")
rst_path = join(frameworks_dir, "%s.rst" % name) rst_path = join(frameworks_dir, "%s.rst" % name)
with open(rst_path, "w") as f: with open(rst_path, "w") as f:
f.write(generate_framework(name, data)) f.write(generate_framework(name, framework))
if isfile(join(frameworks_dir, "%s_extra.rst" % name)): if isfile(join(frameworks_dir, "%s_extra.rst" % name)):
f.write("\n.. include:: %s_extra.rst\n" % name) f.write("\n.. include:: %s_extra.rst\n" % name)
def update_create_platform_doc(): def update_create_platform_doc():
allpackages = get_packages()
lines = [] lines = []
lines.append(""".. _platform_creating_packages: lines.append(""".. _platform_creating_packages:
@@ -342,32 +339,28 @@ Packages
* - Name * - Name
- Contents""") - Contents""")
for type_, data in sorted(allpackages.iteritems()): for name, items in sorted(API_PACKAGES.iteritems()):
contitems = [ contitems = ["`{name} <{url}>`_".format(**item) for item in items]
"`%s <%s>`_" % (name, url)
for name, url in allpackages[type_]
]
lines.append(""" lines.append("""
* - ``{type_}`` * - ``{name}``
- {contents}""".format( - {contents}""".format(
type_=type_, name=name, contents=", ".join(contitems)))
contents=", ".join(contitems)))
with open(join(util.get_source_dir(), "..", "docs", "platforms", with open(
"creating_platform.rst"), "r+") as fp: join(util.get_source_dir(), "..", "docs", "platforms",
"creating_platform.rst"), "r+") as fp:
content = fp.read() content = fp.read()
fp.seek(0, 0) fp.seek(0, 0)
fp.write( fp.write(content[:content.index(".. _platform_creating_packages:")] +
content[:content.index(".. _platform_creating_packages:")] + "\n".join(lines) + "\n\n" + content[content.index(
"\n".join(lines) + "\n\n" + ".. _platform_creating_manifest_file:"):])
content[content.index(".. _platform_creating_manifest_file:"):]
)
def update_embedded_boards(): def update_embedded_boards():
lines = [] lines = []
lines.append(""".. Copyright 2014-present PlatformIO <contact@platformio.org> lines.append(
""".. Copyright 2014-present PlatformIO <contact@platformio.org>
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
@@ -400,20 +393,21 @@ popular embedded boards and IDE.
lines.append("") lines.append("")
vendors = {} vendors = {}
for board, data in util.get_boards().items(): for data in BOARDS:
vendor = data['vendor'] vendor = data['vendor']
if vendor in vendors: if vendor in vendors:
vendors[vendor].append({board: data}) vendors[vendor].append(data)
else: else:
vendors[vendor] = [{board: data}] vendors[vendor] = [data]
for vendor, boards in sorted(vendors.iteritems()): for vendor, boards in sorted(vendors.iteritems()):
lines.append(str(vendor)) lines.append(str(vendor))
lines.append("~" * len(vendor)) lines.append("~" * len(vendor))
lines.append(generate_boards(boards)) lines.append(generate_boards(boards))
emboards_rst = join(dirname(realpath(__file__)), emboards_rst = join(
"..", "docs", "platforms", "embedded_boards.rst") dirname(realpath(__file__)), "..", "docs", "platforms",
"embedded_boards.rst")
with open(emboards_rst, "w") as f: with open(emboards_rst, "w") as f:
f.write("\n".join(lines)) f.write("\n".join(lines))
@@ -424,5 +418,6 @@ def main():
update_framework_docs() update_framework_docs()
update_embedded_boards() update_embedded_boards()
if __name__ == "__main__": if __name__ == "__main__":
sys_exit(main()) sys_exit(main())

View File

@@ -1,120 +0,0 @@
# Copyright 2014-present PlatformIO <contact@platformio.org>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import argparse
import zipfile
from os import getcwd, listdir, makedirs, mkdir, rename
from os.path import isdir, isfile, join
from shutil import move, rmtree
from sys import exit as sys_exit
from sys import path
path.append("..")
from platformio.util import exec_command, get_home_dir
def _unzip_generated_file(mbed_dir, output_dir, mcu):
filename = join(
mbed_dir, "build", "export", "MBED_A1_emblocks_%s.zip" % mcu)
variant_dir = join(output_dir, "variant", mcu)
if isfile(filename):
with zipfile.ZipFile(filename) as zfile:
mkdir(variant_dir)
zfile.extractall(variant_dir)
for f in listdir(join(variant_dir, "MBED_A1")):
if not f.lower().startswith("mbed"):
continue
move(join(variant_dir, "MBED_A1", f), variant_dir)
rename(join(variant_dir, "MBED_A1.eix"),
join(variant_dir, "%s.eix" % mcu))
rmtree(join(variant_dir, "MBED_A1"))
else:
print "Warning! Skipped board: %s" % mcu
def buildlib(mbed_dir, mcu, lib="mbed"):
build_command = [
"python",
join(mbed_dir, "workspace_tools", "build.py"),
"--mcu", mcu,
"-t", "GCC_ARM"
]
if lib is not "mbed":
build_command.append(lib)
build_result = exec_command(build_command, cwd=getcwd())
if build_result['returncode'] != 0:
print "* %s doesn't support %s library!" % (mcu, lib)
def copylibs(mbed_dir, output_dir):
libs = ["dsp", "fat", "net", "rtos", "usb", "usb_host"]
libs_dir = join(output_dir, "libs")
makedirs(libs_dir)
print "Moving generated libraries to framework dir..."
for lib in libs:
if lib == "net":
move(join(mbed_dir, "build", lib, "eth"), libs_dir)
continue
move(join(mbed_dir, "build", lib), libs_dir)
def main(mbed_dir, output_dir):
print "Starting..."
path.append(mbed_dir)
from workspace_tools.export import gccarm
if isdir(output_dir):
print "Deleting previous framework dir..."
rmtree(output_dir)
settings_file = join(mbed_dir, "workspace_tools", "private_settings.py")
if not isfile(settings_file):
with open(settings_file, "w") as f:
f.write("GCC_ARM_PATH = '%s'" %
join(get_home_dir(), "packages", "toolchain-gccarmnoneeabi",
"bin"))
makedirs(join(output_dir, "variant"))
mbed_libs = ["--rtos", "--dsp", "--fat", "--eth", "--usb", "--usb_host"]
for mcu in set(gccarm.GccArm.TARGETS):
print "Processing board: %s" % mcu
buildlib(mbed_dir, mcu)
for lib in mbed_libs:
buildlib(mbed_dir, mcu, lib)
result = exec_command(
["python", join(mbed_dir, "workspace_tools", "project.py"),
"--mcu", mcu, "-i", "emblocks", "-p", "0", "-b"], cwd=getcwd()
)
if result['returncode'] != 0:
print "Unable to build the project for %s" % mcu
continue
_unzip_generated_file(mbed_dir, output_dir, mcu)
copylibs(mbed_dir, output_dir)
with open(join(output_dir, "boards.txt"), "w") as fp:
fp.write("\n".join(sorted(listdir(join(output_dir, "variant")))))
print "Complete!"
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--mbed', help="The path to mbed framework")
parser.add_argument('--output', help="The path to output directory")
args = vars(parser.parse_args())
sys_exit(main(args["mbed"], args["output"]))