STM32F4 discovery board SDC use

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
eribla
Posts: 20
Joined: Fri Nov 29, 2013 1:10 am

STM32F4 discovery board SDC use

Post by eribla »

Hi

trying to attach a memory card to the STM32F4 discovery.

Tried to follow http://forum.chibios.org/phpbb/viewtopic.php?f=3&t=519&hilit=pito which was supposed to be a working example, but getting stuck on the way:

The provided files by Pito have a reference to ff.h, (which was not included in the zip. -> Got this from the Fatfs site). This of course requires the ff.c file, got this..

In the ff.c again diskio.h is referenced which again needs diskio.c....

This last file though is only a skeleton file to be completed with appropriate LOW Level stuff for the hardware in question.

What am I doing wrong?

Or can somebody provide a complete set of files? (Pito?)

Thanks

Eriks
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4 discovery board SDC use

Post by Giovanni »

FatFS files are included in ChibiOS under ./ext, diskio is provided too.

Giovanni
eribla
Posts: 20
Joined: Fri Nov 29, 2013 1:10 am

Re: STM32F4 discovery board SDC use

Post by eribla »

Hi Giovanni

Thanks, maybe I am stupid or very inexperienced but I do not have diskio.c in the \ext folder

which leads to:

Code: Select all

linking...
.\obj\ch.axf: Error: L6218E: Undefined symbol disk_initialize (referred from ff.o).
.\obj\ch.axf: Error: L6218E: Undefined symbol disk_ioctl (referred from ff.o).
.\obj\ch.axf: Error: L6218E: Undefined symbol disk_read (referred from ff.o).
...
...


These functions are declared in diskio.h
I.E:

Code: Select all

diskio.h(32) : DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);



and the only diskio.c file I can find is the skeleton file that comes with FatFs.

That leads me exactly to where I was, "just as wet as was before" as we say in Germany.

What am I doing wrong?

Eriks
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: STM32F4 discovery board SDC use

Post by Giovanni »

Hi,

Look at one of the FatFS demos makefiles for all the required paths, diskio is located under ./os/various

Giovanni
eribla
Posts: 20
Joined: Fri Nov 29, 2013 1:10 am

Re: STM32F4 discovery board SDC use

Post by eribla »

Hi Giovanni

thank you very much. I finally got it to compile with no errors. (that's a first step)

These dependencies are killing me, but that might be since I am new to this and don't know where to look yet.

I just wanted to tell you that you are a HUGE help - you are almost always the first to answer in this forum.

Unlike the KEIL forum, which has a lot of flamers in it, here rookies are treated respectfully.

Everything has a learning curve but as you said - never give up.

The next fight will be to initialize the structures and do something useful. I hope I can extract some stuff from Pito's example.

I wish there was an easier example. (create file, write into, read from it, delete file...


Thanks again

Eriks
Post Reply