f95265f38d
To speed up project.py, use @property for TARGETS. When exporters are used, it would ask progen for all targets support (number of tools x number of targets), this takes a lot of time, thus lazily evaluated, and TARGETS are for backaward compatibility, not currently used by project.py but by other scripts to check if a target is supported. Profiling: ``` python tools\project.py -m K64F -i uvision -n MBED_10 -b Before the change: 1 0.000 0.000 0.010 0.010 definitions.py:113(get_tool_definition) 824 0.004 0.000 2.990 0.004 definitions.py:124(is_supported) 1 0.000 0.000 0.000 0.000 definitions.py:145(get_debugger) 1 0.002 0.002 0.044 0.044 definitions.py:15(<module>) 384 0.002 0.000 2.986 0.008 definitions.py:26(_load_record) 1 0.000 0.000 0.000 0.000 definitions.py:32(ProGenMcus) 992 0.055 0.000 1.959 0.002 definitions.py:34(__init__) 1376 0.002 0.000 0.003 0.000 definitions.py:40(get_mcus) 384 0.001 0.000 1.070 0.003 definitions.py:43(get_mcu_record) 1 0.000 0.000 0.000 0.000 definitions.py:50(ProGenTargets) 992 0.000 0.000 0.000 0.000 definitions.py:52(__init__) 1196 0.002 0.000 0.004 0.000 definitions.py:55(get_targets) 204 0.001 0.000 1.922 0.009 definitions.py:58(get_mcu_record) 1 0.000 0.000 0.000 0.000 definitions.py:67(get_debugger) 1 0.000 0.000 0.000 0.000 definitions.py:74(ProGenDef) 992 0.008 0.000 1.973 0.002 definitions.py:83(__init__) Days : 0 Hours : 0 Minutes : 0 Seconds : 4 Milliseconds : 723 Ticks : 47237302 TotalDays : 5.46728032407407E-05 TotalHours : 0.00131214727777778 TotalMinutes : 0.0787288366666667 TotalSeconds : 4.7237302 TotalMilliseconds : 4723.7302 After the change: 1 0.000 0.000 0.010 0.010 definitions.py:113(get_tool_definition) 2 0.000 0.000 0.025 0.012 definitions.py:124(is_supported) 1 0.000 0.000 0.000 0.000 definitions.py:145(get_debugger) 1 0.002 0.002 0.042 0.042 definitions.py:15(<module>) 3 0.000 0.000 0.035 0.012 definitions.py:26(_load_record) 1 0.000 0.000 0.000 0.000 definitions.py:32(ProGenMcus) 2 0.000 0.000 0.005 0.002 definitions.py:34(__init__) 5 0.000 0.000 0.000 0.000 definitions.py:40(get_mcus) 3 0.000 0.000 0.000 0.000 definitions.py:43(get_mcu_record) 1 0.000 0.000 0.000 0.000 definitions.py:50(ProGenTargets) 2 0.000 0.000 0.000 0.000 definitions.py:52(__init__) 5 0.000 0.000 0.000 0.000 definitions.py:55(get_targets) 3 0.000 0.000 0.035 0.012 definitions.py:58(get_mcu_record) 1 0.000 0.000 0.000 0.000 definitions.py:67(get_debugger) 1 0.000 0.000 0.000 0.000 definitions.py:74(ProGenDef) 2 0.000 0.000 0.005 0.003 definitions.py:83(__init__) Days : 0 Hours : 0 Minutes : 0 Seconds : 1 Milliseconds : 178 Ticks : 11780618 TotalDays : 1.3634974537037E-05 TotalHours : 0.000327239388888889 TotalMinutes : 0.0196343633333333 TotalSeconds : 1.1780618 TotalMilliseconds : 1178.0618 ``` |
||
---|---|---|
docs | ||
features/FEATURE_UVISOR | ||
hal | ||
libraries | ||
rtos | ||
tools | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
CONTRIBUTING.md | ||
LICENSE | ||
MANIFEST.in | ||
README.md | ||
mbed_lib.json | ||
requirements.txt | ||
setup.py |
README.md
mbed SDK
The mbed Software Development Kit (SDK) is a C/C++ microcontroller software platform relied upon by tens of thousands of developers to build projects fast.
The SDK is licensed under the permissive Apache 2.0 licence, so you can use it in both commercial and personal projects with confidence.
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.
Documentation
- Tools: how to setup and use the build system.
- mbed library internals
- Adding a new target microcontroller
Supported Microcontrollers and Boards
View all on the mbed Platforms page.
NXP:
- mbed LPC1768 (Cortex-M3)
- u-blox C027 LPC1768 (Cortex-M3)
- mbed LPC11U24 (Cortex-M0)
- EA LPC11U35 (Cortex-M0)
- mbed LPC2368 (ARM7TDMI-S)
- LPC2460 (ARM7TDMI-S)
- LPC810 (Cortex-M0+)
- LPC812 (Cortex-M0+)
- EA LPC4088 (Cortex-M4F)
- EA LPC4088 DM (Cortex-M4F)
- LPC4330 (Cortex-M4F + Cortex-M0)
- LPC1347 (Cortex-M3)
- LPC1114 (Cortex-M0)
- LPC11C24 (Cortex-M0)
- LPC1549 (Cortex-M3)
- LPC800-MAX (Cortex-M0+)
- DipCortex-M0 (Cortex-M0)
- DipCortex-M3 (Cortex-M3)
- BlueBoard-LPC11U24 (Cortex-M0)
- LPCCAPPUCCINO (Cortex-M0)
- Arch (Cortex-M0)
- Arch GPRS (Cortex-M0)
- Arch Pro (Cortex-M3)
Freescale:
- FRDM-KL05Z (Cortex-M0+)
- FRDM-KL25Z (Cortex-M0+)
- FRDM-KL43Z (Cortex-M0+)
- FRDM-KL46Z (Cortex-M0+)
- FRDM-K20D50M (Cortex-M4)
- FRDM-K22F (Cortex-M4F)
- FRDM-K64F (Cortex-M4F)
STMicroelectronics:
- Nucleo-F030R8 (Cortex-M0)
- Nucleo-F072RB (Cortex-M0)
- Nucleo-L053R8 (Cortex-M0+)
- Nucleo-F103RB (Cortex-M3)
- Nucleo-L152RE (Cortex-M3)
- Nucleo-F302R8 (Cortex-M4F)
- Nucleo-F334R8 (Cortex-M4F)
- Nucleo-F401RE (Cortex-M4F)
- Nucleo-F410RB (Cortex-M4F)
- Nucleo-F411RE (Cortex-M4F)
- Nucleo-L476RG (Cortex-M4F)
- STM32F4XX (Cortex-M4F)
- STM32F3XX (Cortex-M4F)
- STM32F0-Discovery (Cortex-M0)
- STM32VL-Discovery (Cortex-M3)
- STM32F3-Discovery (Cortex-M4F)
- STM32F4-Discovery (Cortex-M4F)
- STM32F429-Discovery (Cortex-M4F)
- STM32L0-Discovery (Cortex-M0+)
- STM32L4-Discovery (Cortex-M4F)
- Arch Max (Cortex-M4F)
Nordic:
- nRF51822-mKIT (Cortex-M0)
- Arch BLE (Cortex-M0)
Renesas:
- RZ-A1H (Cortex-A9)
Silicon Labs:
- EFM32 Zero Gecko (Cortex-M0+)
- EFM32 Happy Gecko (Cortex-M0+)
- EFM32 Leopard Gecko (Cortex-M3)
- EFM32 Giant Gecko (Cortex-M3)
- EFM32 Wonder Gecko (Cortex-M4)
- EFM32 Pearl Gecko (Cortex-M4)
Atmel:
- SAM R21 XPRO (Cortex-M0+)
- SAM L21 XPRO (Cortex-M0+)
- SAM D21 XPRO (Cortex-M0+)
- SAM W25 XPRO (Cortex-M0+)
Supported Toolchains and IDEs
- GCC ARM: GNU Tools for ARM Embedded Processors
- ARMCC (standard library and MicroLib): uVision
- IAR: IAR Embedded Workbench
- GCC code_red: Red Suite
- GCC CodeSourcery: Sourcery CodeBench
- GCC ARM: Em::Blocks
- GCC ARM: CooCox CoIDE
- GCC ARM: NXP Knetis Design Studio
- GCC ARM: OpenSTM32
- GCC ARM: Atmel Studio 6
The current mbed exporters scripts (IDE support) will be replaced by Project generator (=progen). Any new IDEs support, should be implemented using progen API - add IDE to progen, use progen API to generate a mbed project.
API Documentation
- RTOS API
- TCP/IP Socket API (Transports: Ethernet, WiFi, 3G)
- USB Device API
- USB Host API
- DSP API
- Flash File Systems: SD, USB MSD, semihosted
- Peripheral Drivers API
Community
For discussing the development of the mbed SDK itself (Addition/support of microcontrollers/toolchains, build and test system, Hardware Abstraction Layer API, etc) please join our mbed-devel mailing list.
For every topic regarding the use of the mbed SDK, rather than its development, please post on the mbed.org forum, or the mbed.org Q&A.
For reporting issues in the mbed libraries please open a ticket on the issue tracker of the relevant mbed official library.
Setup
Skip any step where a compatible tool already exists
- Install Python 2.7.9 or above and make sure it's added to path
- Install Git and make sure it's added to path
- Install virtualenv in python
> git clone https://github.com/mbedmicro/mbed
> pip install virtualenv
> virtualenv venv
>
Develop
- Update dependencies and start virtual environment. This should be done everytime you pull new changes
> "venv/Scripts/activate"
> pip install -r requirements.txt
> cd tools
> ... do things ...
> "venv/Scripts/deactivate"