Giter VIP home page Giter VIP logo

example_fatfs's Introduction

FATFS example for theCore embedded C++ framework

https://travis-ci.org/theCore-embedded/example_fatfs.svg?branch=master

The example shows how to use FAT over SDSPI in theCore. Hardware in question is a regular SD card connected to the Catalex micro-SD adapter.

Detailed description

See theCore documentation for FATFS example for more information.

Supported targets (boards)

Target name Configuration file Description
tiva_tm4c_launchpad tiva_tm4c_launchpad.json TM4C123G LaunchPad Evaluation Kit

Wiring

TivaC TM4C Launchpad board

TI TM4C123G Launchpad with Micro SD card adapter attached

Connect SPI3 (SSI3) and power to the Catalex micro-SD adapter on the LaunchPad board using following pins:

Important

The Catalex module must be powered from +5V source. Pay attention to wiring. Otherwise, if connected to +3.3v, the card adapter may misbehave.

PD0 module's SPI CLK
PD1 module's SPI CS
PD2 module's SPI MISO
PD3 module's SPI MOSI
Vbus (+5V) module's VCC
GND module's GND

Preparing

  1. Install and initialize theCore (if not done previously):

    pip3 install tcore
    tcore bootstrap
    
  2. Download the example:

    tcore init --remote https://github.com/theCore-embedded/example_fatfs
    
  3. Step into the project directory:

    cd example_fatfs
    

Building

tcore compile --target tiva_tm4c_launchpad

Running

  1. Launch minicom (/dev/ttyACM0 used here as an example):

    # From new terminal
    tcore runenv "minicom -D /dev/ttyACM0"
    

    Or the same, but with superuser permissions:

    # From new terminal
    tcore runenv --sudo "minicom -D /dev/ttyACM0"
    
  2. Flash to the board:

    tcore flash --sudo
    

Expected output

  1. In minicom you should be able to see contents of the SD card root directory. For example, it can look like this:

    Welcome to theCore
    the_core v0.3.287 5045e04-dirty
    Starting FATFS example...
    #. 0 type: dir  name : HOME
    #. 1 type: dir  name : VAR
    #. 2 type: file name : TEST_FILE.TXT
    #. 3 type: file name : ANOTHER_FILE.TXT
    Which file to open?
    
  2. Select a file to print into the console. File contents then will appear on the screen.

example_fatfs's People

Contributors

forgge avatar

Watchers

 avatar  avatar

Forkers

forgge

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.