[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Can't debug bootloader in avrstudio (Vasil Atanasov) co
From: |
Vasil Atanasov |
Subject: |
[avr-gcc-list] Can't debug bootloader in avrstudio (Vasil Atanasov) continue |
Date: |
Tue, 2 Dec 2003 16:53:04 +0200 |
Hello,
I will send all info about my problem
here is a simple program named boot2.c:
#include <avr/io.h>
void bootloader(void) __attribute__ ((section (".bootldr")));
int main(void){
bootloader();
return 0;
}
void bootloader(void)
{
PORTA=0xaa;
}
my makefile do:
Compiling: boot2.c
avr-gcc -c -mmcu=atmega128 -I. -g -O0 -funsigned-char -funsigned-bitfields
-fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=boot2.lst
-std=gnu99 boot2.c -o boot2.o
Linking: boot2.elf
avr-gcc -mmcu=atmega128 -I. -g -O0 -funsigned-char -funsigned-bitfields
-fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=boot2.o
-std=gnu99 boot2.o --output boot2.elf -Wl,-Map=boot2.map,--cref
-Wl,--section-start=.bootldr=0x1E000 -lm
Creating load file for Flash: boot2.hex
avr-objcopy -O ihex -R .eeprom boot2.elf boot2.hex
Creating load file for EEPROM: boot2.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex boot2.elf boot2.eep
Creating Extended Listing: boot2.lss
avr-objdump -h -S boot2.elf > boot2.lss
Creating Symbol Table: boot2.sym
avr-nm -n boot2.elf > boot2.sym
after that I start make extcoff
Compiling: boot2.c
avr-gcc -c -mmcu=atmega128 -I. -g -O0 -funsigned-char -funsigned-bitfields
-fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=boot2.lst
-std=gnu99 boot2.c -o boot2.o
Linking: boot2.elf
avr-gcc -mmcu=atmega128 -I. -g -O0 -funsigned-char -funsigned-bitfields
-fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=boot2.o
-std=gnu99 boot2.o --output boot2.elf -Wl,-Map=boot2.map,--cref
-Wl,--section-start=.bootldr=0x1E000 -lm
Converting to AVR Extended COFF: boot2.cof
avr-objcopy --debugging --change-section-address .data-0x800000
--change-section-address .bss-0x800000 --change-section-address
.noinit-0x800000 --change-section-address .eeprom-0x810000 -O coff-ext-avr
boot2.elf boot2.cof
Discarding local symbol outside any compilation unit: .__do_copy_data_start
Discarding local symbol outside any compilation unit: .__do_copy_data_loop
make.exe: *** Warning: Clock skew detected. Your build may be incomplete.
If i load boot2.hex then all code is ok, but in boot2.cof file on address F000
is 0xffff
Thank you in advance
Vasil
- [avr-gcc-list] Can't debug bootloader in avrstudio (Vasil Atanasov) continue,
Vasil Atanasov <=