You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: features/storage/TESTS/blockdevice/general_block_device/README.md
+13-17Lines changed: 13 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Getting started with the Mbed OS block device test
2
2
3
-
Mbed OS block device test is used to test existing and new block devices.
3
+
You can use the Mbed OS block device test to test existing and new block devices.
4
4
5
5
You can find more information about the Mbed OS block device and other related pieces of the Mbed OS storage stack [in the storage overview](https://os.mbed.com/docs/latest/reference/storage.html).
6
6
@@ -15,16 +15,13 @@ You can find more information about the Mbed OS block device and other related p
15
15
16
16
## Hardware requirements
17
17
18
-
This test uses a block device as storage. This can be either an external
19
-
block device (one of SPI flash, DataFlash or an SD card) or simulated on a
20
-
heap block device on boards with enough RAM.
18
+
This test uses a block device as storage. This can be either an external block device (one of SPI flash, DataFlash or an SD card) or simulated on a heap block device on boards with enough RAM.
21
19
22
20
## Usage
23
21
24
22
#### Compile the test
25
23
26
-
Invoke `mbed test`, and specify the name of your platform and your favorite
27
-
toolchain (`GCC_ARM`, `ARM`, `IAR`). For example, for the ARM Compiler 5:
24
+
Invoke `mbed test`, and specify the name of your platform and your favorite toolchain (`GCC_ARM`, `ARM`, `IAR`). For example, for the ARM Compiler 5:
28
25
29
26
```
30
27
mbed test -m K64F -t ARM -n mbed-os-features-storage-tests-blockdevice-general_block_device --compile
@@ -40,18 +37,17 @@ mbed test -m K64F -t ARM -n mbed-os-features-storage-tests-blockdevice-general_b
40
37
41
38
#### Troubleshooting
42
39
43
-
If you have problems, you can review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html)
44
-
for suggestions on what could be wrong and how to fix it.
40
+
Please review the [documentation](https://os.mbed.com/docs/latest/tutorials/debugging.html) for suggestions about how to fix possible issues you may face.
45
41
46
42
## Changing the block device
47
43
48
-
In Mbed OS, a C++ class that inherits from the [BlockDevice](https://os.mbed.com/docs/latest/reference/storage.html#block-devices)
49
-
interface represents each block device.
50
-
This test uses the default block device received by the function get_default_instance(), it is defined in [SystemStorage.cpp](https://github.com/ARMmbed/mbed-os/blob/master/features/storage/system_storage/SystemStorage.cpp#L35-L77) as MBED_WEAK, in case we would like to test a new block device we will have to override it.
44
+
In Mbed OS, a C++ class that inherits from the [BlockDevice](https://os.mbed.com/docs/latest/reference/storage.html#block-devices) interface represents each block device.
51
45
52
-
first add the new block device cpp and header files to [blockdevice folder](https://github.com/ARMmbed/mbed-os/tree/master/features/storage/blockdevice), then implement get_default_instance() inside the test main.cpp.
46
+
This test uses the default block device that the function `get_default_instance()` receives. [SystemStorage.cpp](https://github.com/ARMmbed/mbed-os/blob/master/features/storage/system_storage/SystemStorage.cpp#L35-L77) defines this as `MBED_WEAK`. If you would like to test a new block device, you have to override it.
53
47
54
-
for example, in order to test the HeapBlockDevice add:
48
+
First add the new block device .cpp and header files to the [blockdevice folder](https://github.com/ARMmbed/mbed-os/tree/master/features/storage/blockdevice). Then, implement `get_default_instance()` inside the test `main.cpp`.
0 commit comments