Added support for Travis CI

pull/7774/head
Christopher Haster 2017-07-16 15:02:09 -05:00
parent 2a1c923ec7
commit 521e7aeea7
2 changed files with 66 additions and 42 deletions

24
.travis.yml Normal file
View File

@ -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

View File

@ -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