Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How to determine stack memory needed for a particular program in a microcontroller?

In case I want to fix the stack size of the program before execution.

user-image
Question ajoutée par Utilisateur supprimé
Date de publication: 2013/06/12
Mahammad Mostafa
par Mahammad Mostafa , Senior C/C++ Developer- Architect , Expandium- Viavisolutions

Fastest way, is to do a recursion, a function that takes one param that represents the recursion depth.. and then run that app.. and whenever it crashes then you are out of stack mem; check the level and multibly with the function stack space.. it will be your stack memory.