Go to file
Adam Green c6d2c81c7f LocalFileSystem fails to open binary files
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.
2016-03-07 13:34:32 -08:00
docs Remove all references and use of code warrior GCC in docs, build and 2016-02-11 01:07:58 -06:00
libraries LocalFileSystem fails to open binary files 2016-03-07 13:34:32 -08:00
travis Use only GCC_ARM toolcahin for Travis CI 2013-11-08 11:20:23 +00:00
workspace_tools [NUCLEO_L073RZ] Add SW4STM32 exporter 2016-03-07 13:17:37 +01:00
.gitattributes Added .gitattributes for automatic LF line ending conversion 2013-08-08 13:19:34 +03:00
.gitignore dont track commit venv directory 2016-01-10 14:26:32 -06:00
.travis.yml Renamed Jenkins specific options to general "Build" options 2015-04-17 09:39:26 -05:00
CONTRIBUTING.md Mentioned the Contributor Agreement in Contributing.md 2015-04-16 11:47:51 -04:00
LICENSE Add Apache v2 LICENSE file 2013-08-06 12:05:04 +01:00
MANIFEST.in mbed-tools package improvements 2013-12-18 16:03:27 +02:00
README.md Merge pull request #1541 from sg-/venv 2016-02-12 08:28:07 +01:00
requirements.txt Added mbed-ls to requirements.txt. Used in CI 2015-09-29 12:13:00 -05:00
setup.py Setup - req progen v0.8.8 - for IAR 2016-02-23 18:04:19 +00:00

README.md

mbed SDK

Build Status

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

Supported Microcontrollers and Boards

View all on the mbed Platforms page.

NXP:

Freescale:

STMicroelectronics:

Nordic:

Renesas:

Silicon Labs:

Atmel:

Supported Toolchains and IDEs

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

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

  1. Install Python 2.7.9 or above and make sure it's added to path
  2. Install Git and make sure it's added to path
  3. Install virtualenv in python
> git clone https://github.com/mbedmicro/mbed
> pip install virtualenv
> virtualenv venv
> 

Develop

  1. 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"