• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Synergy GUIX Stack Size requirement

Status
Not open for further replies.

zachp

New Member
Using the SK-S7 Synergy kit from Renesas, I was working on the ThreadX GUIX example. In the application note that Renesas provides, it tells me to increase the stack size from 1024 to 2048. Why would I need to do that? I thought it was preferable to keep the stack size as small as reasonably possible for granularity. Any thoughts?
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
In C, or any high level language, the software stack is referred to.. 1024 bytes is usually more than ample for embedded design but!!!! If you use floating point arithmetic, lots of stack space is required...

The software stack is used to hold local function variables, function pointers, function returns etc... So if a called function has several long's, int's and char's then each nested function will require a finite amount of stack space...

If you want more RAM and less stack... Keep away from local variables and FP arithmetic...
 

zachp

New Member
Hey Ian, thanks for your quick reply!

I was thinking, as the S7 has an FPU, that this wouldn't be a problem, but then I realized that the FPU only affects how it is calculated, not how the different parts are held and moved around. That makes a lot of sense. And, as a GUI, even though I can't see what's going on underneath, I'd imagine there are a lot of calculations needed to figure out what to put where.

I'll probably have some follow up questions as I mull this over but this was very helpful, thanks again!
 
Status
Not open for further replies.

EE World Online Articles

Loading
Top