@@ -223,35 +223,35 @@ For more information on how to setup a development environment, please review th
223
223
224
224
First create the top level application directory sd_ex1 and move into it:
225
225
226
- simhug01@E107851 :/d/demo_area$ mkdir sd_ex1
227
- simhug01@E107851 :/d/demo_area$ cd sd_ex1
228
- simhug01@E107851 :/d/demo_area/sd_ex1$
226
+ shell :/d/demo_area$ mkdir sd_ex1
227
+ shell :/d/demo_area$ cd sd_ex1
228
+ shell :/d/demo_area/sd_ex1$
229
229
230
230
Next, perform the "mbed new" operation to download the mbed-os repository into this directory:
231
231
232
- simhug01@E107851 :/d/demo_area/sd_ex1$ mbed new .
232
+ shell :/d/demo_area/sd_ex1$ mbed new .
233
233
[mbed] Creating new program "ex_sdcard" (git)
234
234
[mbed] Adding library "mbed-os" from "https://github.com/ARMmbed/mbed-os" at branch latest
235
235
[mbed] Updating reference "mbed-os" -> "https://github.com/ARMmbed/mbed-os/#5faf4b26c5954d15c7c1cccac6498e0c690ad101"
236
236
warning: LF will be replaced by CRLF in mbed-os.lib.
237
237
The file will have its original line endings in your working directory.
238
- (mx1_venv1) simhug01@E107851 :/d/demo_area/sd_ex1$ ls -1
238
+ shell :/d/demo_area/sd_ex1$ ls -1
239
239
mbed-os
240
240
mbed-os.lib
241
241
mbed_settings.py
242
- (mx1_venv1) simhug01@E107851 :/d/demo_area/sd_ex1$
242
+ shell :/d/demo_area/sd_ex1$
243
243
244
244
Next, get add the sd-driver component to the application project:
245
245
246
- simhug01@E107851 :/d/demo_area/sd_ex1$ mbed add sd-driver
246
+ shell :/d/demo_area/sd_ex1$ mbed add sd-driver
247
247
<trace removed>
248
- simhug01@E107851 :/d/demo_area/sd_ex1$
248
+ shell :/d/demo_area/sd_ex1$
249
249
250
250
Next, copy the example1.cpp file and ` mbed_app.json ` files from inside the sd-driver directory to the top level sd_ex1 directory:
251
251
252
- simhug01@E107851 :/d/demo_area/sd_ex1$ cp sd-driver/features/TESTS/examples/example1.cpp .
253
- simhug01@E107851 :/d/demo_area/sd_ex1$ cp sd-driver/config/mbed_app.json .
254
- simhug01@E107851 :/d/demo_area/sd_ex1$
252
+ shell :/d/demo_area/sd_ex1$ cp sd-driver/features/TESTS/examples/example1.cpp .
253
+ shell :/d/demo_area/sd_ex1$ cp sd-driver/config/mbed_app.json .
254
+ shell :/d/demo_area/sd_ex1$
255
255
256
256
The ` mbed_app.json ` file specifies the SPI bus pin configuration for different targets.
257
257
The file includes a specific configuration of the K64F which is used
@@ -262,7 +262,7 @@ is described in more detail in the [Testing with an SDCard on Target XYZ](#testi
262
262
263
263
Next, build the example application:
264
264
265
- simhug01@E107851 :/d/demo_area/sd_ex1$ mbed compile -m K64F -t GCC_ARM
265
+ shell :/d/demo_area/sd_ex1$ mbed compile -m K64F -t GCC_ARM
266
266
267
267
268
268
#### WARNING: "mbed new ." command and possible mbed-os sd-driver versioning incompatibilities
@@ -600,25 +600,25 @@ In summary the following steps will be covered in this section:
600
600
601
601
First create the top level application directory ex_app1 and move into it:
602
602
603
- simhug01@E107851 :/d/demo_area$ mkdir ex_app1
604
- simhug01@E107851 :/d/demo_area$ pushd ex_app1
603
+ shell :/d/demo_area$ mkdir ex_app1
604
+ shell :/d/demo_area$ pushd ex_app1
605
605
606
606
Next, get a clone of public mbed OS repository in the following way:
607
607
608
- simhug01@E107851 :/d/demo_area/ex_app1$ git clone git@github.com:/armmbed/mbed-os
608
+ shell :/d/demo_area/ex_app1$ git clone git@github.com:/armmbed/mbed-os
609
609
<trace removed>
610
- simhug01@E107851 :/d/demo_area/ex_app1$
610
+ shell :/d/demo_area/ex_app1$
611
611
612
612
Next, get a clone of the sd-driver repository:
613
613
614
- simhug01@E107851 :/d/demo_area/ex_app1$ git clone git@github.com:/armmbed/sd-driver
614
+ shell :/d/demo_area/ex_app1$ git clone git@github.com:/armmbed/sd-driver
615
615
<trace removed>
616
- simhug01@E107851 :/d/demo_area/ex_app1$
616
+ shell :/d/demo_area/ex_app1$
617
617
618
618
Finally, copy the `mbed_app.json` application configuration file from `sd-driver/config/mbed_app.json` to the ex_app1 directory:
619
619
620
- simhug01@E107851 :/d/demo_area/ex_app1$ cp sd-driver/config/mbed_app.json .
621
- simhug01@E107851 :/d/demo_area/ex_app1$
620
+ shell :/d/demo_area/ex_app1$ cp sd-driver/config/mbed_app.json .
621
+ shell :/d/demo_area/ex_app1$
622
622
623
623
The `mbed_app.json` file specifies the SPI bus pin configuration for different targets,
624
624
and is discussed in the [Testing with an SDCard on Target XYZ](#testing-with-an-sdcard-on-target-xyx) section.
@@ -628,9 +628,9 @@ and is discussed in the [Testing with an SDCard on Target XYZ](#testing-with-an-
628
628
629
629
Build the test cases for the K64F target using the following command:
630
630
631
- simhug01@E107851 :/d/demo_area/ex_app1$ mbed -v test --compile -t GCC_ARM -m K64F --app-config mbed_app.json
631
+ shell :/d/demo_area/ex_app1$ mbed -v test --compile -t GCC_ARM -m K64F --app-config mbed_app.json
632
632
<trace removed>
633
- simhug01@E107851 :/d/demo_area/ex_app1$
633
+ shell :/d/demo_area/ex_app1$
634
634
635
635
The build trace is quite extensive but on a successful build you should see the following output at the end of the log:
636
636
@@ -669,12 +669,12 @@ with one another and therefore no specific tagged versions need to be checked ou
669
669
However, in the case that you experience problems building, checkout out the compatible
670
670
tagged version of each repository, as shown below:
671
671
672
- simhug01@E107851 :/d/demo_area/ex_app1$ pushd mbed-os
673
- simhug01@E107851 :/d/demo_area/ex_app1$ git checkout tags/mbed-os-5.4.0
674
- simhug01@E107851 :/d/demo_area/ex_app1$ popd
675
- simhug01@E107851 :/d/demo_area/ex_app1$ pushd sd-driver
676
- simhug01@E107851 :/d/demo_area/ex_app1$ git checkout tags/sd-driver-0.0.2-mbed-os-5.4.0
677
- simhug01@E107851 :/d/demo_area/ex_app1$ popd
672
+ shell :/d/demo_area/ex_app1$ pushd mbed-os
673
+ shell :/d/demo_area/ex_app1$ git checkout tags/mbed-os-5.4.0
674
+ shell :/d/demo_area/ex_app1$ popd
675
+ shell :/d/demo_area/ex_app1$ pushd sd-driver
676
+ shell :/d/demo_area/ex_app1$ git checkout tags/sd-driver-0.0.2-mbed-os-5.4.0
677
+ shell :/d/demo_area/ex_app1$ popd
678
678
679
679
In the above:
680
680
@@ -694,24 +694,24 @@ PC using a suitable USB cable.
694
694
695
695
All tests can be run using the following command:
696
696
697
- simhug01@E107851 :/d/demo_area/ex_app1$ mbedgt -VS
697
+ shell :/d/demo_area/ex_app1$ mbedgt -VS
698
698
<trace removed>
699
699
700
700
However, it's possible to run a particular test case using the following form of the mbedgt command:
701
701
702
- simhug01@E107851 :/d/demo_area/ex_app1$ mbedgt -VS --test-by-names=<test-name>
702
+ shell :/d/demo_area/ex_app1$ mbedgt -VS --test-by-names=<test-name>
703
703
704
704
The names of the tests can be listed using:
705
705
706
- simhug01@E107851 :/d/demo_area/ex_app1$ mbedgt -VS --list
706
+ shell :/d/demo_area/ex_app1$ mbedgt -VS --list
707
707
708
708
For example, to run the basic test use:
709
709
710
- simhug01@E107851 :/d/demo_area/ex_app1$ mbedgt -VS --test-by-names=sd-driver-features-tests-filesystem-basic
710
+ shell :/d/demo_area/ex_app1$ mbedgt -VS --test-by-names=sd-driver-features-tests-filesystem-basic
711
711
712
712
To run the fopen test use:
713
713
714
- simhug01@E107851 :/d/demo_area/ex_app1$ mbedgt -VS --test-by-names=sd-driver-features-tests-filesystem-fopen
714
+ shell :/d/demo_area/ex_app1$ mbedgt -VS --test-by-names=sd-driver-features-tests-filesystem-fopen
715
715
716
716
On a successful run, results similar to the following will be shown:
717
717
@@ -845,5 +845,3 @@ The following are related mbed storage projects and useful resources:
845
845
including the schematics for the CI test shield.
846
846
- [POSIX File Interface ISO/IEC 9899:TC2 Documentation](http://www.eng.utah.edu/~cs5785/slides-f10/n1124.pdf).
847
847
- [FATFS: Generic FAT File System Module used in mbed OS](http://elm-chan.org/fsw/ff/00index_e.html)
848
-
849
-
0 commit comments