So after discovering that an older program I had in V4 would not run in an ATTiny13 in FC8 due to the stack overflowing, I am wondering what measures FC8 could take to flag this up as an error or a warning, this should be I would have though be a fairly important check given that the programmer may have no knowledge as to how much stack is being consumed.
Also to be able to access the .lst file from within FC8 would be very handy
Iain
Stack Overflow Protection
Moderator: Benj
-
- Posts: 97
- Joined: Tue Jul 14, 2009 4:37 pm
- Has thanked: 13 times
- Been thanked: 9 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Stack Overflow Protection
Hello Iain,
On an AVR device we display something like this in the compiler messages.
Flash usage is the .text combined with a copy of the .data initialisers
(static) RAM usage is a combination of data and bss
Might be worth looking at the AVR freaks forums as there are some relevant threads on the topic.
On a PIC things are much better and it lets you know if there are likely to be stack or memory issues. Other devices such as ARM have the same problem as AVR but also have a lot more memory available so it's much less likely to run into the problem.
On an AVR device we display something like this in the compiler messages.
This is specifically from your posted Inflation program.text data bss dec hex filename
832 0 35 867 363 C:\Users\BenR\AppData\Local\Temp\Inflation REV4A_v7-1.elf
Flash usage is the .text combined with a copy of the .data initialisers
(static) RAM usage is a combination of data and bss
Might be worth looking at the AVR freaks forums as there are some relevant threads on the topic.
On a PIC things are much better and it lets you know if there are likely to be stack or memory issues. Other devices such as ARM have the same problem as AVR but also have a lot more memory available so it's much less likely to run into the problem.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 97
- Joined: Tue Jul 14, 2009 4:37 pm
- Has thanked: 13 times
- Been thanked: 9 times
Re: Stack Overflow Protection
Benj,
Thanks for the reply but I don't see or understand how this info allows an informed assessment of stack overflow ???
Iain
Thanks for the reply but I don't see or understand how this info allows an informed assessment of stack overflow ???
Iain