- When you say 'project', do you mean a Polyspace project? Are the bootloader source files part of the Polyspace project?
- How do you know that the stack size estimation is not taking the bootloader sources into account?
Polyspace code prover not able to analyse stack for whole project
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
ashwini BHAT
am 3 Dez. 2020
Kommentiert: Anirban
am 5 Jan. 2021
Trying to get stack size for my project but code prover is giving only application level with initialization value.
Let me know how to get entire stack usage value for whole project with both application and bootloader.
0 Kommentare
Akzeptierte Antwort
Anirban
am 4 Dez. 2020
Hi,
Could you provide some more information? For instance, the following would be helpful:
Just for your information, the software does compute a Program Maximum Stack Usage . In some situations, the result for this metric might show up as Not Computed. Is that what is happening here?
Whatever else you can state about your diagnosis of the problem can help us here.
2 Kommentare
Anirban
am 5 Jan. 2021
Hi,
Gray checks should not prevent computation of program maximum stack usage. The function calls in gray code would simply be discounted from the computation.
The things that prevent stack usage computation are things that you would typically not have in your code:
- Red checks
- Infinite loops (These sometimes appear as Non-terminating loop red checks, but for trivial infinite loops that are perhaps intended, the loops are shown through a dashed red in the source code. )
- Recursive functions (In embedded code, recursive functions are discouraged. You can run the checker for MISRA C:2012 Rule 17.2 to detect these functions.)
If the stack usage of a function appears as Not computed, the stack usage of all functions upstream from this function will probably also appear as Not computed. One quick question comes to mind. Do you have a main function in your project or are you using the Polyspace option -main-generator?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multitasking finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!