[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Code Size Causes Crash?
From: |
Dmitry K. |
Subject: |
Re: [avr-gcc-list] Code Size Causes Crash? |
Date: |
Thu, 27 Jan 2005 18:47:45 +1000 |
User-agent: |
KMail/1.5 |
On Thursday 27 January 2005 04:58, Kevin Neff wrote:
[...]
> While investigating this problem, I made a simple program to test code
> size (which is included below). I've incremented and deincremented 'i'
> many times to increase the code size. with 404 increment and decrement
> statements, the code is run correctly (the LED blinks). The addition
> of one statement beyond that breaks the program.
[...]
> avr-objcopy --strip-all -O ihex main.elf main.hex
> text data bss dec hex filename
> 4312 0 0 4312 10d8 main.elfa
>
> avr-gcc -mmcu=atmega128 -Wl,-Map=main.map,--cref main.o -o main.elf
> avr-objcopy --strip-all -O ihex main.elf main.hex
> text data bss dec hex filename
> 4322 0 0 4322 10e2 main.elf
4322 ? What is the version of your compiler?
I have try compile this program with 3.3.4 .
First, text size was 4312 bytes (the same as you).
But after addition of one statement -- 4324 bytes.
Difference is 22 bytes: 20 -- statement themselves,
and 2 -- `rjmp' is replaced to `jmp'.