check stack & heap size during debug in S32DS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

check stack & heap size during debug in S32DS

Jump to solution
1,733 Views
skseofh
Contributor II

Hi

I'm using S32144 and S32DS.

 

During Debugging, is there any way to check stack & heap size?

 

If there is, please let me know!

Thanks

0 Kudos
1 Solution
1,722 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

these discussions could be helpful:

https://community.nxp.com/t5/S32-Design-Studio/How-to-check-CPU-Usage/m-p/743398

https://community.nxp.com/t5/S32K/Failure-reaction-in-case-of-Stack-overflow-or-underflow-S32K1/m-p/...

https://community.nxp.com/t5/S32K/Example-of-DWT-for-stack-usage-monitoring-on-S32K1xx/td-p/1160990

In addition, I like this simple high water mark method: fill whole stack by some pattern like 0xAA (for example by debugger) and then run the code. Examine as many program paths as possible and then check the stack – you will see which part of the stack has been rewritten and you can adjust the size accordingly.

Regards,

Lukas

 

View solution in original post

1 Reply
1,723 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

these discussions could be helpful:

https://community.nxp.com/t5/S32-Design-Studio/How-to-check-CPU-Usage/m-p/743398

https://community.nxp.com/t5/S32K/Failure-reaction-in-case-of-Stack-overflow-or-underflow-S32K1/m-p/...

https://community.nxp.com/t5/S32K/Example-of-DWT-for-stack-usage-monitoring-on-S32K1xx/td-p/1160990

In addition, I like this simple high water mark method: fill whole stack by some pattern like 0xAA (for example by debugger) and then run the code. Examine as many program paths as possible and then check the stack – you will see which part of the stack has been rewritten and you can adjust the size accordingly.

Regards,

Lukas