looks like OSX lacks the strndup() function. FreeBSD has the same problem, and there’s already a fix in gdb_server.c:34. If you know what preprocessor symbol may be used to identify an OSX build (like FreeBSD), just add it to the #ifdef statement, and send me a patch after you’ve built the OpenOCD on OSX.
You’ll also have to check what possibilites exist to access the parallel port hardware on OSX. On FreeBSD, the outb macro had its parameters switched, and the ioperm() function is called i386_set_ioperm().
As far as I know, there is no FTDI driver available on OSX, so you wont be able to use a USB device, although it might be possible to port the libftdi to use it on OSX (which is still slower than the ftd2xx driver).
Thanks for getting back to me on this. I think I’ll give it a miss for now as I have a pc I can use too (I just use this machine more often). I may revisit it however so it is good to know what direction I should look at.
Dominic:
looks like OSX lacks the strndup() function. FreeBSD has the same problem, and there’s already a fix in gdb_server.c:34. If you know what preprocessor symbol may be used to identify an OSX build (like FreeBSD), just add it to the #ifdef statement, and send me a patch after you’ve built the OpenOCD on OSX.
Since you're using gnu configure, it should be easy to test for the existence of strndup() at configure time and define a macro or include a replacement implementation --- this is the kind of thing that autoconf is really good at. I could code up the changes to autoconf, and send you a patch, if you want.
If you don’t want to, you can probably use the APPLE symbol which is #defined on OSX.