Fatfs Unicode
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-01-19 1:57 AM
Posted on January 19, 2015 at 10:57
Hi Guys,
I previously had code working with Fatfs and I had LFN enabled but LFN_Unicode disabled. I now want to start using Unicode, but after enabling it in the ffconf.h file, my fat functions return FR_NOT_READY after mounting. Is there anything else I need to enable?
This discussion is locked. Please start a new topic to ask your question.
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-01-19 2:21 AM
Posted on January 19, 2015 at 11:21
Hi,
Enabling LFN feature and set _LFN_UNICODE to 1 in order to switch the character encoding on the FatFs API (TCHAR) to Unicode, may affect the behavior of string I/O.Thus, Unicode handling functions ff_convert() and ff_wtoupper() functions must be added to the project.Note that, the LFN working buffer occupies (_MAX_LFN + 1) * 2 bytes. When use stack for the working buffer, take care on stack overflow. When use heap memory for the working buffer, memory management functions, ff_memalloc() and ff_memfree(), must be added to the project. Please consider if you have a stack issue.Regards,Heisenberg.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-01-19 2:38 AM
Posted on January 19, 2015 at 11:38Already got both wtoupper and convert functions in, and my stack is pretty big so don't think that is the issue. I noticed the fatfs documentation makes mention of putting an L before the filename string, or a _T(), but I don't quite understand the circumstances for using them. Could that be the issue?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-01-20 1:59 AM
Posted on January 20, 2015 at 10:59
I've managed to get rid of the FR_NOT_READY error by using the first of my fat volumes instead of the second one. I'm trying to create a folder called CONFIG on my SD card now, but the characters are coming out in Chinese or something. I've got the code page set to 1252 so I don't understand why it's happening. Anyone got any ideas?
