fflush() does not do anything in mbed library. The only time the file was flushed was when it was closed. For some applications (eg: data logger), files are never closed. It means when the power went off all the written data were lost. Actually, they were not lost; they were written into the non-volatile storage. But the file header was not aware of these new data (its file information such as file size were not updated). There is no easy way to retarget fflush() for mbed. So, the workaround is to fflush (eg: 'sync' in the ChaN terminology) periodically while writting new data. The frequency can be changed by the user into ffconf.h. By default, the updated file will be synced for every new sector (generally for every 512 bytes). Another available option is to sync for every new cluster (in my use case, the cluster was 8 sectors long). |
||
---|---|---|
libraries | ||
travis | ||
workspace_tools | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
MANIFEST.in | ||
README.md | ||
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
NXP:
- LPC1768 (Cortex-M3)
- LPC1768 (Cortex-M3)
- LPC11U24 (Cortex-M0)
- LPC11U35 (Cortex-M0)
- LPC2368 (ARM7TDMI-S)
- LPC810 (Cortex-M0+)
- LPC812 (Cortex-M0+)
- LPC4088 (Cortex-M4)
- LPC4330 (Cortex-M4 + Cortex-M0)
- LPC1347 (Cortex-M3)
- LPC1114 (Cortex-M0)
- LPC11C24 (Cortex-M0)
Freescale:
STMicroelectronics:
- Nucleo-F103RB (Cortex-M3)
- Nucleo-L152RE (Cortex-M3)
- Nucleo-F030R8 (Cortex-M0)
- Nucleo-F401RE (Cortex-M4)
- STM32F407 (Cortex-M4)
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
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.