avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Code Size Causes Crash?


From: Kevin Neff
Subject: Re: [avr-gcc-list] Code Size Causes Crash?
Date: Thu, 27 Jan 2005 13:51:30 -0600 (CST)

On Thu, 27 Jan 2005, Dmitry K. wrote:

> 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'.

  # avr-gcc --version
  avr-gcc (GCC) 3.4.2
  Copyright (C) 2004 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 


Thanks for all of the help, everyone.  My code had out grown its original
architecture.  The code size issue is my excuse to take the time to do
it right.

Thanks again.

--Kevin Neff





reply via email to

[Prev in Thread] Current Thread [Next in Thread]