[En-Nut-Discussion] Bootloader

Harald Kipp harald.kipp at egnite.de
Thu Nov 13 14:55:05 CET 2008


Florian Zablowsky wrote:

> Now I have another problem:
> As I tried to compile the bootloader, I get an errormessage from the
> Compiler (WinAVR-20080610).
> To avoid this, I installed an older version of WinAVR (20040720), but now
> the hexfile does not fit into the flash (without any sourcecode changes).

If the boot loader exceeds 4k, you can still extend the boot sector to 
8k. Change

   ENTRY = 0x1F000

in the Makefile

   ENTRY = 0x1E000

And adjust the fuses accordingly

http://www.ethernut.de/en/isp/fuses.html

No problems with the compiler here, just warnings:

C:\ethernut-4.7\nut\boot\appload>make
avr-gcc -x assembler-with-cpp -c -Wa,-gstabs,-ahlms=start.lst 
-mmcu=atmega128 -I. start.S -o start.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes 
-Wa,-ahlms=appload.lst -DEE_CONFNET=64 -I. appload.c -o appload.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes 
-Wa,-ahlms=config.lst -DEE_CONFNET=64 -I. config.c -o config.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes 
-Wa,-ahlms=dhcp.lst -DEE_CONFNET=64 -I. dhcp.c -o dhcp.o
dhcp.c: In function 'DhcpQuery':
dhcp.c:291: warning: pointer targets in assignment differ in signedness
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes 
-Wa,-ahlms=tftp.lst -DEE_CONFNET=64 -I. tftp.c -o tftp.o
tftp.c: In function 'TftpRecv':
tftp.c:130: warning: pointer targets in assignment differ in signedness
tftp.c:133: warning: pointer targets in assignment differ in signedness
tftp.c:139: warning: pointer targets in passing argument 2 of 'memcpy_' 
differ in signedness
tftp.c:200: warning: pointer targets in passing argument 2 of 
'FlashPage' differ in signedness
tftp.c:202: warning: pointer targets in passing argument 2 of 
'FlashPage' differ in signedness
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes 
-Wa,-ahlms=udp.lst -DEE_CONFNET=64 -I. udp.c -o udp.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes 
-Wa,-ahlms=ip.lst -DEE_CONFNET=64 -I. ip.c -o ip.o
ip.c: In function 'IpOutput':
ip.c:225: warning: passing argument 1 of 'IpChkSum' from incompatible 
pointer type
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes 
-Wa,-ahlms=arp.lst -DEE_CONFNET=64 -I. arp.c -o arp.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes 
-Wa,-ahlms=ether.lst -DEE_CONFNET=64 -I. ether.c -o ether.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes 
-Wa,-ahlms=debug.lst -DEE_CONFNET=64 -I. debug.c -o debug.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes 
-Wa,-ahlms=utils.lst -DEE_CONFNET=64 -I. utils.c -o utils.o
avr-gcc start.o appload.o config.o dhcp.o tftp.o udp.o ip.o arp.o 
ether.o debug.o utils.o -mmcu=atmega128 -Wl,-Map=appload.map,--cre
f,--defsym,__stack=0x10FF -nostartfiles -nodefaultlibs -Ttext=0x1F000 -o 
appload.elf
avr-objcopy -O ihex appload.elf appload.hex
avr-objcopy -O binary appload.elf appload.bin
rm appload.elf

C:\ethernut-4.7\nut\boot\appload>avr-gcc --version
avr-gcc (WinAVR 20080610) 4.3.0
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 FITNESS FOR A PARTICULAR PURPOSE.




More information about the En-Nut-Discussion mailing list