#20597 - Ingy - Thu May 13, 2004 4:04 pm
I have a Flash2Advance USB link cable and I'm having a lot of trouble getting it to work with Linux 2.6. With kernel 2.4 I used software called if2a (http://deyv.free.fr/gba/f2a/) which worked by using the ezusb2131 drivers(http://ezusb2131.sourceforge.net/).
However, the ezusb2131 drivers won't compile properly under kernel 2.6 and the guy who wrote them believes that they are now unnecessary - their functionality is apparently replaced by fxload, which I've been playing about with a bit.
This is the result of trying to load the f2afirm.hex file on to the chip directly:
So I try again, using the firmware provided with fxload as a second-stage loader, which apparently allows me to write to external RAM or EEPROM:
And that seems to work fine. However, the device soon disappears from /proc/bus/usb/003/, and dmesg gives me this output:
And I can't access the device again without disconnecting and reconnecting it, presumably wiping the firmware. Now I'm not sure whether those "control timeout on ep0in" messages are down to a problem with the 2.6 usb subsystem, or (more likely, perhaps) because I'm largely unsure as to what I should be doing. Does anyone have experience of this / any ideas as to what I should try next?
However, the ezusb2131 drivers won't compile properly under kernel 2.6 and the guy who wrote them believes that they are now unnecessary - their functionality is apparently replaced by fxload, which I've been playing about with a bit.
This is the result of trying to load the f2afirm.hex file on to the chip directly:
Code: |
ashgrove:/home/ingy/gba/if2a-0.3a# fxload -D /proc/bus/usb/003/019 -I f2afirm.hex -vv
microcontroller type: fx single stage: load on-chip memory open RAM hexfile image f2afirm.hex stop CPU write on-chip, addr 0x0000 len 1008 (0x03f0) write on-chip, addr 0x03f0 len 1008 (0x03f0) write on-chip, addr 0x07e0 len 1008 (0x03f0) write on-chip, addr 0x0bd0 len 1008 (0x03f0) write on-chip, addr 0x0fc0 len 1008 (0x03f0) write on-chip, addr 0x13b0 len 1008 (0x03f0) can't write 1008 bytes external memory at 0x17a0 unable to download f2afirm.hex |
So I try again, using the firmware provided with fxload as a second-stage loader, which apparently allows me to write to external RAM or EEPROM:
Code: |
ashgrove:/home/ingy/gba/if2a-0.3a# fxload -D /proc/bus/usb/003/019 -s /usr/share/usb/a3load.hex -I f2afirm.hex -vv
microcontroller type: fx 1st stage: load 2nd stage loader open RAM hexfile image /usr/share/usb/a3load.hex stop CPU write on-chip, addr 0x0357 len 23 (0x0017) write on-chip, addr 0x01b5 len 297 (0x0129) write on-chip, addr 0x0080 len 309 (0x0135) write on-chip, addr 0x02de len 71 (0x0047) write on-chip, addr 0x0003 len 3 (0x0003) write on-chip, addr 0x0325 len 50 (0x0032) write on-chip, addr 0x0043 len 3 (0x0003) write on-chip, addr 0x0400 len 4 (0x0004) write on-chip, addr 0x0000 len 3 (0x0003) EOF on hexfile write on-chip, addr 0x036e len 12 (0x000c) ... WROTE: 775 bytes, 10 segments, avg 77 reset CPU open RAM hexfile image f2afirm.hex 2nd stage: write external memory SKIP on-chip RAM, 1008 bytes at 0x0000 SKIP on-chip RAM, 1008 bytes at 0x03f0 SKIP on-chip RAM, 1008 bytes at 0x07e0 SKIP on-chip RAM, 1008 bytes at 0x0bd0 SKIP on-chip RAM, 1008 bytes at 0x0fc0 SKIP on-chip RAM, 1008 bytes at 0x13b0 write external, addr 0x17a0 len 1008 (0x03f0) write external, addr 0x1b90 len 1008 (0x03f0) EOF on hexfile write external, addr 0x1f80 len 128 (0x0080) stop CPU 2nd stage: write on-chip memory write on-chip, addr 0x0000 len 1008 (0x03f0) write on-chip, addr 0x03f0 len 1008 (0x03f0) write on-chip, addr 0x07e0 len 1008 (0x03f0) write on-chip, addr 0x0bd0 len 1008 (0x03f0) write on-chip, addr 0x0fc0 len 1008 (0x03f0) write on-chip, addr 0x13b0 len 1008 (0x03f0) SKIP external RAM, 1008 bytes at 0x17a0 SKIP external RAM, 1008 bytes at 0x1b90 EOF on hexfile SKIP external RAM, 128 bytes at 0x1f80 ... WROTE: 8192 bytes, 9 segments, avg 910 reset CPU |
And that seems to work fine. However, the device soon disappears from /proc/bus/usb/003/, and dmesg gives me this output:
Code: |
usb 3-1: USB disconnect, address 19
usb 3-1: new full speed USB device using address 20 usb 3-1: control timeout on ep0in usb 3-1: device not accepting address 20, error -110 usb 3-1: new full speed USB device using address 21 usb 3-1: control timeout on ep0in usb 3-1: device not accepting address 21, error -110 |
And I can't access the device again without disconnecting and reconnecting it, presumably wiping the firmware. Now I'm not sure whether those "control timeout on ep0in" messages are down to a problem with the 2.6 usb subsystem, or (more likely, perhaps) because I'm largely unsure as to what I should be doing. Does anyone have experience of this / any ideas as to what I should try next?