mibo
July 21, 2009, 7:44pm
1
Hi experts,
I’m using Opensuse 64Bit Linux, have libftd2xx installed and want to use openOCD with an Olimex ARM-USB-TINY and an Olimex SAM9 board.
I downloaded and unpacked the 0.2.0.tar.gz package.
./configure --enable-ft2232_ftd2xx --with-ftd2xx-linux-tardir=/home/michael/downloads/libftd2xx0.4.16_x86_64
In the end the linker complains
What is the problem here?
Cheers,
Michael
gcc -std=gnu99 -g -O2 -I/home/michael/downloads/libftd2xx0.4.16_x86_64 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -o openocd main.o /home/michael/downloads/libftd2xx0.4.16_x86_64/static_lib/libftd2xx.a.0.4.16 ./.libs/libopenocd.a -ldl -lpthread
./.libs/libopenocd.a(ft2232.o): In function `ft2232_quit':
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:2773: undefined reference to `FT_Close'
./.libs/libopenocd.a(ft2232.o): In function `ft2232_write':
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:347: undefined reference to `FT_Write'
./.libs/libopenocd.a(ft2232.o): In function `ft2232_init_ftd2xx':
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:1809: undefined reference to `FT_SetVIDPID'
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:1839: undefined reference to `FT_OpenEx'
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:1903: undefined reference to `FT_SetLatencyTimer'
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:1909: undefined reference to `FT_GetLatencyTimer'
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:1919: undefined reference to `FT_SetTimeouts'
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:1925: undefined reference to `FT_SetBitMode'
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:1931: undefined reference to `FT_GetDeviceInfo'
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:1871: undefined reference to `FT_ListDevices'
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:1882: undefined reference to `FT_ListDevices'
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:1847: undefined reference to `FT_OpenEx'
./.libs/libopenocd.a(ft2232.o): In function `ft2232_purge_ftd2xx':
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:1960: undefined reference to `FT_Purge'
./.libs/libopenocd.a(ft2232.o): In function `ft2232_read':
/home/michael/downloads/openocd-0.2.0/src/jtag/ft2232.c:385: undefined reference to `FT_Read'
collect2: ld returned 1 exit status
make[3]: *** [openocd] Fehler 1
make[3]: Leaving directory `/home/michael/downloads/openocd-0.2.0/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/michael/downloads/openocd-0.2.0/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/michael/downloads/openocd-0.2.0'
make: *** [all] Fehler 2
mibo
July 22, 2009, 2:30pm
2
I downloaded the current svn trunk (Revision 2555) and got the same error.
libtool: link: gcc -std=gnu99 -g -O2 -I/home/michael/downloads/libftd2xx0.4.16_x86_64 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -o openocd main.o /home/michael/downloads/libftd2xx0.4.16_x86_64/static_lib/libftd2xx.a.0.4.16 ./.libs/libopenocd.a -ldl -lpthread
./.libs/libopenocd.a(ft2232.o): In function `ft2232_quit':
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:2773: undefined reference to `FT_Close'
./.libs/libopenocd.a(ft2232.o): In function `ft2232_write':
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:347: undefined reference to `FT_Write'
./.libs/libopenocd.a(ft2232.o): In function `ft2232_init_ftd2xx':
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:1809: undefined reference to `FT_SetVIDPID'
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:1839: undefined reference to `FT_OpenEx'
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:1903: undefined reference to `FT_SetLatencyTimer'
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:1909: undefined reference to `FT_GetLatencyTimer'
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:1919: undefined reference to `FT_SetTimeouts'
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:1925: undefined reference to `FT_SetBitMode'
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:1931: undefined reference to `FT_GetDeviceInfo'
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:1871: undefined reference to `FT_ListDevices'
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:1882: undefined reference to `FT_ListDevices'
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:1847: undefined reference to `FT_OpenEx'
./.libs/libopenocd.a(ft2232.o): In function `ft2232_purge_ftd2xx':
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:1960: undefined reference to `FT_Purge'
./.libs/libopenocd.a(ft2232.o): In function `ft2232_read':
/home/michael/coding/openocd/trunk/src/jtag/ft2232.c:385: undefined reference to `FT_Read'
collect2: ld returned 1 exit status
make[3]: *** [openocd] Fehler 1
make[3]: Leaving directory `/home/michael/coding/openocd/trunk/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/michael/coding/openocd/trunk/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/michael/coding/openocd/trunk'
make: *** [all] Fehler 2
mibo
July 22, 2009, 4:07pm
3
I switched back to openOCD 0.2.0 and copied the ftd2xx.h and WinTypes.h of the closed source driver to /usr/local/include/
Then
./configure --enable-ft2232_ftd2xx
make
su
make install
running as root:
openocd -f olimex-jtag-tiny.cfg -f at91sam9260_ext_RAM_ext_flash.cfg
Open On-Chip Debugger 0.2.0 (2009-07-22-17:19) Release
$URL: http://svn.berlios.de/svnroot/repos/openocd/tags/openocd-0.2.0/src/openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
4 kHz
jtag_nsrst_delay: 200
jtag_ntrst_delay: 200
TapName | Enabled | IdCode Expected IrLen IrCap IrMask Instr
---|--------------------|---------|------------|------------|------|------|------|---------
0 | at91sam9260.cpu | Y | 0x00000000 | 0x0792603f | 0x04 | 0x01 | 0x0f | 0x0f
Info : device: 4
Info : deviceID: 364511236
Info : SerialNumber:
Info : Description: Olimex OpenOCD JTAG TINY A
Info : JTAG tap: at91sam9260.cpu tap/device found: 0x0792603f (mfg: 0x01f, part: 0x7926, ver: 0x0)
Info : JTAG Tap/device matched
To me that looks quite good now
Next, I have to figure out how to run openOCD as user, if the cfg-files have to be changed for my Olimex SAM9-L9260 board and how to get the openOCD control to eclipse (program code upload and debugging)
Cheers.