[En-Nut-Discussion] Appload Bootloader
Harald Kipp
harald.kipp at egnite.de
Wed Nov 22 16:21:01 CET 2006
Jason,
With debugging enabled, the bootloader will not fit in 4kB.
You need to modify ENTRY in Makedefs as well and let the
bootloader occupy 8kB.
ENTRY = 0x1E000
In case you enabled the boot reset vector fuse, make sure
to adapt this as well (4k words).
Here's the make output without NUTDEBUG
----
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
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes
-Wa,-ahlms=tftp.lst -DEE_CONFNET=64 -I. tftp.c -o tftp.o
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
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,--cref,--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
----
And this is with NUTDEBUG enabled:
----
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 -DNUTDEBUG -I. appload.c -o appload.
o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes
-Wa,-ahlms=config.lst -DEE_CONFNET=64 -DNUTDEBUG -I. config.c -o config.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes
-Wa,-ahlms=dhcp.lst -DEE_CONFNET=64 -DNUTDEBUG -I. dhcp.c -o dhcp.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes
-Wa,-ahlms=tftp.lst -DEE_CONFNET=64 -DNUTDEBUG -I. tftp.c -o tftp.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes -Wa,-ahlms=udp.lst
-DEE_CONFNET=64 -DNUTDEBUG -I. udp.c -o udp.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes -Wa,-ahlms=ip.lst
-DEE_CONFNET=64 -DNUTDEBUG -I. ip.c -o ip.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes -Wa,-ahlms=arp.lst
-DEE_CONFNET=64 -DNUTDEBUG -I. arp.c -o arp.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes
-Wa,-ahlms=ether.lst -DEE_CONFNET=64 -DNUTDEBUG -I. ether.c -o ether.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes
-Wa,-ahlms=debug.lst -DEE_CONFNET=64 -DNUTDEBUG -I. debug.c -o debug.o
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes
-Wa,-ahlms=utils.lst -DEE_CONFNET=64 -DNUTDEBUG -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,--cref,--defsym,__stack=0x10FF -nostartfiles
-nodefaultlibs -Ttext=0x1E000 -o appload.elf
avr-objcopy -O ihex appload.elf appload.hex
avr-objcopy -O binary appload.elf appload.bin
rm appload.elf
----
Note, that the linker option -T changed due to the modified ENTRY.
Harald
P.S. I removed the compiler warning in function `IpChkSum'. You can
ignore it.
At 17:43 20.11.2006 -0500, you wrote:
>Hello everyone,
>
>I'm attempting to modify the Appload 1.1.1 project on my Ethernut 2.1 to
>have slightly different behavior, but up to this point, I've been unable to
>compile the code with the NUTDEBUG define uncommented in the Makedefs file.
>How does one enable the NUTDEBUG options? I would simply use a different
>method, but I have to live under the boot loader space requirement, thus the
>UART0 approach may be my only option.
>
>Thanks,
>
>Jason Walton
More information about the En-Nut-Discussion
mailing list