Skip to main content
antonius
Associate III
April 17, 2017
Question

Stack memory ?

  • April 17, 2017
  • 2 replies
  • 812 views
Posted on April 17, 2017 at 07:51

Everyone,

Are these variables taking a lot of memory space on the stack ?

FRESULT fr;    //move to global        /* FatFs return code */

FILINFO fno; //move to global

DIR dir;     //move to global

?

Thanks

#space #memory #freertos #stack
This topic has been closed for replies.

2 replies

Nemui Trinomius
Associate II
April 17, 2017
Posted on April 17, 2017 at 09:43

To be frank, I just say NO.

Those variables are usually taken on BSS region.

antonius
antoniusAuthor
Associate III
April 17, 2017
Posted on April 17, 2017 at 10:16

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.

S.Ma
Principal
April 17, 2017
Posted on April 17, 2017 at 10:47

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. 

Tesla DeLorean
Guru
April 17, 2017
Posted on April 17, 2017 at 17:53

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

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..