[En-Nut-Discussion] Using make burn with Ethernut 3
Harald Kipp
harald.kipp at egnite.de
Wed Jan 25 17:21:57 CET 2006
Hope we are not boring you AVR guys too much with all this
ARM stuff.
Tested on Win32 with Nut/OS prerelease 4.1.3 and Turtelizer firmware
1.2.3. Linux should work too in a similar way.
NOTE, THAT THIS WILL OVERWRITE THE BOOTMON BOOTLOADER.
1. Change the Configurator component under
Tools->GCC Settings->ARM Linker Script
to at91_boot as described at
http://www.ethernut.de/en/hardware/enut3/jtag.html
Rebuild Nut/OS and create a new application tree.
It is a good idea to use different build and sample
tree paths. Copy your application to this sample tree
(I know this is ugly, but it works like this for now).
2. In the source tree add $(ITARG) to the burn
dependencies in app\Makerules.arm-gcc
burn: $(TARG) $(ITARG)
$(BURN) $(BURNFLAGS)
3. Change the BURN and BURNFLAGS entries in app/Makeburn.arm-jom
BURN=jtagomat
BURNFLAGS=-DDEVICE=0x1F0F0F0F -DIMAGE=./$(ITARG) BATCH at91-upl.jom
$(BURNMEMORY)
4. Change to your application directory and type
make clean
make burn
Flashing will take several minutes. It is very slow.
Here's a sample log for app/ftpd/ftpserv.bin:
============================= SNIP ====================================
$ make clean
rm -f ftpserv.o
rm -f ftpserv.hex
rm -f ftpserv.eep
rm -f ftpserv.obj
rm -f ftpserv.map
rm -f ftpserv.lst
rm -f ftpserv.bak
$ make burn
arm-elf-gcc -c -mcpu=arm7tdmi -O0 -mthumb-interwork -fomit-frame-pointer
-Wall -Wstrict-prototypes -fverbose-asm -Wa,-ahlms=ftpserv.lst -DETHERNUT3
-I../../nutbld-30d-boot/include -I../../nut/include ftpserv.c -o ftpserv.o
arm-elf-gcc ftpserv.o -mcpu=arm7tdmi -nostartfiles
-T../../nut/arch/arm/ldscripts/at91_boot.ld -Wl,-Map=ftpserv.map,--cref,
--no-warn-mismatch -L../../nutbld-30d-boot/lib
../../nutbld-30d-boot/lib/nutinit.o
-lnutpro -lnutfs -lnutarch -lnutnet -lnutos -lnutdev -lnutarch -lnutcrt
-o ftpserv.elf
arm-elf-objcopy -O ihex ftpserv.elf ftpserv.hex
arm-elf-objcopy -O binary ftpserv.elf ftpserv.bin
jtagomat -DDEVICE=0x1F0F0F0F -DIMAGE=./ftpserv.bin BATCH at91-upl.jom FLASH
Reset OK, uploading flasher...
Upload OK, starting flasher...
Flasher running and flashing ./ftpserv.bin
./ftpserv.bin flashed, resetting target
rm ftpserv.elf
============================= SNAP ====================================
The flasher will additionally produce the following output at 115200 Baud
on the Ethernut 3 RS232
============================= SNIP ====================================
Ethernut 3 BaseFlasher 0.0.8
ID(10000000)=001F00C8
ES(10000000 at 10000000)=00000000
ES(10000000 at 10002000)=00000000
ES(10000000 at 10004000)=00000000
ES(10000000 at 10006000)=00000000
ES(10000000 at 10008000)=00000000
ES(10000000 at 1000A000)=00000000
ES(10000000 at 1000C000)=00000000
ES(10000000 at 1000E000)=00000000
PD(10000000 at 10000000,0001E780)=00000000
============================= SNAP ====================================
Finally the FTP Server will appear (MMC inserted)
============================= SNIP ====================================
FTP Server Sample - Nut/OS 4.1.3.1 pre - GNUARM
Configure eth0...No DHCP...hard coded gate...OK
IP Addr: 192.168.192.35
IP Mask: 255.255.255.0
IP Gate: 192.168.192.1
Date: 25.01.2006
Time: 17:14:00
Register file system...OK
Register block device...OK
Mounting partition...OK
Register FTP root...OK
Waiting for an FTP client...
Waiting for an FTP client...
Waiting for an FTP client...
============================= SNAP ====================================
Flashing sometimes fails. Just try 'make burn' once again.
Please let me know if it fails on your side, my system is contaminated
with paths to all variants of Ethernut tools and settings.
Harald
More information about the En-Nut-Discussion
mailing list