TLE9879 How to set stack size

Announcements

Webinar: Integrated solutions for smaller, simpler low-voltage motor control design.
Join the webinar to experience!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User22258
Level 1
Level 1
5 replies posted First reply posted First question asked
Hello,
I would like to know/change the stack size for my application (which was originally based on Infineon sample project)
(I am using Keil V6 C compiler)

I have searched Keil and Infineon documentation but am unable to find answers to any of the following
1. What is the default stack size that is setup in an Keil/Infineon project?
2. Where in the 'tools' (ie Keil IDE etc) can I find were the stack size settings are located/can be changed

I imagine that this would all be well documented but, for the life of me, I cannot find any details.
Any pointers to RTFM would be very much welcomed and appreciated .

Thank You Advance
Ivan Vernot
realtimedesigns.com.au
0 Likes
2 Replies
Fiz
Moderator
Moderator
Moderator
First like received 50 replies posted 25 replies posted
Hello ivernot,

the stack size can be set in the file startup_tle987x.S. By default, we have 0x200 (512 Bytes).
5258.attach

Best,
Fiz
0 Likes
User22258
Level 1
Level 1
5 replies posted First reply posted First question asked
Thank You Fiz.
! That's exactly what I was looking for.

(BTW: for future readers) Kiel app note APTN_316 is about "Determining the stack usage of applications" and is interesting and useful.
I have implemented their method to 'watermark' the stack so that stack depth can be determined by the IDE (see FillSystemStack.s and SystemStack.svcd)

This works well id the the debugger is running and the program can be stopped to examine the stack used.

What would be better is to have a way for the micro to check the stack usage at runtime.
Any ideas would be welcomed.

Thanks Again Fiz.
Regards
Ivan
//realtimedesigns.com.au
0 Likes