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

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

[avr-gcc-list] Writing to flash memory from bootloader


From: Ganeriwal Saurabh
Subject: [avr-gcc-list] Writing to flash memory from bootloader
Date: Mon, 8 Mar 2004 00:19:54 -0800 (PST)

hi,

I have been trying to get the APIs provided in boot.h working on atmega128
but without any success. I use the boot_test function defined in boot.h. I
have added the following things to it.

1. Define the function to lie in .bootloader section
void boot_test(void) BOOTLOADER_SECTION;

2. Define the starting point of the bootloader section to be 0xF000 in
makefile.
LDFLAGS = atmega128 -Wl,--section-start=.bootloader=0xF000

3. I write at the address 0x1C000UL and then i read it using
#define ADDRESS_CHECK 0xE000UL
pgm_read_byte(ADDRESS_CHECK)
I did this because pgm_read_byte takes word address whereas boot.h APIs
take byte address. (I have alse tried with ADDRESS_CHECK equal to
0x1C000UL).

4. All the boot lock bits are set to 1. Checked it through uisp.

I would appreciate any help.

thanks,
saurabh

_______________________________________________
avr-gcc-list mailing list
address@hidden
http://www.avr1.org/mailman/listinfo/avr-gcc-list


reply via email to

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