Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT




Loading

Problems with Reading and Writing Files Using FreeRTOS-FAT_SL

Posted by paultsai111 on July 28, 2016

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

Posted by rtel on July 28, 2016

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

Posted by paultsai111 on July 28, 2016

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;

Attachments

pic1.jpg (143638 bytes)
pic2.jpg (142395 bytes)

Problems with Reading and Writing Files Using FreeRTOS-FAT_SL

Posted by davedoors on July 28, 2016

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

Posted by paultsai111 on July 28, 2016

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


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS kernel V10 is available for immediate download. Now MIT licensed.


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS