SV: [Icc-avr] Bootloader problem
Steven Lose
sl at ecpower.dk
Wed Oct 31 23:21:38 PST 2007
Small typo in the example
Should be:
If( ucCount && !--ucCount)
{
}
Med venlig hilsen / Best regards / mit freundlichen Grüßen
EC POWER A/S
Steven Lose
Software Ingeniør
Tlf.: +45 87434100
Direkte tlf. +45 58286608
Email: sl at ecpower.dk <blocked::mailto:bsl at ecpower.dk>
www.ecpower.dk
________________________________
Fra: icc-avr-bounces at imagecraft.com [mailto:icc-avr-bounces at imagecraft.com] På vegne af Steven Lose
Sendt: 1. november 2007 07:57
Til: Discussion list for ICCAVR and ICCtiny Users. You do NOT needtosubscribeto icc-announce if you are a member of this.
Emne: SV: [Icc-avr] Bootloader problem
Hi Sylvian.
C executes from left to right, so #1 will be executes first.
Just like this:
If( ucCount && --!ucCount)
{
}
Will detect the transition from non zero to zero
But, is it readable?
I avoid it and make an extra line, then it is clear what happens.
Hence you ask, it is not clear what is happening, and then it is best to avoid it.
Or as some would says, if you read some code and have to stop at a line and use time to understand what is happening, then it is not clear enough.
Med venlig hilsen / Best regards / mit freundlichen Grüßen
EC POWER A/S
Steven Lose
Software Ingeniør
Tlf.: +45 87434100
Direkte tlf. +45 58286608
Email: sl at ecpower.dk <blocked::mailto:bsl at ecpower.dk>
www.ecpower.dk
________________________________
Fra: icc-avr-bounces at imagecraft.com [mailto:icc-avr-bounces at imagecraft.com] På vegne af Sylvain Bissonnette
Sendt: 1. november 2007 03:44
Til: Discussion list for ICCAVR and ICCtiny Users. You do NOT needtosubscribetoicc-announce if you are a member of this.
Emne: Re: [Icc-avr] Bootloader problem
Hi Rodney,
Thanks for your email that can not be more clear! a last question, if I have
PageAddressHigh = RxChar() + (RxChar() << 8);
#1 #2
witch one of the 2 RxChar() will be execute first?
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: Wednesday, October 31, 2007 9:01 AM
Subject: RE: [Icc-avr] Bootloader problem
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
________________________________
_______________________________________________
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/20071101/6e109fec/attachment-0001.html
More information about the Icc-avr
mailing list