FTDI (FTD2232H) über I2C ansteuern.

Gast #5895062
Lesenswert?

Hallo,

ich versuche das Sample Programm von

https://www.ftdichip.com/Support/SoftwareExamples/MPSSE.htm  --> 
Abschnitt: USB to I2C

über mingw zum laufen zu kriegen. Ich vefolge die Anleitung, die in dem 
Zip-File enthalten ist.

Wenn ich nun die b.bat Datei ausführe und ich die sample-dynamic.exe 
ausführe, sagt mit das System folgendes.

Failed loading libMPSSE.dll. Please check if the file exists in the 
working directory
sample-dynamic.c:255:main(): NULL expression            encountered

Es ist mingw 4.5.x installiert und die D2XXX Treiber sind auch 
installiert.


Ich hoffe ihr könnt mir helfen.

Viele Grüße
Toni

PS: Im Anhang habe ich
Angehängte Dateien:
Gast #5895916
Lesenswert?

Ja die libMPSSE.dll befindet sich in der working directory. Die b.bat 
kopiert sämtliche files in den Ordner I2C (Working directory) und baut 
dort auch die .exe (sample-dynamic.exe und/oder sample-static.exe)
Persönliche Seite #5896003
Lesenswert?

Ändere folgenden Code
1
#ifdef _WIN32
2
  #ifdef _MSC_VER
3
    h_libMPSSE = LoadLibrary(L"libMPSSE.dll");
4
  #else
5
    h_libMPSSE = LoadLibrary("libMPSSE.dll");
6
  #endif
7
  if(NULL == h_libMPSSE)
8
  {
9
    printf("Failed loading libMPSSE.dll. Please check if the file exists in\
10
 the working directory\n");
11
  }

hierin die printf-Anweisung wie folgt:
1
  printf("Failed loading libMPSSE.dll. Please check if the file exists in\
2
 the working directory (%d)\n", GetLastError());

Interessant ist hier der Fehlercode.

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren