AVRUSBBoot ATMega1281
AVRUSBBoot ATMega1281
Hi there,
I tried to compile the AVRUSBBoot from www.fischl.de for the ATMEga1281. I changed the GICR to MCUCR because the IVCE and the IVSEL Bits are there.
If I copile it with BOOTLOADER_ADDRESS = 0 it seems to work fine (AVRUSBBoot is detected by libusb win32 Devices). If I compile it with BOOTLOADER_ADDRESS = 1f800 and program the corresponding Fuse Bits in the high fuse to 0x9c (1024 words of BootSize and Reset vector to boot area) I get always Unkown Device from my Win2k prof.
At least, I changed the PRG_RDB so that it uses elpm and not lpm and also set RAMPZ to 1.
All ideas are welcome
I tried to compile the AVRUSBBoot from www.fischl.de for the ATMEga1281. I changed the GICR to MCUCR because the IVCE and the IVSEL Bits are there.
If I copile it with BOOTLOADER_ADDRESS = 0 it seems to work fine (AVRUSBBoot is detected by libusb win32 Devices). If I compile it with BOOTLOADER_ADDRESS = 1f800 and program the corresponding Fuse Bits in the high fuse to 0x9c (1024 words of BootSize and Reset vector to boot area) I get always Unkown Device from my Win2k prof.
At least, I changed the PRG_RDB so that it uses elpm and not lpm and also set RAMPZ to 1.
All ideas are welcome
I checked my Hex File and it seems to be ok (Addresses start at 1f800). Also I've made a WinAVR Version of an AVR Assembler Bootloader so I think worked with the BootFuses more than once.
I think the problem reside either round the interrupt shifting or in the access of the VID and PID and strings out of the program aerea which is greater than 0x10000.
I think the problem reside either round the interrupt shifting or in the access of the VID and PID and strings out of the program aerea which is greater than 0x10000.
No, IO checked it and the size was ~ 2000 Byte. But I've another problem. I tried to program a bigger application into my ATMega1281 from ~ 22kByte in Size. Always it runs up to page 48 and while programming the 49th page a "wrong bytecount in writepage: 0 !" appears. Is there any limitation in the USB driver, which could cause this problem?
Thanks in advance and for your information up to know, Ludger
Thanks in advance and for your information up to know, Ludger
Now it works fine I've had a bug in my AVR Firmware. Unfortunately uploding works only for the first 64kByte and I'm not very firm with CPP.
It doesn't matter at least, because I got the ATMega1281 from a collegue and put it on my old STK300 from Kanda only for fun After that I discovered the USBDRV and soldered a USB Tybe-B at PORTD and tried to convert the software from www.fischl.de. I've not often needed more than 64kByte on an AVR and so I'm happy with the state I've reached now.
It doesn't matter at least, because I got the ATMega1281 from a collegue and put it on my old STK300 from Kanda only for fun After that I discovered the USBDRV and soldered a USB Tybe-B at PORTD and tried to convert the software from www.fischl.de. I've not often needed more than 64kByte on an AVR and so I'm happy with the state I've reached now.
You can try USBaspLoader. It requires some changes in the source code because it needs to know the signature bytes of the target chip, but it has an option for >64k flash blocks (although that has not been tested yet). For >64k addressing, you probably have to drop EEPROM support so that it fits into 2k boot sections.
You can mail patches to Thomas Fischl. If he does not respond, please consider adding something to our Wiki at http://avrusb.wikidot.com/, then post a link here in the forum.
Ludger,
Do you got these errors?
If yes please can tell me how to solve it?
Do you tryied to make a AES crypto uploader like Oleg´s code?
Because I need a solution like Oleg´s code but only have troubles to port it to avr-gcc and m128 device.
please, if you have some idea, look here my situation:
http://forums.obdev.at/viewtopic.php?t= ... 6336480218
regards
DrTK
Do you got these errors?
Code: Select all
> "make.exe" all
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega128 -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
usbdrv/usbdrv.c: In function 'usbInit':
usbdrv/usbdrv.c:503: warning: cast from pointer to integer of different size
usbdrv/usbdrv.c:504: warning: cast from pointer to integer of different size
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega128 -x assembler-with-cpp -c usbdrv/usbdrvasm.s -o usbdrv/usbdrvasm.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega128 -c usbdrv/oddebug.c -o usbdrv/oddebug.o
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega128 -c main.c -o main.o
In file included from main.c:25:
c:/winavr-20080610/lib/gcc/../../avr/include/avr/signal.h:36:2: warning: #warning "This header file is obsolete. Use <avr/interrupt.h>."
avr-gcc -Wall -Os -Iusbdrv -I. -mmcu=atmega128 -o main.bin usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o -Wl,--section-start=.text=1e000
rm -f main.hex main.eep.hex
avr-objcopy -j .text -j .data -O ihex main.bin main.hex
./checksize main.bin
process_begin: CreateProcess(NULL, ./checksize main.bin, ...) failed.
make (e=193): Error 193
make.exe: *** [main.hex] Error 193
If yes please can tell me how to solve it?
Do you tryied to make a AES crypto uploader like Oleg´s code?
Because I need a solution like Oleg´s code but only have troubles to port it to avr-gcc and m128 device.
please, if you have some idea, look here my situation:
http://forums.obdev.at/viewtopic.php?t= ... 6336480218
regards
DrTK