Hints for Windows users

Both compilers which are used for building firmware (sdcc for FX2 and gcc for FX3) come from the Unix-world. They have been ported to Windows but unfortunately Windows is a quite unfriendly environment for such programs. Some SDK's hide this behind an IDE (e.g. the Cypress FX3 SDK is delivered with Eclipse). ZTEX does no go this way.

The building rules of the ZTEX SDK are described by platform and IDE independent Makfiles. This tutorial gives you some hints for setting up the development environment and describes how the SDK can be integrated into an IDE.


  • It is recommended to use the MSYS/MINGW environment
  • make is not a part of the installation and has to be installed using the command
    pacman -S msys/make
  • the Midnight Commander is strognly recommended in order to browse through the directories, edit files and create symlinks.
    • Installation command is
      pacman -S msys/mc
    • The program is started using command
    • On order to change drive, e.g. to to drive c:, enter
      cd /c/
    • Files can be edited by pressing F4
    • Symlinks can be created by Ctrl+x s
  • Some installation paths have to be set up in Makfile.conf, see Tutorial -- Compilation of an example. Spaces and other odd signs in directory names cause a lot of trouble. In order to prevent this, create a few symlinks without spaces, e.g. link the installation directory of the Cypress FX3 SDK to /c/cypress (= c:\cypress)
  • MSYS/MinGW can also be used to build the C host software examples:
    • libusb-1.0 and gcc are required:
      pacman -S mingw64/mingw-w64-x86_64-gcc mingw64/mingw-w64-x86_64-libusb

      for 64 Bit binaries or

      pacman -S mingw32/mingw-w64-i686-gcc mingw32/mingw-w64-i686-libusb

      for 32 Bit binaries

    • Open MinGW64/MinGW32 environment (not just MSYS), got to the project directory and call make

IDE integration

  1. find sh.exe or bash.exe of your MSys(2) Installation. Both shells work. On the test system it is c:\mingw\msys\1.0\bin\bash.exe and the SDK is installed in s:\ztex
  2. In order to build a target using the Makefile rules:
    c:\mingw\msys\1.0\bin\bash -l -c "make -C /s/ztex/examples/memfifo [<target>]"

    This builds a target of the memfifo example in examples/memfifo. Typical targets are all, img, ihx, jar, claen or distclean, see makefiles

Java host software can be compiled and executed without GNU tools. Just the class and JNI library location (in the example above: s:\ztex\java\java and s:\ztex\usb4java) has to be added to the CLASSPATH environment variable.

en/software/windows_hints.txt · Last modified: 2021/01/07 14:25 by
Recent changes RSS feed Creative Commons License Powered by PHP Debian Driven by DokuWiki
[ZTEX Home] [Imprint] [Privacy policy]