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

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

[avr-gcc-list] jmp boot loader


From: Yannick PODGORSKI
Subject: [avr-gcc-list] jmp boot loader
Date: Thu, 30 Dec 2004 17:35:35 +0100

Hi, 
I try to self programming (with boot loader) an ATMega 64 with avr-gcc and 
avrdude. 

In my Makefile, I put : 
DFLAGS = -Wl,-Ttext=0xE000 to put all code at this @. 

With AVRStudio, I program the fuses : 
BOOTRST = 0 (reset at @ 0xE000) 
BOOTSZ = 00 (4096 words for BLS) 
All Boot Locks Bits to mode 1 (no lock at all) 

At start of In my code, I program : 
MCUCR = (1<<IVCE); 
MCUCR = (1<<IVSEL); to put interrupt vector in LBS 

It's ok the program reset on boot section. I write in memory without error. All 
is good in this world. 
At the end of boot program, I put : 
MCUCR = (1<<IVCE); 
MCUCR = (0<<IVSEL); // to put interrupt vector in Application section 
asm volatile ("jmp 0"); // to start application 
but It restarts to boot section (not application section). 

When I put BOOTRST = 1(just change this fuse), the application starts @ 0x0 and 
well funtions. And if I put "jmp" 0xE000, the program reset to 0x0 and not to 
boot section . 

Some ideas ? 
Thanks for help. 

Yannick

reply via email to

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