Page 1 of 1

STM32F4 discovery board SDC use

Posted: Fri Jan 24, 2014 8:32 pm
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

Re: STM32F4 discovery board SDC use

Posted: Fri Jan 24, 2014 8:42 pm
by Giovanni
FatFS files are included in ChibiOS under ./ext, diskio is provided too.

Giovanni

Re: STM32F4 discovery board SDC use

Posted: Sat Jan 25, 2014 5:08 pm
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

Re: STM32F4 discovery board SDC use

Posted: Sat Jan 25, 2014 5:12 pm
by Giovanni
Hi,

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

Giovanni

Re: STM32F4 discovery board SDC use

Posted: Sat Jan 25, 2014 6:30 pm
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