Skip to content

Commit b33c72a

Browse files
author
Yossi Levy
authored
Merge pull request #13 from ARMmbed/mbed-os-5.10.0-oob
Mbed os 5.10.0
2 parents 98a01e1 + c3738f6 commit b33c72a

File tree

7 files changed

+28
-30
lines changed

7 files changed

+28
-30
lines changed

.travis.yml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11

22
env:
33
matrix:
4-
- TARGET=K82F
5-
- TARGET=NRF52840_DK
6-
- TARGET=K64F
7-
- TARGET=UBLOX_EVK_ODIN_W2
8-
- TARGET=NUCLEO_F429ZI
4+
95
global:
106
- >
117
STATUS=$'curl -so/dev/null --user $MBED_BOT --request POST
@@ -53,21 +49,12 @@ install:
5349
- python --version
5450

5551
script:
56-
# Check that example compiles with spif
57-
- mbed compile -t GCC_ARM -m $TARGET -j0
58-
59-
# Check that example compiles with dataflash
60-
- sed -i 's/SPIFBlockDevice bd/DataFlashBlockDevice bd/g' main.cpp
61-
- sed -i 's/MBED_CONF_SPIF_DRIVER/MBED_CONF_DATAFLASH/g' main.cpp
62-
- mbed compile -t GCC_ARM -m $TARGET -j0
63-
6452
# Check that example compiles with sd
65-
- sed -i 's/DataFlashBlockDevice bd/SDBlockDevice bd/g' main.cpp
66-
- sed -i 's/MBED_CONF_DATAFLASH/MBED_CONF_SD/g' main.cpp
67-
- mbed compile -t GCC_ARM -m $TARGET -j0
53+
- mbed compile -t GCC_ARM -m K64F -j0
54+
55+
# Check that example compiles with spif
56+
- sed -i 's/SDBlockDevice bd/SPIFBlockDevice bd/g' main.cpp
57+
- sed -i 's/MBED_CONF_SD/MBED_CONF_SPIF_DRIVER/g' main.cpp
58+
- mbed compile -t GCC_ARM -m $K82F -j0
6859

69-
# Check that example compiles with heap
70-
- sed -i 's/SDBlockDevice bd(/HeapBlockDevice bd(1024*512, 512);/g' main.cpp
71-
- sed -i '/MBED_CONF_SD/d' main.cpp
72-
- mbed compile -t GCC_ARM -m $TARGET -j0
7360

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,15 @@ example by changing the class declared in main.cpp.
171171
```
172172

173173
**Note:** Most block devices require pin assignments. Double check that the
174-
pins in `<driver>/mbed_lib.json` are correct. For example, to change the pins for the SD driver, open `sd-driver/config/mbed_lib.json`, and change your target platform to the correct pin-out in the `target_overrides` configuration:
174+
pins in `<driver>/mbed_lib.json` are correct. For example, to change the pins for the SD driver, open `sd-driver/config/mbed_lib.json`, and change your target platform to the correct pin-out in the `target_overrides` configuration.
175+
176+
Starting mbed-os 5.10 the SD, SPIF and DATAFLASH block devices are components under mbed-os. In order to add a component to the application use the "components_add" `target_overrides` configuration:
175177

176178
```
177179
"target_overrides": {
178180
...
179181
"NUCLEO_F429ZI": {
182+
"components_add": ["SPIF"],
180183
"SPI_MOSI": "PC_12",
181184
"SPI_MISO": "PC_11",
182185
"SPI_CLK": "PC_10",
@@ -186,6 +189,8 @@ pins in `<driver>/mbed_lib.json` are correct. For example, to change the pins fo
186189
}
187190
```
188191

192+
The components_add param can be "SPIF", "SD" or "DATAFLASH" depends on the block devices you need.
193+
189194
Mbed OS has several options for the block device:
190195

191196
- **SPIFBlockDevice** - Block device driver for NOR-based SPI flash devices that

dataflash-driver.lib

Lines changed: 0 additions & 1 deletion
This file was deleted.

main.cpp

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,27 @@
1818
#include <algorithm>
1919

2020
// Block devices
21+
#if COMPONENT_SPIF
2122
#include "SPIFBlockDevice.h"
23+
#endif
24+
25+
#if COMPONENT_DATAFLASH
2226
#include "DataFlashBlockDevice.h"
27+
#endif
28+
29+
#if COMPONENT_SD
2330
#include "SDBlockDevice.h"
31+
#endif
32+
2433
#include "HeapBlockDevice.h"
2534

2635

2736
// Physical block device, can be any device that supports the BlockDevice API
28-
SPIFBlockDevice bd(
29-
MBED_CONF_SPIF_DRIVER_SPI_MOSI,
30-
MBED_CONF_SPIF_DRIVER_SPI_MISO,
31-
MBED_CONF_SPIF_DRIVER_SPI_CLK,
32-
MBED_CONF_SPIF_DRIVER_SPI_CS);
37+
SDBlockDevice bd(
38+
MBED_CONF_SD_SPI_MOSI,
39+
MBED_CONF_SD_SPI_MISO,
40+
MBED_CONF_SD_SPI_CLK,
41+
MBED_CONF_SD_SPI_CS);
3342

3443

3544
// Entry point for the example

mbed-os.lib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
https://github.com/ARMmbed/mbed-os/#0fdfcf7350896a9c0b57c4a18237677abfe25f1a
1+
https://github.com/ARMmbed/mbed-os/#610e35ddc6d59f153173c1e7b2748cf96d6c9bcd

sd-driver.lib

Lines changed: 0 additions & 1 deletion
This file was deleted.

spif-driver.lib

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)