How’s it going? Haven’t visited the forums in a while.
I’m planning on getting a Intel Mac this weekend, that way I don’t
have to pester you about endianess questions anymore
I’m trying to build your latest svn but i’m getting this error for xscale.c:
xscale.c: In function 'xscale_deassert_reset':
xscale.c:1631: error: subscripted value is neither array nor pointer
...[same error repeated 4 times]
Seems like the compiler is having fits with the &buffer in the le_to_h_u32() macro. If I tweak the file so that I don’t get the error, this next one pops up: * *image.c: In function image_elf_read_headers image.c:332: error: subscripted value is neither array nor pointer image.c:332: error: subscripted value is neither array nor pointer image.c:355: error: subscripted value is neither array nor pointer image.c:355: error: subscripted value is neither array nor pointer image.c:355: error: subscripted value is neither array nor pointer image.c:355: error: subscripted value is neither array nor pointer image.c:361: error: subscripted value is neither array nor pointer image.c:361: error: subscripted value is neither array nor pointer image.c:361: error: subscripted value is neither array nor pointer image.c:361: error: subscripted value is neither array nor pointer image.c:363: error: subscripted value is neither array nor pointer image.c:363: error: subscripted value is neither array nor pointer image.c:363: error: subscripted value is neither array nor pointer image.c:363: error: subscripted value is neither array nor pointer image.c:364: error: subscripted value is neither array nor pointer image.c:364: error: subscripted value is neither array nor pointer image.c:364: error: subscripted value is neither array nor pointer image.c:364: error: subscripted value is neither array nor pointer image.c:366: error: subscripted value is neither array nor pointer image.c:366: error: subscripted value is neither array nor pointer image.c:366: error: subscripted value is neither array nor pointer image.c:366: error: subscripted value is neither array nor pointer image.c:372: error: subscripted value is neither array nor pointer image.c:372: error: subscripted value is neither array nor pointer image.c:372: error: subscripted value is neither array nor pointer image.c:372: error: subscripted value is neither array nor pointer image.c: In function 'image_elf_read_section': image.c:389: error: subscripted value is neither array nor pointer image.c:389: error: subscripted value is neither array nor pointer image.c:389: error: subscripted value is neither array nor pointer image.c:389: error: subscripted value is neither array nor pointer image.c:392: error: subscripted value is neither array nor pointer image.c:392: error: subscripted value is neither array nor pointer image.c:392: error: subscripted value is neither array nor pointer image.c:392: error: subscripted value is neither array nor pointer image.c:392: error: subscripted value is neither array nor pointer image.c:392: error: subscripted value is neither array nor pointer image.c:392: error: subscripted value is neither array nor pointer image.c:392: error: subscripted value is neither array nor pointer image.c:393: error: subscripted value is neither array nor pointer image.c:393: error: subscripted value is neither array nor pointer image.c:393: error: subscripted value is neither array nor pointer image.c:393: error: subscripted value is neither array nor pointer image.c:396: error: subscripted value is neither array nor pointer image.c:396: error: subscripted value is neither array nor pointer image.c:396: error: subscripted value is neither array nor pointer image.c:396: error: subscripted value is neither array nor pointer image.c:415: error: subscripted value is neither array nor pointer image.c:415: error: subscripted value is neither array nor pointer image.c:415: error: subscripted value is neither array nor pointer image.c:415: error: subscripted value is neither array nor pointer image.c:418: error: subscripted value is neither array nor pointer image.c:418: error: subscripted value is neither array nor pointer image.c:418: error: subscripted value is neither array nor pointer image.c:418: error: subscripted value is neither array nor pointer image.c:418: error: subscripted value is neither array nor pointer image.c:418: error: subscripted value is neither array nor pointer image.c:418: error: subscripted value is neither array nor pointer image.c:418: error: subscripted value is neither array nor pointer make[3]: *** [image.o] Error 1* * for this one, it seems to similar to that as the xscale.c one. I’m using gcc-4.0.1 under MacOS X 10.4.10. luis…
I haven’t been using openocd lately, but I gave it a try on my macppc, the problem is just that the macro isn’t protecting its arguments … here’s a patch that will make it compile correctly (dunno about running correctly ) just add parentheses on those two lines:
I would like to compile OpenOCD for Mac OS X (Intel 10.4.10) and do so for the FTDI drivers. What are the steps that you performed to get the OpenOCD code to compile? My steps are shown below and I’m stuck at a compiler error where the ftd2xx.h file references macros like DWORD but the source doesn’t know what that is.
Thanks,
Darrik
1) Get latest from svn://svn.berlios.de/openocd/trunk
2) autoconf
* Get errors:
configure.in:159: error: possibly undefined macro: AM_CONFIG_HEADER
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.in:160: error: possibly undefined macro: AM_INIT_AUTOMAKE
configure.in:162: error: possibly undefined macro: AM_CONDITIONAL
* Do aclocal first and THEN autoconf
3) aclocal
4) autoconf
5) ./configure --enable-ft2232-ftd2xx --prefix=/usr/bin
* Got error:
configure: error: cannot find install-sh or install.sh
* Do automake -a and try again
6) automake -a
7) ./configure --enable-ft2232-ftd2xx --prefix=/usr/bin
* Got error:
config.status: error: cannot find input file: config.h.in
* Try using autoheader and try again???
8) autoheader
9) ./configure --enable-ft2232-ftd2xx --prefix=/usr/bin
10) make
* Got lots of errors, probably all related to this:
ft2232.c:45:20: error: ftd2xx.h: No such file or directory
* Probably need to also use --with-ftd2xx=/path/to/d2xx/
* Copy D2XX to ~/Code
11) ./configure --prefix=/usr/bin --enable-ft2232-ftd2xx --with-ftd2xx=/path/to/D2XX/bin
* Now it doesn't know what DWORD is in ftd2xx.h!
then from the top level of the source, just ‘make’.
As for the prefix, I have MacPorts installed, and those files live under the /opt directory, so I also put the binary and include files under the /opt/local tree.
Copy D2XX/Samples/ftd2xx.h and D2XX/Samples/WinTypes.h to /usr/local/include
This step may or may not be needed, but here it is anyway. Modify the D2XX/bin/ftd2xx.cfg file’s VID (VID_0403) and PID (PID_6001) as needed for the FTDI JTAG device as needed. If you have the device connected, you can use USB Prober (part of Apple’s developer software installation) to find the VID and PID. For example, the Amontec JTAGkey needs the following:
[VID_0403&PID_CFF8]
Copy the D2XX/bin dynamic library and D2XX/bin/ftd2xx.cfg file to /usr/local/lib (in this example the dynamic library is libftd2xx.0.1.0.dylib)
I did a fresh install of the D2XX dynamic library and OpenOCD on a different machine and I found that the D2XX ftd2xx.cfg file is not necessary for the Amontec JTAGkey. The correct PID info wasn’t need in my Eclipse debug environment which uses Jim Lynch’s Atmel tutorial files to obtain the JTAG device.