Fixes issue #1562 reported by @justbuchanan. When building code with GCC-ARM / newlib, attempting to use the b (binary) mode in a fopen() call would fail. newlib would parse this option and pass it down to the LocalFileSystem open call which didn't like the unexpected O_BINARY flag in openmode. The openmode_to_posix() function in retarget.cpp would never set the O_BINARY flag for the other toolchains but for GCC it would just pass down whatever newlib placed there. This commit masks out the O_BINARY bit so that it never gets passed down to the file system drivers, just as occurs for the other supported toolchains. Test case: FILE *fp = fopen("/local/out.txt", "rb"); I tested that code on mbed LPC1768 and LPC11U24 boards while using GCC_ARM as the toolchain. It failed on both platforms previous to this change and succeeded there after. |
||
---|---|---|
docs | ||
libraries | ||
travis | ||
workspace_tools | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
CONTRIBUTING.md | ||
LICENSE | ||
MANIFEST.in | ||
README.md | ||
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)
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 workspace_tools
> ... do things ...
> "venv/Scripts/deactivate"