Hi, I’m trying to use SDcard on Nucleo F446re using the SDFileSystem library, but some error occurred when I compiled my project.
The Develop environment
Keil Studio Online Compiler
The Hardware and software(Mbed OS).
Nucleo F446re
Mbed OS 5.15.7
The library I used is below.
SDFileSystem
The Output (including the error message)
Build started
Using toolchain ARMC6 profile {‘ENV’: {‘ARMLMD_LICENSE_FILE’: ‘8224@10.100.158.60:8224@10.100.125.150’}, ‘PATHS’: {‘ARMC6_PATH’: ‘/opt/ARMCompiler6.15.13/bin/’, ‘ARM_PATH’: ‘/opt/armcc5_06_u6/’}, ‘common’: [‘-c’, ‘–gnu’, ‘-O3’, ‘-Otime’, ‘–split_sections’, ‘–apcs=interwork’], ‘cxx’: [‘–cpp’, ‘–no_rtti’], ‘COMPILE_C_AS_CPP’: False, ‘NEW_SCAN_RESOURCES’: True}
scan /tmp/chroots/ch-74e91526-af3e-407a-aaf9-656955529315/src
scan /tmp/chroots/ch-74e91526-af3e-407a-aaf9-656955529315/extras/mbed-os.lib
no member named ‘fsize’ in ‘FIL’
format specifies type ‘int’ but the argument has type ‘FSIZE_t’ (aka ‘unsigned long’) [-Wformat]
no member named ‘fsize’ in ‘FIL’
compile SDFileSystem/FATFileSystem/ChaN/ccsbcs.cpp
compile SDFileSystem/FATFileSystem/ChaN/ff.cpp
compile SDFileSystem/FATFileSystem/FATFileHandle.cpp
/src/SDFileSystem/FATFileSystem/FATFileHandle.cpp:65:25: error: no member named ‘fsize’ in ‘FIL’
position += _fh.fsize;
~~~ ^
/src/SDFileSystem/FATFileSystem/FATFileHandle.cpp:74:55: warning: format specifies type ‘int’ but the argument has type ‘FSIZE_t’ (aka ‘unsigned long’) [-Wformat]
debug_if(FFS_DBG, “lseek OK, returning %i\n”, _fh.fptr);
~~ ^~~~~~~~
%lu
/src/SDFileSystem/FATFileSystem/FATFileHandle.cpp:89:16: error: no member named ‘fsize’ in ‘FIL’
return _fh.fsize;
~~~ ^
1 warning and 2 errors generated.
Internal error.
Build failed
Build failed
According to the error message, It seems like the conflicts occurred in “FATFileSystem.cpp” and I found that the “_fh.fsize” was the problem.
After that, I tried to find the causes of the error from some libraries that were included in “FATFlieSystem.h”, because I thought there was no definition of “fsize”.
However, I found a definition of “fsize” in structure at “ff.h” that was imported by “FATFileSystem.cpp”.
In spite of this, the error occurred.
Now I have no idea to solve this problem. I’m really happy if you teach me the way to solve this problem.