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

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

Re: [avr-gcc-list] switch from application to bootloader section


From: Yannick PODGORSKI
Subject: Re: [avr-gcc-list] switch from application to bootloader section
Date: Wed, 23 Feb 2005 09:38:04 +0100

yes, we could.
My last mail is not enough :
----------------------
Don't you make the opposite ?
to switch app section to boot section is:
 
//....
cli();
GICR = (1<<IVCE);
GICR = (1<<IVSEL);
void (*function)(void) = 0x1E000
function();
 
Anyone know how to switch interupt vector from bootloader section to application section ?
I Try :
 
//...
cli();
GICR = (1<<IVCE);
GICR = (0<<IVCE);                                // try this
void (*function)(void) = 0x0000
function();
//...
 
Can you give more details :
- what happen ?
- the CPU resets ? Do you disable watch dog ?

 

Yannick Podgorski
Tél : 04 92 94 21 13
Fax : 04 92 94 21 16
________________________________________
Kuantic - 2229 Rte de Crêtes - 06560 Valbonne
www.kuantic.com

----- Original Message -----
From: andi
Sent: Tuesday, February 22, 2005 2:30 AM
Subject: Re: [avr-gcc-list] switch from application to bootloader section

I make two different program, application and bootloader for ATMEGA8
I compile both separately. My bootloader program size is 512 byte, so I located in smallest bootloader section (Address 1E00h).
I want my program some time switch from bootloader section to application section and vice versa.
The bootloader program have a function to reprogram the flash (app section only, coz I I block spm command for boot section).
 
 
Could You help me ?
 
Andi
 
 
 
----- Original Message -----
Sent: Monday, February 21, 2005 6:10 PM
Subject: Re: [avr-gcc-list] switch from application to bootloader section

Don't you make the opposite ?
 
to switch app section to boot section is:
 
//....
cli();
GICR = (1<<IVCE);
GICR = (1<<IVSEL);
void (*function)(void) = 0x1E000
function();
 
Anyone know how to switch interupt vector from bootloader section to application section ?
I Try :
 
//...
cli();
GICR = (1<<IVCE);
GICR = (0<<IVCE);                                // try this
void (*function)(void) = 0x0000
function();
//...
 
Can you give more details :
- what happen ?
 
Do you disable watch dog ?

Yannick Podgorski
www.kuantic.com

----- Original Message -----
From: andi
Sent: Monday, February 21, 2005 10:23 AM
Subject: [avr-gcc-list] switch from application to bootloader section

I know to switch app section to boot section is:
 
//....
cli();
GICR = (1<<IVCE);
GICR = (1<<IVSEL);
void (*function)(void) = 0x0000
function();
 
Anyone know how to switch interupt vector from bootloader section to application section ?
I Try :
 
//...
cli();
GICR = (1<<IVCE);
GICR = 0;
void (*function)(void) = 0x1E000
function();
//...
 
 
but didn't work.
 
 
Andi


_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


_______________________________________________
AVR-GCC-list mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list

reply via email to

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