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

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

Re: [avr-gcc-list] [Patch, avr] Shrink interrupt vector table down to la


From: Senthil Kumar Selvaraj
Subject: Re: [avr-gcc-list] [Patch, avr] Shrink interrupt vector table down to last used entry
Date: Sat, 2 Mar 2013 11:29:08 +0530
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Mar 01, 2013 at 04:05:53PM +0100, Georg-Johann Lay wrote:
> Senthil Kumar Selvaraj wrote:
> 
> >> Granted, the (saved memory) reward for the effort is small, but if the
> >> user would specify the number of the highest used vector, then gas
> >> conditional assembly, in a "bad vector" macro does handle the task:
> > 
> > Ah, but right now, the vector table is defined in avr-libc
> > (crt1/gcrt1.S) and gets built into crtxxx.o at avr-libc build time. It
> > is then linked into the final executable automatically by the gcc
> > driver. I guess that rules out conditional assembly?
> 
> It is reasonable that gcrt1.S is contained in a distribution so that users can
> assemble an use it directly.  There's already an issue for this: #38125.
> 
> http://savannah.nongnu.org/bugs/?38125
> 
> With that, it's straight forward to accomplish a small vector table:
> 
> Just -nostartfiles, add gcrt1.S to the project and define _VECTORS_SIZE.

Well, if the user is willing to do that, he might as well customize it
and delete the extra entries in the table himself. He can actually do
better than just shrinking the tail - he can use "holes" for some custom
assembly (see
http://blog.schicks.net/wp-content/uploads/2009/09/bootloader_faq.pdf).
And of course, a custom linker script can do the job as well.

The intent behind the original patch was to shrink the table
automatically with minimal or no user input for a standard setup. I
guess Eric's response seals the fate of the patch then :)

Regards
Senthil



reply via email to

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