Nuvoton
/
NuMaker-mbed-SDFileSystem-example
NuMaker SD-File-System with SD mode (deprecated after mbed OS 5.4)
Revision 5:de77e9636ac0, committed 2016-12-15
- Comitter:
- shliu1
- Date:
- Thu Dec 15 11:13:01 2016 +0800
- Parent:
- 4:8a6db27b798c
- Commit message:
- Modify README.md to describe the processing of ARM mbed OS on line
Changed in this revision
README.md | Show annotated file Show diff for this revision Revisions of this file |
diff -r 8a6db27b798c -r de77e9636ac0 README.md --- a/README.md Tue Dec 13 14:19:25 2016 +0800 +++ b/README.md Thu Dec 15 11:13:01 2016 +0800 @@ -1,98 +1,24 @@ - -# Getting started with NuMaker-mbed-SDFileSystem-example on mbed OS - -The code works on an mbed OS platform. The code could access SD card by using file system in mbed platform. - -Please install [mbed CLI](https://github.com/ARMmbed/mbed-cli#installing-mbed-cli). - -## Get the example application! - -Obtain the mbed-OS library from Windows command prompt - -git clone https://github.com/ARMmbed/mbed-os - - -From the command line of Git Bash, for example: - -``` -hg clone https://developer.mbed.org/teams/Nuvoton/code/NuMaker-mbed-SDFileSystem-example/ -cd NuMaker-mbed-SDFileSystem-example - -``` - -Make shortcut for mbed-os library within the folder NuMaker-mbed-SDFileSystem-example - -### Now compile - -Invoke `mbed compile` specifying the name of your platform and your favorite toolchain (`GCC_ARM`, `ARM`, `IAR`). For example, for the ARM Compiler 5: - -``` -mbed compile -m NUMAKER_PFM_NUC472 -t ARM -``` - -Your PC may take a few minutes to compile your code. At the end you should get the following result: - -``` -+------------------------+-------+-------+---------+ -| Module | .text | .data | .bss | -+------------------------+-------+-------+---------+ -| Misc | 24893 | 28 | 1053020 | -| drivers | 1889 | 4 | 28 | -| features/FEATURE_LWIP | 162 | 16 | 16 | -| hal | 358 | 8 | 0 | -| platform | 2093 | 32 | 120 | -| rtos | 144 | 8 | 0 | -| rtos/rtx | 6946 | 100 | 8396 | -| targets/TARGET_NUVOTON | 14780 | 356 | 1072 | -| Subtotals | 51265 | 552 | 1062652 | -+------------------------+-------+-------+---------+ -Allocated Heap: unknown -Allocated Stack: unknown -Total Static RAM memory (data + bss): 1063204 bytes -Total RAM memory (data + bss + heap + stack): 1063204 bytes -Total Flash memory (text + data + misc): 51817 bytes -``` - -### Program your board - -1. Connect your mbed device to the computer over USB. -1. Copy the binary file to the mbed device . -1. Press the reset button to start the program. - -Please refer to the documents at the path https://github.com/OpenNuvoton/NuMaker_NuWicam_Samples/ - -## Export the project to Keil MDK and debug your application - -From the command line, run the following command: - -``` -mbed export -m NUMAKER_PFM_NUC472 -i uvision -``` - -To debug the application: - -1. Start uVision. -1. Import the uVision project generated earlier. -1. Compile your application and generate an `.axf` file. -1. Make sure uVision is configured to debug over CMSIS-DAP (From the Project menu > Options for Target '...' > Debug tab > Use CMSIS-DAP Debugger). -1. Set breakpoints and start a debug session. - -![Image of uVision](img/uvision.png) - -## Troubleshooting - -1. Make sure `mbed-cli` is working correctly and its version is greater than `0.8.9` - - ``` - mbed --version - ``` - - If not, you can update it easily: - - ``` - pip install mbed-cli --upgrade - ``` - -2. If using Keil MDK, make sure you have a license installed. [MDK-Lite](http://www.keil.com/arm/mdk.asp) has a 32KB restriction on code size. - - \ No newline at end of file +# Getting started SD card with file system on mbed OS + + +### Import NuMaker-mbed-SDFileSystem-example from on-line IDE +1. Please choose Nuvoton NuMaker-PFM-XXX as your target platform. +2. Please press the left-up icon "New", then choose "NuMaker SD-File-System with SD mode" from the template list. +3. Your NuMaker-mbed-SDFileSystem-example program is existed. + +#### Now compile +Please press compile icon. + +#### Burn Code & Execute +1. Connect the board NuMaker-PFM-XXX with your PC by USB cable, then there will be one "mbed" disk. +2. Copy the built binary file into "mbed" disk on you PC. +3. Press device's reset button to execute, and you could get the below log by uart console with baud rate 112500. +------------------------------------------------------------------------------- +Hello World! +Create A Dir! +Create A File! +Close The File! +Goodbye World! +-------------------------------------------------------------------------- + The code will create one file sdtest.txt within the folder mydir within micro SD card. the content is + "Hello, SD Card write operation in mbed platform !" \ No newline at end of file