Discussion:
[UrJTAG-dev] Struggling to compile
r***@web.de
2017-03-07 10:21:28 UTC
Permalink
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
Åke Rehnman
2017-03-07 11:15:41 UTC
Permalink
Hi,

I'm working on it.

I have managed to get it to compile for cygwin but for mingw it is
emitting a lot of warnings and then failing on some windows conflict.

/Ake


On 2017-03-07 11:21, ***@web.de wrote:
> Okay, seeing as I am seemingly still incapable of compiling UrJTAG,
> could someone maybe give me step by step instructions on how to
> compile it, assuming that I am starting completely from scratch?
> As in, what packets of cygwin to install, what ftd2 drivers to use and
> how, et cetera?
> Please, I have been struggling with this for a week, and I simply
> cannot believe that it is meant to be this complicated.
> I am using Windows 7 64 bit.
> Help.
> Please.
>
>
> ------------------------------------------------------------------------------
> Announcing the Oxford Dictionaries API! The API offers world-renowned
> dictionary content that is easy and intuitive to access. Sign up for an
> account today to start using our lexical data to power your apps and
> projects. Get started today and enter our developer competition.
> http://sdm.link/oxford
>
>
> _______________________________________________
> UrJTAG-development mailing list
> UrJTAG-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/urjtag-development
Åke Rehnman
2017-03-07 14:35:15 UTC
Permalink
Hello all,

so I've tried again to build with both cygwin and mingw.

Short version: cygwin works, mingw does not.

Longer version:

As I mentioned earlier both cygwin and mingw will not build unless
configure is modified. Libtool (or ld) does not want to link with
something that does not begin with 'lib'. So I removed those lines and
renamed ftd2xx.lib to libftd2xx.a and put the library file on the
location of "with-ftd2xx=<path>" ei the "root" of where the ftdi archive
was unpacked.

To even make mingw build I had to disable a bunch of packages, if it
depends on libraries or header conflicts that needs more investigation.
However even though it is actually possible to build with mingw, the
compiler complains at a lot of places for formatting string problems.
And trying to run the resulting jtag.exe yields an error message:

***@ARE-PC /cygdrive/c/akre/urjtag_proj/install/bin
$ ./jtag.exe --version
1 [main] jtag 12052 child_copy: cygheap read copy failed,
0x612EB408..0x612F9088, done 0, windows pid 12052, Win32 error 6
297 [main] jtag 12052 C:\akre\urjtag_proj\install\bin\jtag.exe: ***
fatal error - ccalloc would have returned NULL

Building for cygwin was easier but not without problems. First of all,
***it's too much windows in this program***. After removing the
#include <windows.h> in sysdep.h I was able to build everything except
for some snag with libIntl or if it was gettext.

If we want to build dynamic libraries we also have to add
"-no-undefined" to the LDFLAGS in makefile.am line "liburjtag_la_LDFLAGS
= -version-info 0:0:0 -no-undefined".

If you need parport I/O add #include <windows.h> after #if
defined(HAVE_INPOUTXX)

Add to libftd2xx.c #include <windows.h>, unfortunately there is a
collision with the definition of "interface" so interface has to be
undefined. The ftd2xx.h header also require _WIN32 to be defined so that
is done here as well.

#include <windows.h>
#define _WIN32
#include <ftd2xx.h>
#undef interface

So here is the recipe:

edit configure.am
autoconf
edit Makefile.am
automake
edit sysdep.h
edit tap/parport/direct.c
edit tap/usbconn/libftdi2xx.c
./configure --with-ftd2xx=/cygdrive/c/akre/urjtag_proj/ftdi_cdm_drivers
--with-inpout32 --disable-nls --prefix=/cygdrive/c/akre/urjtag_proj/install
make V=1
make install

FTD2XXLIB=
AS_IF([test "x$with_ftd2xx" = xyes -o "x$with_ftd2xx" = xcheck], [
AC_CHECK_LIB([ftd2xx], [FT_OpenEx], [
HAVELIBFTD2XX=yes
LIBS="-lftd2xx $LIBS"
],[
AC_MSG_WARN([*** libftd2xx not found. No support for FTDI-based USB
JTAG cables via libftd2xx.])
])
],[
AS_IF([test "x$with_ftd2xx" != xno], [
HAVELIBFTD2XX=yes
case $host in
# *cygwin*|*mingw*)
# CFLAGS="$CFLAGS -I$with_ftd2xx"
# AS_IF([test -d "$with_ftd2xx/i386"], [
# FTD2XXLIB="$with_ftd2xx/i386/ftd2xx.lib"
# ],[
# FTD2XXLIB="$with_ftd2xx/ftd2xx.lib"
# ])
# ;;
*)
CFLAGS="$CFLAGS -I$with_ftd2xx -L$with_ftd2xx"
LIBS="-lftd2xx $LIBS"
;;
esac
],)
])
r***@web.de
2017-03-07 14:41:44 UTC
Permalink
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
r***@web.de
2017-03-07 14:49:46 UTC
Permalink
------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford
Åke Rehnman
2017-03-07 15:08:21 UTC
Permalink
If you have readline you might need to configure it specifically for
windows since xterm and windows console are not compatible.
--without-readline might help....

/Ake

On 2017-03-07 15:49, ***@web.de wrote:
> Another update, backspace seems to be working, but it simply doesn't
> move the cursor to the left.
> Regardless, that is not the priority problem I currently have, so it
> can be disregarded.
> the documentation on urjtag.org mentions that the bsdl subsystem is
> supposed to work regardless of my flex, considering that I am not
> building from the subversion repository.
Åke Rehnman
2017-03-07 15:16:36 UTC
Permalink
Just to make clear, are you still on mingw? Because mingw doesn't have
any path /usr/local/share...


On 2017-03-07 15:49, ***@web.de wrote:
> -F- Cannot open file STD_1149_1_1994 or
> /usr/local/share/urjtag/bsdl/STD_1149_1_
> 1994.
> Cannot open /usr/local/share/urjtag/MANUFACTURERS
> Unknown manufacturer!
> chain.c(149) Part 0 without active instruction
> chain.c(200) Part 0 without active instruction
> chain.c(149) Part 0 without active instruction
> I know very well that the given bsdl path contains the proper files,
> considering that it works fine with the precompiled version of JTAG.
Loading...