Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
FAT File System Example 1 for EVK1100 Documentation

Introduction

This documents data structures, functions, variables, defines, enums, and typedefs in the software. It also gives an example of the usage of the FAT file system through the dataflash memory (AT45DBX) & SPI driver.

The example is based on a shell like interface on RS232, that will let you issue the following commands :

  • a:, b:... goto selected drive
  • mount drivename(a, b...): mount selected drive
  • cd dirname: change path to "dirname"
  • ls: display the content of the current directory
  • mkdir dirname: create "dirname"
  • cat filename: display "filename" content
  • touch filename: create "filename"
  • disk: get number of drives
  • append filename: append text to a file
  • mark: bookmark current directory
  • goto: goto bookmark
  • cp filename: copy filename to bookmark
  • df: get free space information
  • fat: get FAT type for current drive
  • rm filename: erase file or EMPTY directory
  • format drivename(a, b...): Format the selected disk (erase all data on it)
  • format32 drivename(a, b...): Force to format the selected disk in FAT32 (erase all data on it) [only possible if disk size allow it]
  • mv src dst: move file or directory
  • help: Display command helper

Example to copy-paste a file: Bookmark the destination location directory using the command "mark". Then go to the source location of the wanted copied file. (the destination directory should be different from the source directory) Type "cp thefileiwanttocopy.txt". Go back to the destination location, type "ls", you should see the copied file now.

More information is available in the FileSystem section.

Main Files

Configuration Files

Compilation Info

This software was written for the GNU GCC for AVR32 and IAR Systems compiler for AVR32. Other compilers may or may not work.

Device Info

All AVR32 devices with an SPI module can be used. This example has been tested with the following setup:

  • EVK1100, EVK1101, EVK1105 or UC3C_EK evaluation kit

Setup Information


CPU speed: 12 MHz

  • Connect USART1 (on EVK1100 or EVK1101) to a PC serial port via a standard RS232 DB9 cable, or USART0 (on EVK1105 or UC3C_EK) abstracted with a USB CDC connection to a PC.
  • Set the following settings in your terminal of choice: 57600 8N1

Contact Information

For further information, visit Atmel AVR32.