forked from platformio/platformio-core
Update docs for embedded platforms, frameworks and boards
This commit is contained in:
@@ -151,7 +151,7 @@ Adafruit
|
||||
* - ``protrinket3ftdi``
|
||||
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
|
||||
- ATMEGA328P
|
||||
- 16 MHz
|
||||
- 12 MHz
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
|
||||
|
@@ -266,6 +266,26 @@ Freescale
|
||||
- 256 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
|
||||
~~~~~~
|
||||
|
||||
|
@@ -28,21 +28,34 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``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/>`_
|
||||
|
||||
* - ``tool-avrdude``
|
||||
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
|
||||
* - ``framework-arduinoavr``
|
||||
- `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
|
||||
* - ``framework-simba``
|
||||
- `Simba Framework <https://github.com/eerimoq/simba>`_
|
||||
|
||||
* - ``framework-arduinoavr``
|
||||
- `Arduino Wiring-based Framework (AVR Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
* - ``tool-avrdude``
|
||||
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
|
||||
|
||||
* - ``tool-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
|
||||
----------
|
||||
.. list-table::
|
||||
@@ -124,7 +137,7 @@ Adafruit
|
||||
* - ``protrinket3ftdi``
|
||||
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
|
||||
- ATMEGA328P
|
||||
- 16 MHz
|
||||
- 12 MHz
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
|
||||
|
@@ -28,30 +28,30 @@ Packages
|
||||
* - Name
|
||||
- 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``
|
||||
- `Arduino Wiring-based Framework (SAM Core, 1.6) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
|
||||
* - ``ldscripts``
|
||||
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
|
||||
* - ``framework-mbed``
|
||||
- `mbed Framework <http://mbed.org>`_
|
||||
|
||||
* - ``framework-simba``
|
||||
- `Simba Framework <https://github.com/eerimoq/simba>`_
|
||||
|
||||
* - ``tool-openocd``
|
||||
- `OpenOCD <http://openocd.org>`_
|
||||
|
||||
* - ``tool-avrdude``
|
||||
- `AVRDUDE <http://www.nongnu.org/avrdude/>`_
|
||||
|
||||
* - ``tool-bossac``
|
||||
- `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::
|
||||
**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).
|
||||
@@ -73,12 +73,12 @@ 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_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`
|
||||
- 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
|
||||
------
|
||||
|
||||
|
@@ -137,7 +137,7 @@ Adafruit
|
||||
* - ``protrinket3ftdi``
|
||||
- `Adafruit Pro Trinket 3V/12MHz (FTDI) <http://www.adafruit.com/products/2010>`_
|
||||
- ATMEGA328P
|
||||
- 16 MHz
|
||||
- 12 MHz
|
||||
- 32 Kb
|
||||
- 2 Kb
|
||||
|
||||
@@ -1123,6 +1123,26 @@ Fubarino
|
||||
- 512 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
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
|
@@ -28,26 +28,26 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``toolchain-xtensa``
|
||||
- `xtensa-gcc <https://github.com/jcmvbkbc/gcc-xtensa>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
* - ``framework-arduinoespressif``
|
||||
- `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_
|
||||
|
||||
* - ``framework-simba``
|
||||
- `Simba Framework <https://github.com/eerimoq/simba>`_
|
||||
|
||||
* - ``sdk-esp8266``
|
||||
- `ESP8266 SDK <http://bbs.espressif.com>`_
|
||||
|
||||
* - ``tool-esptool``
|
||||
- `esptool-ck <https://github.com/igrr/esptool-ck>`_
|
||||
|
||||
* - ``tool-mkspiffs``
|
||||
- `Tool to build and unpack SPIFFS images <https://github.com/igrr/mkspiffs>`_
|
||||
|
||||
* - ``framework-arduinoespressif``
|
||||
- `Arduino Wiring-based Framework (ESP8266 Core) <https://github.com/esp8266/Arduino>`_
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``ldscripts``
|
||||
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
|
||||
|
||||
* - ``sdk-esp8266``
|
||||
- `ESP8266 SDK <http://bbs.espressif.com>`_
|
||||
* - ``toolchain-xtensa``
|
||||
- `xtensa-gcc <https://github.com/jcmvbkbc/gcc-xtensa>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
|
@@ -31,6 +31,9 @@ Packages
|
||||
* - ``framework-mbed``
|
||||
- `mbed Framework <http://mbed.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/>`_
|
||||
|
||||
|
@@ -34,6 +34,9 @@ Packages
|
||||
* - ``tool-arduino101load``
|
||||
- `Genuino101 uploader <https://github.com/01org/intel-arduino-tools>`_
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-intelarc32``
|
||||
- `GCC for Intel ARC <https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain>`_
|
||||
|
||||
|
@@ -28,6 +28,9 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-icestorm``
|
||||
- `GCC for FPGA IceStorm <http://www.clifford.at/icestorm/>`_
|
||||
|
||||
|
@@ -31,6 +31,9 @@ Packages
|
||||
* - ``framework-wiringpi``
|
||||
- `GPIO Interface library for the Raspberry Pi <http://wiringpi.com>`_
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-gccarmlinuxgnueabi``
|
||||
- `GCC for Linux ARM GNU EABI <https://gcc.gnu.org>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
|
||||
|
@@ -28,5 +28,8 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-gcclinux32``
|
||||
- `GCC for Linux i686 <https://gcc.gnu.org>`_
|
@@ -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.
|
||||
|
||||
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::
|
||||
|
||||
@@ -28,5 +28,8 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-gcclinux64``
|
||||
- `GCC for Linux x86_64 <https://gcc.gnu.org>`_
|
@@ -31,12 +31,15 @@ Packages
|
||||
* - ``framework-arduinomicrochippic32``
|
||||
- `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``
|
||||
- `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::
|
||||
**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).
|
||||
|
@@ -18,3 +18,15 @@ 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>`_.
|
||||
|
||||
.. contents::
|
||||
|
||||
Packages
|
||||
--------
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
@@ -28,20 +28,23 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``framework-arduinonordicnrf51``
|
||||
- `Arduino Wiring-based Framework (RFduino Core) <https://github.com/RFduino/RFduino>`_
|
||||
|
||||
* - ``framework-mbed``
|
||||
- `mbed Framework <http://mbed.org>`_
|
||||
|
||||
* - ``tool-rfdloader``
|
||||
- `rfdloader <https://github.com/RFduino/RFduino>`_
|
||||
|
||||
* - ``toolchain-gccarmnoneeabi``
|
||||
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``tool-sreccat``
|
||||
- `Merging tool <https://github.com/marcows/SRecord>`_
|
||||
|
||||
* - ``framework-arduinonordicnrf51``
|
||||
- `Arduino Wiring-based Framework (RFduino Core) <https://github.com/RFduino/RFduino>`_
|
||||
* - ``toolchain-gccarmnoneeabi``
|
||||
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
|
@@ -31,6 +31,9 @@ Packages
|
||||
* - ``framework-mbed``
|
||||
- `mbed Framework <http://mbed.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/>`_
|
||||
|
||||
|
@@ -31,6 +31,9 @@ Packages
|
||||
* - ``framework-mbed``
|
||||
- `mbed Framework <http://mbed.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/>`_
|
||||
|
||||
|
@@ -28,26 +28,26 @@ Packages
|
||||
* - Name
|
||||
- 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``
|
||||
- `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``
|
||||
- `mbed Framework <http://mbed.org>`_
|
||||
|
||||
* - ``ldscripts``
|
||||
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
|
||||
* - ``framework-spl``
|
||||
- `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::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
@@ -73,12 +73,12 @@ Frameworks
|
||||
* - :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.
|
||||
|
||||
* - :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`
|
||||
- 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
|
||||
------
|
||||
|
||||
@@ -142,6 +142,26 @@ Armstrap
|
||||
- 512 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
|
||||
~~~~~~~~~
|
||||
|
||||
|
@@ -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.
|
||||
|
||||
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::
|
||||
|
||||
@@ -31,20 +31,20 @@ Packages
|
||||
* - ``framework-arduinoteensy``
|
||||
- `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``
|
||||
- `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``
|
||||
- `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``
|
||||
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
|
||||
* - ``toolchain-gccarmnoneeabi``
|
||||
- `gcc-arm-embedded <https://launchpad.net/gcc-arm-embedded>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
|
||||
.. warning::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
|
@@ -28,17 +28,20 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``toolchain-timsp430``
|
||||
- `msp-gcc <http://sourceforge.net/projects/mspgcc/>`_, `GDB <http://www.gnu.org/software/gdb/>`_
|
||||
|
||||
* - ``tool-mspdebug``
|
||||
- `MSPDebug <http://mspdebug.sourceforge.net/>`_
|
||||
* - ``framework-arduinomsp430``
|
||||
- `Arduino Wiring-based Framework (MSP430 Core) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
|
||||
* - ``framework-energiamsp430``
|
||||
- `Energia Wiring-based Framework (MSP430 Core) <http://energia.nu/reference/>`_
|
||||
|
||||
* - ``framework-arduinomsp430``
|
||||
- `Arduino Wiring-based Framework (MSP430 Core) <http://arduino.cc/en/Reference/HomePage>`_
|
||||
* - ``tool-mspdebug``
|
||||
- `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::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
|
@@ -28,20 +28,20 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``ldscripts``
|
||||
- `Linker Scripts <https://sourceware.org/binutils/docs/ld/Scripts.html>`_
|
||||
* - ``framework-energiativa``
|
||||
- `Energia Wiring-based Framework (LM4F Core) <http://energia.nu/reference/>`_
|
||||
|
||||
* - ``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-lm4flash``
|
||||
- `Flash Programmer <http://www.ti.com/tool/lmflashprogrammer>`_
|
||||
|
||||
* - ``framework-energiativa``
|
||||
- `Energia Wiring-based Framework (LM4F Core) <http://energia.nu/reference/>`_
|
||||
* - ``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::
|
||||
**Linux Users:** Don't forget to install "udev" rules file
|
||||
@@ -61,12 +61,12 @@ Frameworks
|
||||
* - Name
|
||||
- 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`
|
||||
- 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
|
||||
------
|
||||
|
||||
|
@@ -28,5 +28,8 @@ Packages
|
||||
* - Name
|
||||
- Contents
|
||||
|
||||
* - ``tool-scons``
|
||||
- `SCons software construction tool <http://www.scons.org>`_
|
||||
|
||||
* - ``toolchain-gccmingw32``
|
||||
- `MinGW <http://www.mingw.org>`_
|
@@ -138,7 +138,7 @@ def platform_list(json_output):
|
||||
"title": p.title,
|
||||
"description": p.description,
|
||||
"version": p.version,
|
||||
"url": p.manifest.get("url"),
|
||||
"url": p.vendor_url,
|
||||
"packages": p.get_installed_packages().keys(),
|
||||
'forDesktop': any([
|
||||
p.name.startswith(n) for n in ("native", "linux", "windows")
|
||||
|
@@ -333,6 +333,10 @@ class PlatformBase(PlatformPackagesMixin, PlatformRunMixin):
|
||||
def homepage(self):
|
||||
return self._manifest.get("homepage")
|
||||
|
||||
@property
|
||||
def vendor_url(self):
|
||||
return self._manifest.get("url")
|
||||
|
||||
@property
|
||||
def license(self):
|
||||
return self._manifest.get("license")
|
||||
|
@@ -429,45 +429,6 @@ def get_api_result(path, params=None, data=None):
|
||||
"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():
|
||||
return os.environ.get("PYTHONEXEPATH", normpath(sys.executable))
|
||||
|
||||
|
@@ -20,12 +20,17 @@ from sys import path
|
||||
path.append("..")
|
||||
|
||||
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):
|
||||
p = PlatformFactory.newPlatform(platform)
|
||||
for pkg in p.get_packages().keys():
|
||||
for pkg in p.packages.keys():
|
||||
if pkg.startswith("framework-%s" % framework):
|
||||
return True
|
||||
return False
|
||||
@@ -56,34 +61,29 @@ def generate_boards(boards):
|
||||
- Flash
|
||||
- RAM""")
|
||||
|
||||
for board in sorted(boards):
|
||||
for type_, data in board.iteritems():
|
||||
assert type_ in util.get_boards()
|
||||
board_ram = float(data['upload']['maximum_ram_size']) / 1024
|
||||
for data in sorted(boards, key=lambda item: item['id']):
|
||||
board_ram = float(data['ram']) / 1024
|
||||
lines.append("""
|
||||
* - ``{type}``
|
||||
* - ``{id}``
|
||||
- `{name} <{url}>`_
|
||||
- {mcu}
|
||||
- {f_cpu:d} MHz
|
||||
- {rom} Kb
|
||||
- {ram} Kb""".format(
|
||||
type=type_,
|
||||
id=data['id'],
|
||||
name=data['name'],
|
||||
url=data['url'],
|
||||
mcu=data['build']['mcu'].upper(),
|
||||
f_cpu=int((data['build']['f_cpu'][:-1])) / 1000000,
|
||||
mcu=data['mcu'].upper(),
|
||||
f_cpu=int(data['fcpu']) / 1000000,
|
||||
ram=int(board_ram) if board_ram % 1 == 0 else board_ram,
|
||||
rom=_round_memory_size(
|
||||
data['upload']['maximum_size'] / 1024)
|
||||
))
|
||||
rom=_round_memory_size(data['rom'] / 1024)))
|
||||
|
||||
return "\n".join(lines + [""])
|
||||
|
||||
|
||||
def generate_packages(platform, packages, is_embedded):
|
||||
if not packages:
|
||||
def generate_packages(platform, packagenames, is_embedded):
|
||||
if not packagenames:
|
||||
return
|
||||
allpackages = get_packages()
|
||||
lines = []
|
||||
lines.append("""
|
||||
Packages
|
||||
@@ -94,17 +94,15 @@ Packages
|
||||
|
||||
* - Name
|
||||
- Contents""")
|
||||
for type_, data in packages.iteritems():
|
||||
assert type_ in allpackages
|
||||
for name in sorted(packagenames):
|
||||
assert name in API_PACKAGES
|
||||
contitems = [
|
||||
"`%s <%s>`_" % (name, url)
|
||||
for name, url in allpackages[type_]
|
||||
"`{name} <{url}>`_".format(**item) for item in API_PACKAGES[name]
|
||||
]
|
||||
lines.append("""
|
||||
* - ``{type_}``
|
||||
* - ``{name}``
|
||||
- {contents}""".format(
|
||||
type_=type_,
|
||||
contents=", ".join(contitems)))
|
||||
name=name, contents=", ".join(contitems)))
|
||||
|
||||
if is_embedded:
|
||||
lines.append("""
|
||||
@@ -134,7 +132,8 @@ def generate_platform(name):
|
||||
print "Processing platform: %s" % name
|
||||
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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@@ -154,33 +153,31 @@ def generate_platform(name):
|
||||
lines.append("=" * len(_title))
|
||||
|
||||
p = PlatformFactory.newPlatform(name)
|
||||
lines.append(p.get_description())
|
||||
lines.append(p.description)
|
||||
lines.append("""
|
||||
For more detailed information please visit `vendor site <%s>`_.""" %
|
||||
p.get_vendor_url())
|
||||
p.vendor_url)
|
||||
lines.append("""
|
||||
.. contents::""")
|
||||
|
||||
#
|
||||
# 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:
|
||||
lines.append(_packages_content)
|
||||
|
||||
#
|
||||
# Frameworks
|
||||
#
|
||||
_frameworks = util.get_frameworks()
|
||||
_frameworks_lines = []
|
||||
for framework in sorted(_frameworks.keys()):
|
||||
if not is_compat_platform_and_framework(name, framework):
|
||||
for framework in API_FRAMEWORKS:
|
||||
if not is_compat_platform_and_framework(name, framework['name']):
|
||||
continue
|
||||
_frameworks_lines.append("""
|
||||
* - :ref:`framework_{type_}`
|
||||
- {description}""".format(
|
||||
type_=framework,
|
||||
description=_frameworks[framework]['description']))
|
||||
* - :ref:`framework_{name}`
|
||||
- {description}""".format(**framework))
|
||||
|
||||
if _frameworks_lines:
|
||||
lines.append("""
|
||||
@@ -197,14 +194,13 @@ Frameworks
|
||||
# Boards
|
||||
#
|
||||
vendors = {}
|
||||
for board, data in util.get_boards().items():
|
||||
platform = data['platform']
|
||||
vendor = data['vendor']
|
||||
if name in platform:
|
||||
for board in BOARDS:
|
||||
vendor = board['vendor']
|
||||
if name in board['platform']:
|
||||
if vendor in vendors:
|
||||
vendors[vendor].append({board: data})
|
||||
vendors[vendor].append(board)
|
||||
else:
|
||||
vendors[vendor] = [{board: data}]
|
||||
vendors[vendor] = [board]
|
||||
|
||||
if vendors:
|
||||
lines.append("""
|
||||
@@ -227,9 +223,10 @@ Boards
|
||||
|
||||
|
||||
def update_platform_docs():
|
||||
for name in PlatformFactory.get_platforms().keys():
|
||||
platforms_dir = join(dirname(realpath(__file__)),
|
||||
"..", "docs", "platforms")
|
||||
for manifest in PLATFORM_MANIFESTS:
|
||||
name = manifest['name']
|
||||
platforms_dir = join(
|
||||
dirname(realpath(__file__)), "..", "docs", "platforms")
|
||||
rst_path = join(platforms_dir, "%s.rst" % name)
|
||||
with open(rst_path, "w") as f:
|
||||
f.write(generate_platform(name))
|
||||
@@ -241,7 +238,8 @@ def generate_framework(type_, data):
|
||||
print "Processing framework: %s" % type_
|
||||
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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@@ -276,16 +274,15 @@ Platforms
|
||||
- Description""")
|
||||
|
||||
_found_platform = False
|
||||
for platform in sorted(PlatformFactory.get_platforms().keys()):
|
||||
if not is_compat_platform_and_framework(platform, type_):
|
||||
for manifest in PLATFORM_MANIFESTS:
|
||||
if not is_compat_platform_and_framework(manifest['name'], type_):
|
||||
continue
|
||||
_found_platform = True
|
||||
p = PlatformFactory.newPlatform(platform)
|
||||
p = PlatformFactory.newPlatform(manifest['name'])
|
||||
lines.append("""
|
||||
* - :ref:`platform_{type_}`
|
||||
- {description}""".format(
|
||||
type_=platform,
|
||||
description=p.get_description()))
|
||||
type_=manifest['name'], description=p.description))
|
||||
if not _found_platform:
|
||||
del lines[-1]
|
||||
|
||||
@@ -300,14 +297,14 @@ Boards
|
||||
""")
|
||||
|
||||
vendors = {}
|
||||
for board, data in util.get_boards().items():
|
||||
for data in BOARDS:
|
||||
frameworks = data['frameworks']
|
||||
vendor = data['vendor']
|
||||
if type_ in frameworks:
|
||||
if vendor in vendors:
|
||||
vendors[vendor].append({board: data})
|
||||
vendors[vendor].append(data)
|
||||
else:
|
||||
vendors[vendor] = [{board: data}]
|
||||
vendors[vendor] = [data]
|
||||
for vendor, boards in sorted(vendors.iteritems()):
|
||||
lines.append(str(vendor))
|
||||
lines.append("~" * len(vendor))
|
||||
@@ -316,18 +313,18 @@ Boards
|
||||
|
||||
|
||||
def update_framework_docs():
|
||||
for name, data in util.get_frameworks().items():
|
||||
frameworks_dir = join(dirname(realpath(__file__)),
|
||||
"..", "docs", "frameworks")
|
||||
for framework in API_FRAMEWORKS:
|
||||
name = framework['name']
|
||||
frameworks_dir = join(
|
||||
dirname(realpath(__file__)), "..", "docs", "frameworks")
|
||||
rst_path = join(frameworks_dir, "%s.rst" % name)
|
||||
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)):
|
||||
f.write("\n.. include:: %s_extra.rst\n" % name)
|
||||
|
||||
|
||||
def update_create_platform_doc():
|
||||
allpackages = get_packages()
|
||||
lines = []
|
||||
lines.append(""".. _platform_creating_packages:
|
||||
|
||||
@@ -342,32 +339,28 @@ Packages
|
||||
|
||||
* - Name
|
||||
- Contents""")
|
||||
for type_, data in sorted(allpackages.iteritems()):
|
||||
contitems = [
|
||||
"`%s <%s>`_" % (name, url)
|
||||
for name, url in allpackages[type_]
|
||||
]
|
||||
for name, items in sorted(API_PACKAGES.iteritems()):
|
||||
contitems = ["`{name} <{url}>`_".format(**item) for item in items]
|
||||
lines.append("""
|
||||
* - ``{type_}``
|
||||
* - ``{name}``
|
||||
- {contents}""".format(
|
||||
type_=type_,
|
||||
contents=", ".join(contitems)))
|
||||
name=name, contents=", ".join(contitems)))
|
||||
|
||||
with open(join(util.get_source_dir(), "..", "docs", "platforms",
|
||||
with open(
|
||||
join(util.get_source_dir(), "..", "docs", "platforms",
|
||||
"creating_platform.rst"), "r+") as fp:
|
||||
content = fp.read()
|
||||
fp.seek(0, 0)
|
||||
fp.write(
|
||||
content[:content.index(".. _platform_creating_packages:")] +
|
||||
"\n".join(lines) + "\n\n" +
|
||||
content[content.index(".. _platform_creating_manifest_file:"):]
|
||||
)
|
||||
fp.write(content[:content.index(".. _platform_creating_packages:")] +
|
||||
"\n".join(lines) + "\n\n" + content[content.index(
|
||||
".. _platform_creating_manifest_file:"):])
|
||||
|
||||
|
||||
def update_embedded_boards():
|
||||
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");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
@@ -400,20 +393,21 @@ popular embedded boards and IDE.
|
||||
lines.append("")
|
||||
|
||||
vendors = {}
|
||||
for board, data in util.get_boards().items():
|
||||
for data in BOARDS:
|
||||
vendor = data['vendor']
|
||||
if vendor in vendors:
|
||||
vendors[vendor].append({board: data})
|
||||
vendors[vendor].append(data)
|
||||
else:
|
||||
vendors[vendor] = [{board: data}]
|
||||
vendors[vendor] = [data]
|
||||
|
||||
for vendor, boards in sorted(vendors.iteritems()):
|
||||
lines.append(str(vendor))
|
||||
lines.append("~" * len(vendor))
|
||||
lines.append(generate_boards(boards))
|
||||
|
||||
emboards_rst = join(dirname(realpath(__file__)),
|
||||
"..", "docs", "platforms", "embedded_boards.rst")
|
||||
emboards_rst = join(
|
||||
dirname(realpath(__file__)), "..", "docs", "platforms",
|
||||
"embedded_boards.rst")
|
||||
with open(emboards_rst, "w") as f:
|
||||
f.write("\n".join(lines))
|
||||
|
||||
@@ -424,5 +418,6 @@ def main():
|
||||
update_framework_docs()
|
||||
update_embedded_boards()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys_exit(main())
|
||||
|
@@ -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"]))
|
Reference in New Issue
Block a user