Forum: PC-Programmierung avarrice über USB, kann keine Verbindung aufbauen


von jtag beginner (Gast)


Lesenswert?

Hallo,

ich versuche gerade verzweifelt das debuggen eines Avr MEGA128 mit
GDB über cygwin zum laufen zu bekommen.

Mein JTAG Interface ist ein MK1 clone mit USB interface
(http://www.gadgetpool.de/bestellen/catalog/product_info.php/products_id/52), 
unter AVRStudio funktioniert das debuggen damit ohne Probleme.


Mit avarice konnte ich aber bisher keine verbindung herstellen:

C:\cygwin\usr\local\bin>avarice -1 --jtag usb :4242
AVaRICE version 2.10, Sep  6 2009 01:03:37

Defaulting JTAG bitrate to 250 kHz.

did not find any USB device "usb"
USB device not found


zum testen der USB Treiber habe ich testlibusb-win.exe aufgerufen,
das sieht für michj i.O. aus:

DLL version:  0.1.12.2
Driver version:  0.1.12.2

bus/device  idVendor/idProduct
bus-0/\\.\libusb0-0001--0x0403-0x6001     0403/6001
- Manufacturer : FTDI
- Product      : FT232R USB UART
- Serial Number: A50025Sq
  wTotalLength:         32
  bNumInterfaces:       1
  bConfigurationValue:  1
  iConfiguration:       0
  bmAttributes:         a0h
  MaxPower:             45
    bInterfaceNumber:   0
    bAlternateSetting:  0
    bNumEndpoints:      2
    bInterfaceClass:    255
    bInterfaceSubClass: 255
    bInterfaceProtocol: 255
    iInterface:         2
      bEndpointAddress: 81h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0
      bEndpointAddress: 02h
      bmAttributes:     02h
      wMaxPacketSize:   64
      bInterval:        0
      bRefresh:         0
      bSynchAddress:    0


hat jemand eine Idee was ich falsch mache, oder vergessen haben könnte?

von jtag beginner (Gast)


Lesenswert?

Jetzt hat es doch noch funktioniert: Die Verbindung wird über einen USB 
serial Port Windows Treiber hergestellt. Folglich läuft der USB Zugriff 
für das Programm transparent, als sei es ein RS232 Zugriff. ComX als 
Gerät anzugeben funktioniert offensichtlich mit cygwin nicht, 
"/dev/comX" tut's aber:

avarice --program --file main.elf --part atmega128 --jtag /dev/com4
AVaRICE version 2.9, Mar  6 2009 08:16:00

Defaulting JTAG bitrate to 250 kHz.

JTAG config starting.
Hardware Version: 0xc1
Software Version: 0x80
Reported JTAG device ID: 0x9702
Configured for device ID: 0x9702 atmega128 -- Matched with atmega128
JTAG config complete.
WARNING: The default behaviour has changed.
Programming no longer erases by default. If you want to erase and 
program
in a single step, use the --erase in addition to --program. The reason 
for
this change is to allow programming multiple sections (e.g. application 
and
bootloader) in multiple passes.

Downloading FLASH image to target............

Download complete.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.