Are these variables taking a lot of memory space on the stack ?
FRESULT fr; //move to global /* FatFs return code */FILINFO fno; //move to globalDIR dir; //move to global
To be frank, I just say NO.
Those variables are usually taken on BSS region.
So what's the cause ?
The first task, the files can be played correctly but the next task,
it's only reading the file name and never played.
I don't understand why ??? variable memory allocation ? stack overflow ?
If I played without RTOS, it's working with all the directories and files.
Not being a specialist of RTOS, I guess RTOS tasks have their own individual pseudo stack size (properly sized up) or mecanics for variable visibility.
Doesn't it depend on where you allocate them and the scope?
If you don't want multiple threads treading on each other's data they should be local/auto
Retrieving data ...