FreeRTOS + FatFS (SD card support) - problem with includes, undefined reference

mrtheo wrote on Tuesday, October 08, 2013:

Hi

I’m running FreeRTOS on my LPC2468 board. Currently I’m working on adding some FatFs-based code, allowing me to log data onto SD card (simple read / write instructions). I’ve looked up a few examples, then tried adding some of this code to my project.
Quite obviously, it does not work. So I’ve stripped my new (SD card - related) code to bare minimum, hoping I’d find the wrong line, but no - it still compiles with undefined reference to ‘disk_initialize’ error code (with full read / write instructions there would be a lots of undefined reference to ‘f_open’ etc errors).

#include "diskio.h"
#include "ff.h"

int main( void )
{
disk_initialize(0);
}

As you can see, all FatFS libraries are pasted into FreeRTOS\Source\include folder. In case the original libraries were improper for LPC2xxx board, I tried pasting the ones from this project - no result.

Basically the compiler behaves as it didn’t understand the includes, as if there were none. So maybe it’s a makefile problem? On the other hand, there were no #include - related problems before and I don’t know why some would appear out of the blue.

My makefile: http://codepaste.net/zqxwy2

\Include folder contents:

image

So what on earth could I possibly do wrong here? Any ideas?

Regards,
George

edwards3 wrote on Tuesday, October 08, 2013:

Well this is not a FAT fS forum (or an lwIP forum, referring to a post earlier today), but you might get some clues by looking at the FreeRTOS+IO example that uses the same file system.

mrtheo wrote on Tuesday, October 08, 2013:

As I wrote in my first post, I’ve already tried that example.

I think it’s the proper forum to write on, cosidering it’s not exactly FatFS-related problem, but more likely - a include / makefile based one.

mrtheo wrote on Friday, October 11, 2013:

Bump? I’d really use some help :slight_smile:

rtel wrote on Friday, October 11, 2013:

I think it’s the proper forum to write on,

See note 1 here: http://www.freertos.org/FAQ-how-to-use-the-FreeRTOS-support-forum.html

cosidering it’s not exactly FatFS-related
problem, but more likely - a include / makefile based one.

So you say yourself your question is not related to FreeRTOS, and your build problems are not even when building FreeRTOS code, so in accordance with note 1 on the above reference, this is not the place to post your question.

People use this forum, and sign up to receive posts, to learn specifically about FreeRTOS. Allowing it to generate traffic that is unrelated to FreeRTOS devalues the forum for those people, and could just make in an annoyance to them. I’m guessing, on another forum, your post could result in a long thread about include paths, spaces in strings, Linux Vs Windows line endings, forward slashes Vs backward slashes, misplaced tabs in makefiles, etc. none of which is, I’m afraid, of interest to subscribers of this particular forum or helping you use FreeRTOS.

The internet if full of (too many) forums and email lists that will be full of people eager to engage in such a conversation - so good luck in finding the solution.

Regards.

mrtheo wrote on Friday, October 11, 2013:

Although I don’t exactly agree with your point of view (considering I’m not sure what is the precise cause of the problem - in my previous post I was, quite obviously, guessing), I’ll abide the rules.

If this helps keeping the forum clean, I have no objections against deleting this topic, since in it’s current state it is useless both to me and other users.

Regards.