Francois Lorrain <francois.lorr...@gmail.com> writes:

[...]

>
> Ok, no particular love for cygwin or mingw32, but the compiler for
> cygwin is fairly old ...
>
> So I try a complete cygwin build of openocd, I end up with :
>
> make[3]: entrant dans le répertoire « /Workspace-1/openocd/src/helper »
> /bin/sh ../../libtool --tag=CC   --mode=link gcc -std=gnu99  -g -O2
> -I/cygdrive/c/ftdi-2.04.06 -Wall -Wstrict-prototypes -Wformat-security
> -
> Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align
> -Wredundant-decls -Werror  -L/cygdrive/c/ftdi-2.04.06/i386 -o
> libhelper.la  li
> bhelper_la-binarybuffer.lo libhelper_la-options.lo libhelper_la-jim.lo
> libhelper_la-jim-eventloop.lo libhelper_la-configuration.lo libhelper
> _la-log.lo libhelper_la-command.lo libhelper_la-time_support.lo
> libhelper_la-replacements.lo libhelper_la-fileio.lo
> libhelper_la-startup_tcl
> .lo   -lioperm  -lftd2xx
> /usr/bin/grep: /usr/lib/libpopt.la: No such file or directory
> /usr/bin/sed: can't read /usr/lib/libpopt.la: No such file or directory
> libtool: link: `/usr/lib/libpopt.la' is not a valid libtool archive
> make[3]: *** [libhelper.la] Erreur 1
> make[3]: quittant le répertoire « /Workspace-1/openocd/src/helper »
> make[2]: *** [all-recursive] Erreur 1
> make[2]: quittant le répertoire « /Workspace-1/openocd/src »
> make[1]: *** [all-recursive] Erreur 1
> make[1]: quittant le répertoire « /Workspace-1/openocd »
> make: *** [all] Erreur 2
>
> After some head scratching, /usr/lib/libpopt.la is called in cygwin
> /usr/bin/cygpopt-0.dll
>
> So <newbie mode on> it looks like the library has to be dynamically
> loaded at runtime ? <newbie mode off> - Now how do I do that ?
>
> If anybody can offer some hint ...
>
> I am using SVN 1793

Hi Francois,

I found that I had to install the "popt" library component of cygwin.

Here are the notes I wrote for myself, (after a day of blundering about
in the dark):

======================================================================
This describes compiling openocd for windows, using the cygwin environment.

  * download and install cygwin from {{http://www.cygwin.com/setup.exe}}.
  * proceed with the default install plus:
    * devel:
      *autoconf, automake, gcc-core, libtool, subversion, make
    * library:
      *ioperm, popt, 

* For the ftdi binary drivers:
  * Configure fails for the usb FT2232 drivers, unless you have the same 
version as you are compiling for installed on the machine.
  * This can be achieved by fitting any type of ft2xx device (FT232R say) and 
updating it's drivers to the ones you want to compile with.
    * create a new folder in the cygwin user directory,e.g. 
c:/cygwin/home/jd/ftdi
    * download from FTDI and extract to a known location, e.g. c:\drivers
    * connect an FTDI device
    * point the wizard to the drivers e.g. c:/cygwin/home/jd/ftdi

  svn co svn://svn.berlios.de/openocd/trunk openocd
  cd openocd
  ./bootstrap
  ./configure --enable-maintainer-mode --enable-ft2232_ftd2xx \
     --with-ftd2xx-win32-zipdir=/home/jd/ftdi --enable-parport \
     --enable-amtjtagaccel --enable-parport_giveio CC="gcc -mno-cygwin" \
     --prefix="c:\tools"
  make
  sudo make install

For some reason there is no openocd.exe produced in c:\tools, so I copy the one 
created in src/.libs

Add c:\tools\bin to the PATH environment variable (control 
panel/system/advanced)

Open a command prompt and test with 

  openocd --version

======================================================================

-- 

John Devereux
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to