[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Is this a Stack problem?
From: |
Eric Fu |
Subject: |
[avr-gcc-list] Is this a Stack problem? |
Date: |
Tue, 20 Jan 2004 08:41:37 +1100 |
Hi All,
I'm writing a test code to implement a SW half duplex interrupt UART with
ATmega16 / STK500.
The code passes the compiler (modified from a successful HW UART code).
However, it doesn't work. It couldn't transmit anything, nothing happens at the
transmit pin. The degugging I did shows the following:
a.. The timer interrupt routine has been entered 22 times before it stops.
And it is repeatable. Note: the timer period is defined same as bit rate. It
supposed to transmit 11 ASCII code, equivalent to 220 timer interrupt entries.
b.. If I run the Simulator in AVR Studio 4.08 in step mode, it could transmit
the all the 11 characters, at least this is what I saw in the Simulator, and
the transmit pin behaves as expected (in the Simulator)
c.. If I run in continuos mode with a breakpoint set immediately after the 11
characters, it took 28 Secs to complete, however, it seems it does it
connectedly.
As I don't have a emulator at the moment, it is hard for me to find the fault.
Could it be Stack problem? If it is, how to fix it?
The compile message for code size is
Size after:
RF001.elf :
section size addr
.text 1622 0
.data 12 8388704
.bss 137 8388716
.noinit 0 8388853
.eeprom 0 8454144
.stab 7212 0
.stabstr 3158 0
Total 12141
I'm not sure what stab and stabstr are. Are they supposed to be like that?
Thanks
Eric Fu
- [avr-gcc-list] Is this a Stack problem?,
Eric Fu <=