Hello,
Trying to compile the SVN version after the recent changes on windows
I am compiling a mingw version using the cygwin tools with
mingw32-make, mingw32-gcc - it has worked for me before.
I have a couple of issue with one blocking from finishing the compilation.
1) I have a small local patch in order to be able to find the libftdi
lib in configure.in, otherwise it generate a cygwin path which the
mingw32-gcc does not understand ... I know it will break cygwin build
but I don't know how to fix it better.
Index: configure.in
===================================================================
--- configure.in (revision 1771)
+++ configure.in (working copy)
@@ -145,7 +145,7 @@
# option present
if test -d $with_ftd2xx_win32_zipdir
then
- with_ftd2xx_win32_zipdir=`cd $with_ftd2xx_win32_zipdir && pwd`
+# with_ftd2xx_win32_zipdir=`cd $with_ftd2xx_win32_zipdir && pwd`
AC_MSG_NOTICE([Using: ftdichip.com library: $with_ftd2xx_win32_zipdir])
else
AC_MSG_ERROR([Parameter to --with-ftd2xx-win32-zipdir is not a dir:
$with_ftd2xx_win32_zipdir])
2) It looks like the stdint.h need to be included in system.h, not
types.h, otherwise binarybuffer.c does not compile
here is a patch :
Index: system.h
===================================================================
--- system.h (revision 1771)
+++ system.h (working copy)
@@ -29,6 +29,9 @@
#include <assert.h>
#include <ctype.h>
#include <errno.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
// +++ AC_HEADER_TIME +++
#ifdef TIME_WITH_SYS_TIME
Index: types.h
===================================================================
--- types.h (revision 1771)
+++ types.h (working copy)
@@ -26,9 +26,6 @@
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
-#ifdef HAVE_STDINT_H
-#include <stdint.h>
-#endif
#ifndef u8
typedef unsigned char u8;
3) This one has been bothering me for a while but I cannot find the
solution ... during the make process, the generation of the Makefile
does not work because the ./config.status command is issued with a
lowercase 'm' instead of 'M' for makefile.
If I re-issue the command with the correct UPPERCASE 'M', then it
works and I can continue.
If somebody can find where this 'm' is not correct, it would be great :-)
mingw32-make[3]: Entering directory `c:/Workspace-1/openocd/src/flash'
cd ../.. && C:/cygwin/bin/sh.exe /Workspace-1/openocd/missing --run
automake-1.10 --foreign src/flash/Makefile
cd ../.. && C:/cygwin/bin/sh.exe ./config.status src/flash/makefile depfiles
config.status: error: invalid argument: src/flash/makefile
mingw32-make[3]: *** [makefile] Error 1
mingw32-make[3]: Leaving directory `c:/Workspace-1/openocd/src/flash'
mingw32-make[2]: *** [all-recursive] Error 1
mingw32-make[2]: Leaving directory `c:/Workspace-1/openocd/src'
mingw32-make[1]: *** [all-recursive] Error 1
mingw32-make[1]: Leaving directory `c:/Workspace-1/openocd'
mingw32-make: *** [all] Error 2
$ ./config.status src/flash/Makefile depfiles
config.status: creating src/flash/Makefile
config.status: executing depfiles commands
4) This one is blocking, during the compilation of openocd.c, there is
a syntax error around -DPKGBLDDATE=\"`date +%F-%R`\"
I am not sure how to fix it ...
mingw32-make[3]: Entering directory `c:/Workspace-1/openocd/src'
C:/cygwin/bin/sh.exe ../libtool --tag=CC --mode=compile mingw32-gcc
-std=gnu99 -DHAVE_CONFIG_H -I. -I.. -DPKGLIBDIR=\"/usr/local/lib/open
ocd\" -DPKGBLDDATE=\"`date +%F-%R`\" -DRELSTR=\"svn:\"
-DPKGBLDREV=\"`../guess-rev.sh ..`\" -I../src -I../src/helper
-I../src/jtag -I../src
/target -I../src/xsvf -I../src/svf -I../src/server -I../src/flash
-I../src/pld -IC:/libusb-win32-device-bin-0.1.12.1/include
-IC:/libusb-win
32-device-bin-0.1.12.1/include -g -O2 -Ic:/ftdi-2.04.06 -Wall
-Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter
-Wbad-fun
ction-cast -Wcast-align -Wredundant-decls -Werror -MT
libopenocd_la-openocd.lo -MD -MP -MF .deps/libopenocd_la-openocd.Tpo
-c -o libopenocd_
la-openocd.lo `test -f 'openocd.c' || echo './'`openocd.c
/usr/bin/sh: \: command not found
libtool: compile: mingw32-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..
"-DPKGLIBDIR=\\/usr/local/lib/openocd\\ -DPKGBLDDATE=\\\`date"
"+%F-%R\\
-I../src" -I../src/helper -I../src/jtag -I../src/target -I../src/xsvf
-I../src/svf -I../src/server -I../src/flash -I../src/pld -IC:/libusb-w
in32-device-bin-0.1.12.1/include
-IC:/libusb-win32-device-bin-0.1.12.1/include -g -O2 -Ic:/ftdi-2.04.06
-Wall -Wstrict-prototypes -Wformat-s
ecurity -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align
-Wredundant-decls -Werror -MT libopenocd_la-openocd.lo -MD -MP -MF .d
eps/libopenocd_la-openocd.Tpo -c openocd.c -DDLL_EXPORT -DPIC -o
.libs/libopenocd_la-openocd.o
mingw32-gcc.exe: +%F-%R\ -I../src : No such file or directory
openocd.c: In function 'handle_version_command':
openocd.c:75: erreur: expected ')' before 'PKGBLDDATE'
openocd.c: In function 'setup_command_handler':
openocd.c:213: erreur: expected ')' before 'PKGBLDDATE'
mingw32-make[3]: *** [libopenocd_la-openocd.lo] Error 1
mingw32-make[3]: Leaving directory `c:/Workspace-1/openocd/src'
mingw32-make[2]: *** [all-recursive] Error 1
mingw32-make[2]: Leaving directory `c:/Workspace-1/openocd/src'
mingw32-make[1]: *** [all-recursive] Error 1
mingw32-make[1]: Leaving directory `c:/Workspace-1/openocd'
mingw32-make: *** [all] Error 2
Keep up the good work ...
Regards
Francois
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development