FAT-SL Exception in Demo code when F_FS_THREAD_AWARE = 1

trexmsuee wrote on Monday, February 06, 2017:

Hi Guys,

I’m fairly new to FreeRTOS. My development environment is:

Atmel Studio 7.0
Atmel SAME70-XPLD demo board (with SAME70Q21 Cortex -M7 processor)
FreeRTOS 9.0.0
Percepio Trace 3.1
Using heap_3.c

I will need multiple tasks to access the file system on an uSD card. I’ve incorporated FAT-SL into my project, and got the default sample code, using the RAM drive, up and running.

Problem ->> if I set F_FS_THREAD_AWARE == 1, I get a call to vApplicationStackOverflowHook.

To narrow this down, an exepction is being thrown (somewhere in the bowels of the RTOS), in prvCreateDemoFilesUsing_f_write(), contained within vCreateAndVerifySampleFiles(). I can comment this, and the associated prvVerifyDemoFileUsing_f_read() out, and it works fine. In other words, I can still leave in prvCreateDemoFileUsing_f_putc() and prvVerifyDemoFileUsing_f_getc() (this is the code used to create the nested subdirectories).

Also, if F_FS_THREAD_AWARE = 0, the entirity of the demo code works fine.

I’ve tired tuning parameters in config_fat_sl.h, to no avail. I’m unable to exactly pinpoint the exact cause of the exeception, within the sequence of prvCreateDemoFilesUsing_f_write().

I’m assuming this is some issue associated with the port to the -M7. But at this point, I’m getting over my head.

I’d greatly appreciate any advice, or additional troubleshooting steps, anyone could offer.

Thanks much,

rtel wrote on Monday, February 06, 2017:

If the stack overflow hook is being called then a task has overflowed
its stack. Increase the size of the stack allocated to the offending
task: http://www.freertos.org/Stacks-and-stack-overflow-checking.html

trexmsuee wrote on Tuesday, February 07, 2017:

Hi - I changed the stack size of the Idle task to 256 bytes, and all appears happy with the world! I should have thought of this!

I do appreciate your prompt reply!

Best Regards,

tlafleur wrote on Tuesday, February 07, 2017:

A stack of 256 bytes is NOT very large… you may want to turn on FreeRTOS
run time stat’s during development to watch the stack sizes in your project.

On Tue, Feb 7, 2017 at 12:17 PM, GeraldG trexmsuee@users.sf.net wrote:

Hi - I changed the stack size of the Idle task to 256 bytes, and all
appears happy with the world! I should have thought of this!

I do appreciate your prompt reply!

Best Regards,

FAT-SL Exception in Demo code when F_FS_THREAD_AWARE = 1
https://sourceforge.net/p/freertos/discussion/382005/thread/dd74e0f9/?limit=100#1d4f

Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/freertos/discussion/382005/

To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/

~~ _/) _/) _/) ``` _/) ~~

Tom Lafleur