SDCard Using FatFS without SDK doesn't compile

Hi,

During the development of the firmware over nRF5340, I need to modify the ffconf.h file without changing the SDK. Based on this post I copied the FATFS files into the application root in this way: src/fatfs/<files> and into pro.conf I modified the file in this way:

# SDCard & Filesystem
CONFIG_DISK_DRIVERS=y
CONFIG_DISK_DRIVER_SDMMC=y
CONFIG_DISK_ACCESS=y

# Added FATFS library into application project folder!
CONFIG_FILE_SYSTEM=n
CONFIG_FAT_FILESYSTEM_ELM=n

When I try to compile (pristine build) the project, I receive the following errors:

Y:\Projects\X\src\fatfs\ff.c:4989: multiple definition of `f_mkdir'; app/libapp.a(ff.c.obj):Y:\Projects\X\src\fatfs\ff.c:4989: first defined here
c:/users/warcomeb/ncs/toolchains/v2.1.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: app/libapp.a(file.c.obj): in function `f_rename':
Y:\Projects\X\src\fatfs\ff.c:5074: multiple definition of `f_rename'; app/libapp.a(ff.c.obj):Y:\Projects\X\src\fatfs\ff.c:5074: first defined here
c:/users/warcomeb/ncs/toolchains/v2.1.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: app/libapp.a(file.c.obj): in function `f_mkfs':
Y:\Projects\X\src\fatfs\ff.c:5808: multiple definition of `f_mkfs'; app/libapp.a(ff.c.obj):Y:\Projects\X\src\fatfs\ff.c:5808: first defined here
c:/users/warcomeb/ncs/toolchains/v2.1.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: app/libapp.a(file.c.obj): in function `File_directoryChange':
Y:\Projects\X\src\file.c:177: undefined reference to `fs_opendir'
c:/users/warcomeb/ncs/toolchains/v2.1.2/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.exe: app/libapp.a(file.c.obj): in function `File_init':
Y:\Projects\X\src\file.c:155: undefined reference to `fs_mount'

I can't delete the reference to zephyr module...

Where is it the problem?

Thanks 

Parents Reply Children
No Data
Related