avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] [RFC] avr mega256 considerations


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] [RFC] avr mega256 considerations
Date: Tue, 10 Jun 2003 11:31:12 +0200
User-agent: Mutt/1.2.5i

As Theodore A. Roth wrote:

> Adding a new march for devices with more than 128KB of flash would
> allow me to do something like this in gdb:
> 
>   /* Examine machine arch to see how many bytes are pushed onto the
>      stack during execution of a call/rcall.  */
>   switch (info.bfd_arch_info->mach)
>     {
>     case bfd_mach_avr6:
>       tdep->pc_push_size = 3;
>       break;
>     case bfd_mach_avr1:
>     case bfd_mach_avr2:
>     case bfd_mach_avr3:
>     case bfd_mach_avr4:
>     case bfd_mach_avr5:
>     default:
>       tdep->pc_push_size = 2;
>     }
> 
> This would require changes to binutils and gcc and possibly avr-libc
> too. I haven't looked into what the changes would be though.

If we need to touch it, wouldn't it make more sense to just use the
AVR hardware ID byte (bytes 2 & 3 of the signature) as an arch value
for each chip?  That way, each tool can derive whatever information it
needs based on that value.  Some tools could still classify the chips
into major architectures, other tools might want a more fine-grained
decision.

The major drawback is that the entire toolchain needs to be tought
about new chips though.

-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/




reply via email to

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