|
发表于 2008-1-24 11:10:58
|
显示全部楼层
无法写BOOT 到1C00区,写到0000,BOOTLOADER程序显示下载成功,修改HEX文件将BOOT程序放到1C00写入,BOOTLOADER无法下栽
配置
mega88,bootblock 512words
#ifndef F_CPU
#define F_CPU 12000000UL
#endif
#define BAUDRATE 19200
#define BootStart 0x1C00
avr-gcc.exe -mmcu=atmega88 -Wl,-Map=mega88boot.map -Wl,-section-start==0x1c00 bootldr.o -o mega88boot.elf
avr-objcopy -O ihex -R .eeprom mega88boot.elf mega88boot.hex
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O ihex mega88boot.elf mega88boot.eep || exit 0
avr-objdump -h -S mega88boot.elf > mega88boot.lss
AVR Memory Usage
----------------
Device: atmega88
Program: 828 bytes (10.1% Full)
(.text + .data + .bootloader)
Data: 136 bytes (13.3% Full)
(.data + .bss + .noinit) |
|