[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] Problems with bootloader
From: |
Yannick PODGORSKI |
Subject: |
RE: [avr-gcc-list] Problems with bootloader |
Date: |
Tue, 18 Oct 2005 09:44:02 +0200 |
Hi,
I
suppose you have done this :
In Makefile :
DFLAGS = -Wl,-Ttext=0x1E000 to put all
code at this @.
With AVRStudio, program the fuses :
BOOTRST = 0
(reset at @ 0x1E000)
BOOTSZ = 00 (4096
words for BLS)
At start of code, program :
MCUCR =
(1<<IVCE);
MCUCR = (1<<IVSEL); to put interrupt vector in LBS
You can try :
void pageErase(uint16_t
page)
{
cli();
eeprom_busy_wait();
boot_page_erase(page);
boot_spm_busy_wait();
sei();
}
Or
void
WritePage(uint16_t page)
{
cli();
eeprom_busy_wait();
boot_page_erase(page);
//fille temporary buffer
for(uint16_t i=0; i< SPM_PAGESIZE; i+=2){
boot_page_fill(page + i,
i);
}
boot_page_write(page);
boot_spm_busy_wait();
boot_rww_enable();
sei();
}
Hope that
helps.
Yannick.
Hi people,
I'm trying to write a bootloader for the at90can128
and I'm having problems. The biggest one is that I can't write to the flash,
I've tried everything and nothing works. So I gave up and tried to erase a flash
page, nothing too...
void pageErase(uint16_t
page)
{
cli();
boot_spm_busy_wait();
boot_page_erase(page);
boot_spm_busy_wait();
sendChar('F');
while (1);
}
this is the function I use to erase a page, I'm using the
functions from the boot module of the libc.
thanks for your help,
--
Mr. Santos, Danillo Moura - Computer Science
Student -
UFSC
Home: (48)
91347806 (48) 3382755
Parents Town: (13)
97869780 (13) 32372723