cancel
Showing results for 
Search instead for 
Did you mean: 

how to convert GNU toolchain program to keil compiler compatible.

jai23
Associate II
Posted on July 18, 2012 at 15:21

I am currently working on a project in which i have to interface SD card with STM32f100RB.

I  did the same with 8bit PIC microcontroller using Application Library provided by Microchip.

for STM32 i get a FATFs module named Chan Application Module modified by Martin Thomas  

But this code is tested for Gcc Toolchain . I am using Keil compiler. This code is not building with Keil compiler.

Please help me in converting the code in Keil compiler compatible.

Thanks in advance.

 
20 REPLIES 20
Andrew Neil
Evangelist III
Posted on July 20, 2012 at 19:45

''FatFs code is pervasive''

 

Indeed it is!

It really shouldn't be hard to find examples with FatFs in Keil - at least one other Cortex-M3 vendor provides such examples ...

''the only part you have to port to your memory/disk subsystem is in diskio.c. The bulk of FatFs can be dropped into Keil with no modification.''

But you will also have to ensure that all the configuration options are the correct...

jai23
Associate II
Posted on July 25, 2012 at 08:38

Sir I am  from New Delhi India

vinothraj
Associate II
Posted on July 25, 2012 at 13:57

''stm32f4discovery_fw\STM32F4-Discovery_FW_V1.1.0\Project\Audio_playback_and_record''

In this project you will find an ftfs module and you will get how to use it.

you can download that firmware in:

http://www.st.com/internet/evalboard/product/252419.jsp

then click on Design support and download the firmware.

rishi
Associate II
Posted on July 25, 2012 at 20:51

@ m.vinothraj... i want to record the wave file from ''audio playback and record'' project to the attatched microsd card....so can you help me in getting out this part working...or anyone else can do the same thing or can tell me how to do this part....

rishi
Associate II
Posted on July 25, 2012 at 21:11

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6lN&d=%2Fa%2F0X0000000bup%2F1442LcReT96d.V_L0ibakxqt6j8ybbnYDyZkuXbBdgA&asPdf=false
Andrew Neil
Evangelist III
Posted on July 27, 2012 at 01:07

''i am  posting the waverecorder.c code''

 

That code is just making calls to file functions like f_open(), f_write(), etc;  it neither knows nor cares what particular storage medium is actually being used - USB Stick, SD-Card, Floppy Drive, whatever.

You need to find the implementation of those file functions, and convert them to work with the SD Card.  Most likely, there will be a driver...
Andrew Neil
Evangelist III
Posted on July 27, 2012 at 01:11

''You need to find the implementation of those file functions''

From the foregoing discussion, that implementation is, presumably, FatFs?
aambreen
Associate II
Posted on October 17, 2012 at 09:15

Hi,

I have the same point in my mind that how to store file on sd card when storage media isn't usb  instead it is sd card inserted in jacket mounted on eval board and this card is connected to the controller via SDIO interface

Posted on October 17, 2012 at 15:33

I have the same point in my mind that how to store file on sd card when storage media isn't usb  instead it is sd card inserted in jacket mounted on eval board and this card is connected to the controller via SDIO interface

 

The FatFs API is very simple, and modeled after the STDIO file routines, if you are familiar with doing File IO in C this should be pretty easy to do. There are also plenty of examples on the FatFs site.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
aambreen
Associate II
Posted on October 18, 2012 at 07:07

Thank you so much