Skip to content

Commit

Permalink
Merge pull request #68 from ARMmbed/mbed-os-5.10.0-oob
Browse files Browse the repository at this point in the history
Update to Mbed os 5.10.0
  • Loading branch information
Yossi Levy authored Sep 26, 2018
2 parents ea5643b + af80f50 commit 4cf621e
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 22 deletions.
23 changes: 5 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@

env:
matrix:
- TARGET=K82F
- TARGET=NRF52840_DK
- TARGET=K64F
- TARGET=UBLOX_EVK_ODIN_W2
- TARGET=NUCLEO_F429ZI

global:
- >
STATUS=$'curl -so/dev/null --user $MBED_BOT --request POST
Expand Down Expand Up @@ -54,21 +50,12 @@ install:

script:
# Check that example compiles with littlefs + spif
- mbed compile -t GCC_ARM -m $TARGET -j0

# Check that example compiles with littlefs + dataflash
- sed -i 's/SPIFBlockDevice bd/DataFlashBlockDevice bd/g' main.cpp
- sed -i 's/MBED_CONF_SPIF_DRIVER/MBED_CONF_DATAFLASH/g' main.cpp
- mbed compile -t GCC_ARM -m $TARGET -j0
- mbed compile -t GCC_ARM -m K82F -j0

# Check that example compiles with fatfs + sd
- sed -i 's/SPIFBlockDevice bd/SDBlockDevice bd/g' main.cpp
- sed -i 's/MBED_CONF_SPIF_DRIVER/MBED_CONF_SD/g' main.cpp
- sed -i 's/LittleFileSystem fs/FATFileSystem fs/g' main.cpp
- sed -i 's/DataFlashBlockDevice bd/SDBlockDevice bd/g' main.cpp
- sed -i 's/MBED_CONF_DATAFLASH/MBED_CONF_SD/g' main.cpp
- mbed compile -t GCC_ARM -m $TARGET -j0
- mbed compile -t GCC_ARM -m K64F -j0

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

62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,32 @@ pins in `<driver>/mbed_lib.json` are correct. For example, to change the pins fo
...
}
```
The pins macros define above can be override at the application configuration file using the driver prefix before the parameter name.
```
"target_overrides": {
...
"NUCLEO_F429ZI": {
"spif-driver.SPI_MOSI": "PC_12",
"spif-driver.SPI_MISO": "PC_11",
"spif-driver.SPI_CLK": "PC_10",
"spif-driver.SPI_CS": "PA_15"
},
...
}
```
or
```
"target_overrides": {
...
"NUCLEO_F429ZI": {
"sd.SPI_MOSI": "PC_12",
"sd.SPI_MISO": "PC_11",
"sd.SPI_CLK": "PC_10",
"sd.SPI_CS": "PA_15"
},
...
}
```

Mbed OS has several options for the block device:

Expand All @@ -277,6 +303,18 @@ Mbed OS has several options for the block device:
MBED_CONF_SPIF_DRIVER_SPI_CS);
```
Starting mbed-os 5.10 the SPIFBlockDevice is a component under mbed-os. In order to add a component to the application use the following `target_overrides` configuration at the application configuration file:
```
"target_overrides": {
...
"NUCLEO_F429ZI": {
"target.components_add": ["SPIF"],
...
},
...
}
```
- **DataFlashBlockDevice** - Block device driver for NOR-based SPI flash devices
that support the DataFlash protocol, such as the Adesto AT45DB series of
devices. DataFlash is a memory protocol that combines flash with SRAM buffers
Expand All @@ -293,6 +331,18 @@ Mbed OS has several options for the block device:
MBED_CONF_DATAFLASH_SPI_CS);
```

Starting mbed-os 5.10 the DataFlashBlockDevice is a component under mbed-os. In order to add a component to the application use the following `target_overrides` configuration at the application configuration file:
```
"target_overrides": {
...
"NUCLEO_F429ZI": {
"target.components_add": ["DATAFLASH"],
...
},
...
}
```

- **SDBlockDevice** - Block device driver for SD cards and eMMC memory chips. SD
cards or eMMC chips offer a full FTL layer on top of NAND flash. This makes the
storage well-suited for systems that require a about 1GB of memory.
Expand All @@ -307,6 +357,18 @@ Mbed OS has several options for the block device:
MBED_CONF_SD_SPI_CS);
```
Starting mbed-os 5.10 the SDBlockDevice is a component under mbed-os. In order to add a component to the application use the following `target_overrides` configuration at the application configuration file:
```
"target_overrides": {
...
"NUCLEO_F429ZI": {
"target.components_add": ["SD"],
...
},
...
}
```
- [**HeapBlockDevice**](https://os.mbed.com/docs/v5.6/reference/heapblockdevice.html) -
Block device that simulates storage in RAM using the heap. Do not use the heap
block device for storing data persistently because a power loss causes
Expand Down
1 change: 0 additions & 1 deletion dataflash-driver.lib

This file was deleted.

9 changes: 9 additions & 0 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,18 @@
#include <errno.h>

// Block devices
#if COMPONENT_SPIF
#include "SPIFBlockDevice.h"
#endif

#if COMPONENT_DATAFLASH
#include "DataFlashBlockDevice.h"
#endif

#if COMPONENT_SD
#include "SDBlockDevice.h"
#endif

#include "HeapBlockDevice.h"

// File systems
Expand Down
2 changes: 1 addition & 1 deletion mbed-os.lib
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/ARMmbed/mbed-os/#0fdfcf7350896a9c0b57c4a18237677abfe25f1a
https://github.com/ARMmbed/mbed-os/#610e35ddc6d59f153173c1e7b2748cf96d6c9bcd
1 change: 0 additions & 1 deletion sd-driver.lib

This file was deleted.

1 change: 0 additions & 1 deletion spif-driver.lib

This file was deleted.

0 comments on commit 4cf621e

Please sign in to comment.