The sd_filesystem application demonstrates few operations on directories and files (Ex: create, delete, read, write, open, close, copy etc) in micro SD card formatted as FAT32.
1. Connect your micro SD card to your PC/Laptop and create a folder in it by the name “src” and add some files or folders (Which will be copied or mirrored in target directory “tgt” by the application).
2. Insert micro SD card in the provided SD card slot of CYW943907AEVAL1F and connect the board to PC USB port.
3. Open the project sd_filesystem located at 43xxx_Wi-Fi/apps/snip/sd_filesystem in WICED_SDK 5.1. The source code sd_filesystem.c is found in the project along with related makefile sd_filesystem.mk.
4. Add platform support for CYW943907AEVAL1F in makefile sd_filesystem.mk at the line VALID_PLATFORMS as below (only in WICED_SDK 5.1),
5. Create a target as below to download and run the application on the board CYW943907AEVAL1F.
6. Double click on the target to compile and download it into CYW943907AEVAL1F.
7. Open any serial port reader tool (Ex: Tera Term, Putty) and start capturing WICED Serial Port Data and wait for Build to complete.
8. Once compile, download and run is complete, then messages will be printed in serial terminal as shown below.
9. If CYW943907AEVAL1F resets during copying files or mirroring nested directories it indicates application stack overflow . Then decrease PATH_BUFFER_SIZE to 256 (Which is 2048 as shown in diagram below) and FILE_BUFFER_SIZE (which is 65536 as shown in diagram below) in sd_filesystem.c
If the reset occurs even after the above mentioned changes then increase APPLICATION_STACK_SIZE to 6k (which is 1024*256 as shown in figure below) in sd_filesystem.mk.