Undefiend References to ff.h functions

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Undefiend References to ff.h functions

Jump to solution
1,424 Views
claudecdg66
Contributor II

Hi im using the fatfs library and i get those undefiend references to the ff.c functions in usb_msd_fatfs.c

I know its an easy fix but i just can't find out why it dosent work. im using mcuexpressoIDE 11.1.2_4120 and latest SDK

Tags (1)
0 Kudos
1 Solution
1,324 Views
lpcxpresso_supp
NXP Employee
NXP Employee

I'm not sure how moving files and folders would have fixed the same issue since the linking problem is actually triggered by conditional compilation. If you'll inspect closely ff.c, you'll notice that f_chmod and f_utime are guarded by: #if FF_USE_CHMOD && !FF_FS_READONLY

To fix the linking issue, you'll need to adjust configuration parameters for FatFS - see ffconf.h.

Greetings,
MCUXpresso IDE Support

View solution in original post

4 Replies
1,324 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello Claude,

Hope you are doing well.

I've checked your project and it seems that all your files have been added and linked properly, so it is strange that you are getting this error. Could you please try importing the host_msd_fatfs project and copy the extra files from your application to this folder. If possible build the project when you add and link a folder so you can identify if any other file is causing an issue.

Best Regards,

Sabina

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

----------------------------------------------------------------------------------------------------------------------- 

0 Kudos
1,324 Views
claudecdg66
Contributor II

most of the file come directly for the example msd project. I think i already had this problem and the quick fix was to put all fatfs file into the source folder but now i cant do that cause fatfs files are linked to the sdk.

0 Kudos
1,325 Views
lpcxpresso_supp
NXP Employee
NXP Employee

I'm not sure how moving files and folders would have fixed the same issue since the linking problem is actually triggered by conditional compilation. If you'll inspect closely ff.c, you'll notice that f_chmod and f_utime are guarded by: #if FF_USE_CHMOD && !FF_FS_READONLY

To fix the linking issue, you'll need to adjust configuration parameters for FatFS - see ffconf.h.

Greetings,
MCUXpresso IDE Support

1,324 Views
claudecdg66
Contributor II

Got it

FF_FS_READONLY need to be 0 and

FF_USE_CHMOD need to be 1 witch he was to 0 then it complile. thx for your answer.

0 Kudos