Compile urJTAG for Windows
From DP
Contents |
Introduction
Urjtag is a modern tool for communicating over JTAG with flash chips, CPU's etc. This version aimed at supporting Bus Blaster high speed JTAG/flash programmer development
We are going to cross-compile urJTAG from other platform, preferably, Linux, and also under Cygwin. The compiled version will run in native MS Windows.
Requirements
Before you can compile Urjtag for windows, you need to download and install the following files for your cross compiler build:
Autoconf
Automake
Bash
Bison
Bzip2
CMake
FlexGCC (gcc, g++)
GNU MakeGNU
Sed
Intltool
LibC for 32-bit
Libtool
OpenSSL-dev
Patch
Perl
Perl XML::Parser
Pkg-config
SCons
UnZip
Wget
XZ Utils
Yasm
Aside from these latest builds, You also need the following:
The latest Urjtag from the svn, The required windows libraries from ftdichip.com
Building the Cross Compile Environment
After downloading the needed files, you have to run configure, make and make install to properly build the environment
Testing the build Environment
To test your cross-compile environment,
Create a simple hello.c
gcc -o hello hello.c
Flags and Parameters
Patching Urjtag
patch -p0 -i path-to-patch-file
Cross Compiling Urjtag for windows
When everythings work well, Here is the sequence for cross-compilation: Download the latest Urjtag from the repositories:
svn co http://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk urjtag
Cd to your urjtag installation root
cd urjtag/urjtag
Run ./autogen to create makefiles for your system
./autogen.sh
Run the ./ configure along with its flags and parameters:
CFLAGS="-DJTAG_BIN_DIR=\\\"/\\\" -DJTAG_DATA_DIR=\\\"/data\\\"" LDFLAGS="-L/home/username/CDM20808/i386" LIBS="-lftd2xx" ./configure --enable-maintainer-mode --host=i586-mingw32msvc --with-ftd2xx="/home/username/CDM20808" --disable-werror --disable-nls --without-libusb --disable-silent-rules --enable-relocatable
Run Make
make
And find your Exe file in your src/apps/jtag directory.
Testing and Running on windows
Transfer the exe file created from the cross-compiler to a subdirectory and run the jtag.exe. You should see the following, along with the build no.:
Some tricks
You may download the windows binary from the repository, install it and just replace the exe file with your build. don't forget to move the FTDI libraries into its own directories or include it in windows's path.
References
http://urjtag.sourceforge.net/
