Tohkatsu
(Tohkatsu Rikabu)
March 1, 2021, 12:58pm
1
I’m really in hurry and finally I can’t solve this problem.
I just want to use SDFileSystem(SDFileSystem - SDFileSystem | Mbed ) for my project, but the compiler says
Error: Object of abstract class type “FATFileHandle” is not allowed in “SDFileSystem/FATFileSystem/FATFileSystem.cpp”, Line: 100, Col: 17
I guess my project’s source code doesn’t affect this error, or I will post it if you need it for solving.
latest version of SDFileSystem is used. and the version of FatFileSystem library in SDFileSystem is Jul 2016 one.
Thank you and sorry for my poor English.
MACRUM
(Toyomasa Watarai)
March 1, 2021, 1:34pm
2
Hi,
I had same problem and reported here:
opened 04:42AM - 11 Apr 17 UTC
closed 12:00PM - 20 Jul 17 UTC
type: bug
### Description
- Type: Bug
- Related issue: https://github.com/ARMmbed/mbed-o… s/issues/3983
- Priority: Major
- Reported: https://developer.mbed.org/questions/77631/LPC824SD/
---------------------------------------------------------------
## Bug
**Target**
K64F, SSCI824, GR-PEACH
**Toolchain:**
ARM
**Toolchain version:**
armcc 5.06 (online compiler)
**Expected behavior (Rev. 137 or older)**
SDFileSystem_HelloWorld example works with log below:
```
Hello World!
Goodbye World!
```
**Actual behavior (Rev. 138 or onward)**
SDFileSystem_HelloWorld example fails with log below:
```
Hello World!
Could not open file for write
```
**Steps to reproduce**
* Import following example with check ```Update all libraries to the latest revision``` option.
https://developer.mbed.org/users/mbed_official/code/SDFileSystem_HelloWorld/
* Modify the definition of the SDFileSystem constructor below:
```
#if defined(TARGET_LPC1768)
SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board
#elif defined(TARGET_SSCI824)
SDFileSystem sd(dp8, dp9, dp10, dp11, "sd");
#else // CI test shield
SDFileSystem sd(D11, D12, D13, D10, "sd");
#endif
```
* Compile and run
**Notes**
* The mbed library rev 137 or older revision works fine
* The mbed library rev 138 or onward generate warning messages in compile below:
```
Warning: Function "mbed::DirHandle::DirHandle()" (declared at <a href="#" onmousedown="mbed_doc_goto('/SDFileSystem_HelloWorld_Update//extras/mbed_093f2bd7b9eb/drivers/DirHandle.h', '48'); return false;">/extras/mbed_093f2bd7b9eb/drivers/DirHandle.h:48</a>) was declared "deprecated" in "SDFileSystem/FATFileSystem/FATDirHandle.cpp", Line: 28, Col: 55
Warning: Function "mbed::FileHandle::FileHandle()" (declared at <a href="#" onmousedown="mbed_doc_goto('/SDFileSystem_HelloWorld_Update//extras/mbed_093f2bd7b9eb/drivers/FileHandle.h', '45'); return false;">/extras/mbed_093f2bd7b9eb/drivers/FileHandle.h:45</a>) was declared "deprecated" in "SDFileSystem/FATFileSystem/FATFileHandle.cpp", Line: 28, Col: 39
Warning: Function "mbed::FileSystemLike::FileSystemLike(const char *)" (declared at <a href="#" onmousedown="mbed_doc_goto('/SDFileSystem_HelloWorld_Update//extras/mbed_093f2bd7b9eb/drivers/FileSystemLike.h', '47'); return false;">/extras/mbed_093f2bd7b9eb/drivers/FileSystemLike.h:47</a>) was declared "deprecated" in "SDFileSystem/FATFileSystem/FATFileSystem.cpp", Line: 45, Col: 62
Success: Success! in "<a href="#" onClick="mbed_navigate_to('/SDFileSystem_HelloWorld_Update', function() { theitf.controls.get('sidebar_tabs').activate(1); }); return false;">Build Details</a>"
```
The issues was fixed in latest FATFileSystem library (10:28e685e5ff7f). You can update the FATFileSystem library which is in the SDFileSystem library.
I hope this helps.
Toyo
Tohkatsu
(Tohkatsu Rikabu)
March 1, 2021, 1:48pm
3
I really thank you!!
Now I can compile it properly!!
1 Like