Problems with Reading and Writing Files Using FreeRTOS-FAT_SL

Hi FreeRTOS Forum Members: Here is one question about testing the FreeRTOS Codes, The main problem is when calling the f_getcwd() , the Evaulation Board Output Terminal will show the fatal exceptions(28) Before testing the output, all of the codes compile well with no problems. So can anybody give me some hint or advices about this questions?

Problems with Reading and Writing Files Using FreeRTOS-FAT_SL

Grep’ing the source code for “28” I see it defined as “FERRALLOCATION”. Other than that, place a break point on your call to f_getcwd(), then step through the code from there, until you find the code that is generating the error.

Problems with Reading and Writing Files Using FreeRTOS-FAT_SL

After inserting the break point printf(“stringn”) into the fgetcwd()(the same as fngetcwd()) , the output terminal does not enter this fgetcwd() and shows any breakpoint informations. I guess one thing is that This read / write code too big, so the mcu system can not afford this . Another guess is that I changed one type of variables. The yellow marked parts is that I changed from “BaseTypet” to “int”. I do not know why should defined this BaseTypet, because I think it is only a number. When Compiling, it shows you havn’t defined. So for me, I used Xtensla 32 bit CPU for my board. Should I defined the BaseType_t as shown below ? Note: The modified souce code of Sample Read Write Demo Code from FreeRTOS.org as shown in the attached files.!

define BaseType_t 32;

Problems with Reading and Writing Files Using FreeRTOS-FAT_SL

BaseType_t is defined in every port layer, so probably 30 or more different definitions in the FreeRTOS source, did you look at any of those? I guess not because you would see its not a number. It must be defined anyway, otherwise FreeRTOS would not compile.

Problems with Reading and Writing Files Using FreeRTOS-FAT_SL

Ya, After Finding the freertos portmacro.h, there are severval port definitions, and I also include , and compile with no problem, However, the same problem always encouter . fatal exception(28) is always shown on my com terminals. SPIFF File System Read /Write that ESP9266 WiFi SOC Chip provided is used as an example for us to be shown. I do not know what exactly FreeRTOS use which kind of File System Operation to do. But I guess, due to the limitation of Memory Size, The ESP8266 can not afford this kind of data read /write operation that FreeRTOS provided.So, Maybe oneday you can provdi Xtensia CPU in ESP8266 suitable Codes for Use