View previous topic :: View next topic |
Author |
Message |
Mark M Guest
|
pic16F876 and stack overflow |
Posted: Tue Jul 27, 2004 8:37 pm |
|
|
Hi,
CCS produces following header in the .LST file:
CCS PCM C Compiler, Version 2.732, 2680
Filename: D:\DEVELOP\PIC\PICC\DONSA4\DONSA4.LST
ROM used: 6821 (83%)
Largest free fragment is 778
RAM used: 75 (20%) at main() level
207 (56%) worst case
Stack: 8 worst case (4 in main + 4 for interrupts)
Here is my question. Is the interrupt call itself counted as 1 extra stack depth and not included in the "8 worse case" count?
Puzzled |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Tue Jul 27, 2004 9:43 pm |
|
|
The interrupt has already been counted, although your compiler is pretty old and it might have been different in the old days.
Here is what I got in the .LST file when I compiled one of my codes without any interrupts:
Quote: |
ROM used: 1747 (46%)
Largest free fragment is 2048
RAM used: 66 (37%) at main() level
87 (48%) worst case
Stack: 6 locations |
And with one interrupt added:
Quote: |
ROM used: 1859 (48%)
Largest free fragment is 2048
RAM used: 75 (42%) at main() level
97 (54%) worst case
Stack: 7 worst case (6 in main + 1 for interrupts)
|
|
|
|
Mark M Guest
|
|
Posted: Wed Jul 28, 2004 10:32 am |
|
|
Thanks Ali, I wonder if it is worthwhile to buy a new compiler. I have purchased the PCH for one project and found the same optimizer defficecies as my old PCM 2.72 and therefore I found no reason to upgrade the PCM. But may be there is something else...
Mark |
|
|
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
|
|
Posted: Wed Jul 28, 2004 5:37 pm |
|
|
Well PCM 2.72 is *very* old. Personally I have not used anything older than PCM 3.112, so I can't comment on that. However, this page might be useful:
http://www.ccsinfo.com/versions.shtml |
|
|
|