[Icc-avr] Bootloader problem

Rodney Pearson rodney at junipersys.com
Wed Oct 31 06:01:58 PST 2007


Sylvain -

 

To repeat what John mentioned in his email and to answer your question:

 

1 - Make a copy of init.s (found in ICCAVR/libsrc.avr). Name it
something like 'initboot.s'

2 - Make a copy of the appropriate crtbootXXX.s file based on the device
(found in ICCARV/libsrc.avr). Name it whatever makes sense.

3 - Edit the new crtboot.s file to include the 'initbot.s'

4 - Edit the 'initboot.s' to only set up the HW & SW stack pointers.
Remove unneeded code.

5 - Open the new crtboot.s (if not already open) in ICCAVR

6 - Go to File->Compile File->Start Up File to Object.  This will
gernerate a new *.o library with the same name as the crtboot.s file.

7 - Copy the new startup library to the library directory (ICCAVR/lib)

8 - You will need to tell the compiler to use the new startup library
when building the bootloader:

            A - Go to Compiler Options->Target->Advanced->Non-default
Startup

            B - Enter in the name of the new startup library (include
the .o extension)

            C - Perform a "Rebuild All" to force the compiler to perform
a clean build and use the new library (not technically necessary, but
I've found that the 

                  compiler will sometimes not use the new library until
it needs to perform a clean build.)

9 - You should be good to go.

10 - You can verify that the new startup library code is included by
looking at the output listing and comparing it the changes you made in
the 'initboot.s' file

 

See the ICCAVR help "Startup File" for a bit more explanation on the
startup code and how to use it.

 

Cheers!

 

Rodney Pearson

Software Engineer

Juniper Systems, Inc.

www.junipersys.com

 

________________________________

From: icc-avr-bounces at imagecraft.com
[mailto:icc-avr-bounces at imagecraft.com] On Behalf Of Sylvain Bissonnette
Sent: Tuesday, October 30, 2007 5:47 PM
To: Discussion list for ICCAVR and ICCtiny Users. You do NOT
needtosubscribetoicc-announce if you are a member of this.
Subject: Re: [Icc-avr] Bootloader problem

 

Hi Rodney,

 

    Hmmm, it's 256 word, 256k for a bootloader is a little big,  If I
modify the init.s what I must do to say to the

compiler to use my init.s and not the original one?

 

Thanks

Sylvain

	----- Original Message ----- 

	From: Rodney Pearson <mailto:rodney at junipersys.com>  

	To: Discussion list for ICCAVR and ICCtiny Users. You do NOT
needtosubscribeto icc-announce if you are a member of this.
<mailto:icc-avr at imagecraft.com>  

	Sent: Tuesday, October 30, 2007 4:37 PM

	Subject: RE: [Icc-avr] Bootloader problem

	 

	Hi Sylvain -

	 

	I'm assuming you meant 256 bytes, not 256k? (words? Bytes?)

	 

	Either way you can save space in the start up file be removing
the code that initializes the memory of SRAM (assuming you are not using
SRAM in the same manner as "normal" application code).  Take a look in
the init.s startup file - that is where the initialization code is
located.  It is in Assembly.

	 

	Cheers!

	 

	Rodney Pearson

	Software Engineer

	Juniper Systems, Inc.

	www.junipersys.com

	 

	
________________________________


	From: icc-avr-bounces at imagecraft.com
[mailto:icc-avr-bounces at imagecraft.com] On Behalf Of Sylvain Bissonnette
	Sent: Tuesday, October 30, 2007 3:42 PM
	To: Discussion list for ICCAVR and ICCtiny Users. You do NOT
needtosubscribetoicc-announce if you are a member of this.
	Subject: [Icc-avr] Bootloader problem

	 

	Hi,

	 

	    I'm currently working on my MegaLoad bootloader and I want
to fit this one in 256k size.  when compiling

	I get not large enough... I need only couple of byte more.  I
don't use any interrupt, is there some way to

	get a bit more maybe in the startup file? but I never had work
with the startup and I don't really now how

	to do this.  Any help will be welcome.

	 

	Thanks 

	Sylvain Bissonnette

	 

		 

	
________________________________


	_______________________________________________
	Icc-avr mailing list
	Icc-avr at imagecraft.com
	http://dragonsgate.net/mailman/listinfo/icc-avr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20071031/21a04b26/attachment-0001.html


More information about the Icc-avr mailing list