A quick google for "openocd gpio" finds
http://comments.gmane.org/gmane.comp.debugging.openocd.devel/13728 and
http://www.omnima.co.uk/forums/index.php?showtopic=96
And I guess you may find
http://groups.google.com/group/bifferboard/browse_thread/thread/7c4835cb1773b5d4
useful too :)
Lurch
Done a bit of investigation in Qemu, and it looks like the reason it
compiles but doesn't run on the bifferboard, is that it gets compiled
as:
/usr/bin/openocd: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
for GNU/Linux 2.6.15, dynamically linked (uses shared libs), corrupted
section header size
i.e. it's being compiled using the native-toolchain rather than the
32-bit cross-toolchain.
I dunno OpenWRT well enough to suggest a fix...
Lurch
I managed to get a bit further... (maybe you've already done the same)
I updated openocd/Makefile with that, and got a bash error about
\302\240 - a google search turns up that this is a non-breaking space,
which my browser must have helpfully inserted when I cut'n'pasted. So
I manully deleted and re-inserted all the spaces in that line which
fixed it.
And then I got the same siglist error as you and was able to fix it by
editing jimtcl/jimautoconf.h and changing
#define HAVE_SYS_SIGLIST 1
to
#undef HAVE_SYS_SIGLIST
(however this file is autogenerated, so I think to fix it properly
you'd need to get jimctl/autosetup run using the cross-toolchain. For
now you can just edit sys_siglist out of jimtcl/auto.def )
So the compilation got a bit further and it gave errors about
variables declared inside for-loop initialisers, so I added -std=c99
to the CFLAGS in your Build/Compile line above.
So the compilation got a bit further and it gave errors about
isascii() - I found this in uClibc's ctype.h and it's declared as:
#if (defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN) && \
defined __UCLIBC_SUSV4_LEGACY__
/* Return nonzero iff C is in the ASCII set
(i.e., is no more than 7 bits wide). */
extern int isascii(int __c) __THROW;
libc_hidden_proto(isascii)
/* Return the part of C that is in the ASCII set
(i.e., the low-order 7 bits of C). */
extern int toascii(int __c) __THROW;
#endif
So I added "-D__USE_MISC -D__UCLIBC_SUSV4_LEGACY__" to the CFLAGS but
that didn't fix it, I still get the same error.
And that'll do me for today I think ;)
Lurch
There's references in the Makefile to ./parport.c and ./openocd.cfg
which I'm guessing only exist on your PC? ;)
And general practice seems to be to always use absolute paths (i.e.
avoid ./filename ) in Makefiles (that's what all the $DIR variables
are for) so that the Makefile works regardless of which directory you
call it from.
Lurch