====== Tutorial -- Compilation of an example ======
This tutorial explains how the (example) projects from the SDK can be build. The building rules are described by ''Makefile'''s, i.e. an appropriate GNU environment is required.
- Make sure that the [[en:software:requirements|System requirements]] are satisfied.
- Open ''Makefile.conf'' in the main directory of your SDK installation and edit it:
* ''JAVAC_PATH'' should be point to the directory where ''javac(.exe)'' can be found. It must end with '/'. If location javac is in the ''PATH'' environment variable ''JAVAC_PATH'' can be empty
* If you want compile FX3 firmware, ''FX3_INSTALL_PATH'' must point to to the Cypress FX3 SDK location (this directory should contain the directory ''firmware/u3p_firmware'') and ''ARMGCC_INSTALL_PATH'' must point to the location of the ARM gcc cross compiler (this directory should contain the files ''bin/arm-*'')
* **Avoid spaces in directory names**. If this is not possible, escape them using '''\''', e.g. '''/c/Program\ Files'''. If this does not work (no guarantee for this), use symlinks (also see [[en:software:windows_hints]])
- Open a terminal (all proper OS) or start MSys (Windows).
- Let's assume you have installed the package under $HOME/ztex (Linux) or under c:\ztex (Windows) and you want to compile the example ''example/memfifo/''. Go to the example directory, e.g. using cd $HOME/ztex/examples/memfifo
under Linux, or cd /c/ztex/examples/memfifo
under windows.
- The command make
builds everything (including the firmware) and packs it into a .jar archive. (''make distclean all'' enforces to rebuild everything)
{{indexmenu_n>6000}}