I've tried but I don't think it's working because when I run the following at the command prompt:
make clean
make mega2560
I get a "stk500boot_v2_mega2560.hex" file, but it does not match the original hex file.
I create a hexfile with 29,384 bytes, and the original hex file is 22,989 bytes.
The make process does output some warnings but I'm not sure where my problem is because I'm expecting that it should create the same hex file but they are not even close. My hex file is larger, and if you look at the hex file the first few lines of hex code don't match.
Anyone have any ideas? I haven't changed anything in the source files.
The following is the output from the make process:
- Code: Select all
>make mega2560
-------- begin --------
avr-gcc (WinAVR 20081205) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or banned FOR A PARTICULAR PURPOSE.
Compiling: stk500boot.c
avr-gcc -c -mmcu=atmega2560 -I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-cha
r -funsigned-bitfields -fpack-struct -fshort-enums -mno-tablejump -Wall -Wstric
t-prototypes -Wa,-adhlns=stk500boot.lst -std=gnu99 -D_MEGA_BOARD_ -MD -MP -MF .
dep/stk500boot.o.d stk500boot.c -o stk500boot.o
stk500boot.c: In function 'PrintFromPROGMEM':
stk500boot.c:1145: warning: cast from pointer to integer of different size
stk500boot.c: In function 'DumpHex':
stk500boot.c:1395: warning: cast to pointer from integer of different size
stk500boot.c: In function 'EEPROMtest':
stk500boot.c:1438: warning: cast from pointer to integer of different size
stk500boot.c:1459: warning: cast from pointer to integer of different size
In file included from stk500boot.c:1490:
avrinterruptnames.h: At top level:
avrinterruptnames.h:312: warning: ignoring #pragma mark __AVR_ATmega169__
avrinterruptnames.h:351: warning: ignoring #pragma mark __AVR_ATmega640__
stk500boot.c: In function 'VectorDisplay':
stk500boot.c:1599: warning: cast from pointer to integer of different size
stk500boot.c:1600: warning: cast to pointer from integer of different size
Linking: stk500boot.elf
avr-gcc -mmcu=atmega2560 -I. -gdwarf-2 -DF_CPU=16000000UL -Os -funsigned-char -
funsigned-bitfields -fpack-struct -fshort-enums -mno-tablejump -Wall -Wstrict-p
rototypes -Wa,-adhlns=stk500boot.o -std=gnu99 -D_MEGA_BOARD_ -MD -MP -MF .dep/s
tk500boot.elf.d stk500boot.o --output stk500boot.elf -Wl,-Map=stk500boot.map,--c
ref -lm -Wl,--section-start=.text=3E000
Creating load file for Flash: stk500boot.hex
avr-objcopy -O ihex -R .eeprom stk500boot.elf stk500boot.hex
Creating load file for EEPROM: stk500boot.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex stk500boot.elf stk500boot.eep
e:\Arduino\arduino-1.0-windows\arduino-1.0\hardware\tools\avr\bin\avr-objcopy.ex
e: --change-section-lma .eeprom=0x00000000 never used
Creating Extended Listing: stk500boot.lss
avr-objdump -h -S stk500boot.elf > stk500boot.lss
Creating Symbol Table: stk500boot.sym
avr-nm -n stk500boot.elf > stk500boot.sym
Size after:
AVR Memory Usage
----------------
Device: atmega2560
Program: 10420 bytes (4.0% Full)
(.text + .data + .bootloader)
Data: 12 bytes (0.1% Full)
(.data + .bss + .noinit)
-------- end --------
mv stk500boot.hex stk500boot_v2_mega2560.hex

