mirror of https://github.com/ARMmbed/mbed-os.git
Added support for Travis CI
parent
2a1c923ec7
commit
521e7aeea7
|
@ -0,0 +1,24 @@
|
||||||
|
script:
|
||||||
|
# Check that examples compile
|
||||||
|
- sed -n '/``` cpp/,${/```$/q;/```/d;p}' README.md > main.cpp &&
|
||||||
|
PYTHONPATH=mbed-os python mbed-os/tools/make.py -t GCC_ARM -m K64F
|
||||||
|
--source=. --build=BUILD/K64F/GCC_ARM -j0 &&
|
||||||
|
rm main.cpp
|
||||||
|
|
||||||
|
# Check that tests compile
|
||||||
|
- rm -rf BUILD && PYTHONPATH=mbed-os python mbed-os/tools/test.py
|
||||||
|
-t GCC_ARM -m K64F --source=. --build=BUILD/TESTS/K64F/GCC_ARM -j0
|
||||||
|
-n tests*
|
||||||
|
|
||||||
|
python:
|
||||||
|
- "2.7"
|
||||||
|
|
||||||
|
install:
|
||||||
|
# Get arm-none-eabi-gcc
|
||||||
|
- sudo add-apt-repository -y ppa:terry.guo/gcc-arm-embedded
|
||||||
|
- sudo apt-get update -qq
|
||||||
|
- sudo apt-get install -qq gcc-arm-none-eabi --force-yes
|
||||||
|
# Get dependencies
|
||||||
|
- git clone https://github.com/armmbed/mbed-os.git
|
||||||
|
# Install python dependencies
|
||||||
|
- sudo pip install -r mbed-os/requirements.txt
|
30
README.md
30
README.md
|
@ -368,21 +368,21 @@ The above figure shows how to connect the NUCLEO_F429ZI with the v1.0.0 CI test
|
||||||
|
|
||||||
The following sample code illustrates how to use the sd-driver Block Device API:
|
The following sample code illustrates how to use the sd-driver Block Device API:
|
||||||
|
|
||||||
|
``` cpp
|
||||||
|
#include "mbed.h"
|
||||||
|
#include "SDBlockDevice.h"
|
||||||
|
|
||||||
#include "mbed.h"
|
// Instantiate the SDBlockDevice by specifying the SPI pins connected to the SDCard
|
||||||
#include "SDBlockDevice.h"
|
// socket. The PINS are:
|
||||||
|
// MOSI (Master Out Slave In)
|
||||||
|
// MISO (Master In Slave Out)
|
||||||
|
// SCLK (Serial Clock)
|
||||||
|
// CS (Chip Select)
|
||||||
|
SDBlockDevice sd(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, MBED_CONF_SD_SPI_CS);
|
||||||
|
uint8_t block[512] = "Hello World!\n";
|
||||||
|
|
||||||
// Instantiate the SDBlockDevice by specifying the SPI pins connected to the SDCard
|
int main()
|
||||||
// socket. The PINS are:
|
{
|
||||||
// MOSI (Master Out Slave In)
|
|
||||||
// MISO (Master In Slave Out)
|
|
||||||
// SCLK (Serial Clock)
|
|
||||||
// CS (Chip Select)
|
|
||||||
SDBlockDevice sd(MBED_CONF_SD_SPI_MOSI, MBED_CONF_SD_SPI_MISO, MBED_CONF_SD_SPI_CLK, MBED_CONF_SD_SPI_CS);
|
|
||||||
uint8_t block[512] = "Hello World!\n";
|
|
||||||
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
// call the SDBlockDevice instance initialisation method.
|
// call the SDBlockDevice instance initialisation method.
|
||||||
if ( 0 != sd.init()) {
|
if ( 0 != sd.init()) {
|
||||||
printf("Init failed \n");
|
printf("Init failed \n");
|
||||||
|
@ -413,8 +413,8 @@ The following sample code illustrates how to use the sd-driver Block Device API:
|
||||||
|
|
||||||
// call the SDBlockDevice instance de-initialisation method.
|
// call the SDBlockDevice instance de-initialisation method.
|
||||||
sd.deinit();
|
sd.deinit();
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
# SDCard POSIX File API mbed Greentea Test Cases
|
# SDCard POSIX File API mbed Greentea Test Cases
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue