[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] 4433 .data+.text sensitivity.
From: |
Herb Peyerl |
Subject: |
[avr-gcc-list] 4433 .data+.text sensitivity. |
Date: |
Wed, 24 Dec 2003 06:18:50 -0700 |
I posted this on avrfreaks.net as well but I'm not sure the
relationship/membership union of that and this list.
I'm running out of hair.
I have a simple app that sets up the UART, SPI, INT0 and does some
basic I/O from them. The device in question is a 4433. avr-gcc -v
says:
Reading specs from /usr/pkg/lib/gcc-lib/avr/3.3/specs
Configured with: ./configure --target=avr --prefix=/usr/pkg
--host=i386--netbsdelf --prefix=/usr/pkg
Thread model: single
gcc version 3.3 20030511 (prerelease)
...and some version of avr-libc.
My problem is that the function of my application seems to be highly
dependant on the size of my .data section. The following produces
code that works fine:
0 .text 00000962 00000000 00000000 00000094 2**0
1 .data 0000004a 00800060 00000962 000009f6 2**0
2 .bss 00000012 008000aa 008000aa 00000a40 2**0
Adding a few extra bytes in an fputs() results in code that does
not work. ie: out of reset, there is no outward appearance that
the cpu is even coming out of reset (according to the scope on I/O
pins that I expect to do stuff). So the following is with the
addition of a few bytes in an fputs():
0 .text 00000962 00000000 00000000 00000094 2**0
1 .data 0000004e 00800060 00000962 000009f6 2**0
2 .bss 00000012 008000ae 008000ae 00000a44 2**0
It doesn't even seem to matter whether the fputs() in question is
in the code path or not.
Now, unless I'm missing something obvious here, a 4433 has 4K of
flash and I'm not coming anywhere near that threshold. I'm doing
very little in the way of function calls so I'm content to think
I'm not abusing the stack at all.
I've tried the various -m options that I thought might be applicable,
to no effect.
I'm hoping someone has a clue-by-4 they can hit me with. Anyone?
---
Beheading servers since 1999 -- The PC Weasel! http://www.realweasel.com
- [avr-gcc-list] 4433 .data+.text sensitivity.,
Herb Peyerl <=