hostmot2-firmware: build assorted hostmot2 FPGA firmwares automatically
This package includes the hostmot2 source files along with Makefiles and other scripts to automatically build all the desired variants of the firmwares.
The PIN file format is intended to be human readable (not machine readable) so it is not a requirement that it exactly match the format of existing PIN files. There is also an experimental xml description format.
ISE Version Requirements
cards.py for information about required ISE versions for particular
cards. Currently, by installing ISE 13.4 and ISE 9.2, firmware can be built
for all supported cards. With ISE 13.4, firmware can be built for all cards
except the venerable "5i20".
Xilinx still offers older versions of ISE free of charge. At the time of writing, the location is http://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/design-tools/archive.html and can also be reached from the xilinx.com front page by going to "Support", "Downloads & Licensing", "ISE", "Archive".
Do not manually "source" or "." the settings.sh script into your shell before invoking "make" or "dpkg-buildpackage". The build process automatically finds the right "settings.sh" script for each card if Xilinx ISE is installed into the default location under /opt/Xilinx.
If you did not install in a location that the build process autodetects, create a set of symlinks to the required versions of ise, e.g.,:
settings9.sh -> /opt/Xilinx19/settings32.sh settings13.sh -> /opt/Xilinx13.4/settings32.sh
To build all bitfiles, pinfiles, and xmlfiles: make -j4 # -j setting depends on RAM and # CPU cores Circa 2010, building the full set of firmwares took about 75 minutes wall time with the -j4 setting on a system with 4 cores and 32GB RAM.
To build just a subset of firmwares, create a file
firmwares-local.txt to list the firmware(s) you want to build.
This list is used instead of the list in
The first word in each line specifies the hostmot2 card, and the remaining words specify the pinfiles.
For example, to build just the 'SV12' firmware for the '5i23' card, put just this line in 'firmwares-local.txt':
To build Debian packages: debian/gencontrol export MAKEFLAGS=-j4 dpkg-buildpackage # -j setting depends on RAM and # CPU cores
To build tar packages (must be in a git checkout): make -j4 # -j setting depends on RAM and # CPU cores make dist # or make dist-force if your working tree is dirty
A representative firmware for each supported board type has been tested:
- 5i20, 5i22-1M, 5i23 (PCI)
- 7i43-400 (EPP)
- 3x20-1M (PCI-Express)
- 4i65, 4i68 (PC104+)
The 5i22-1.5M and 7i43-200 are not tested, but are expected to work.
Incorporating new upstream source
Primary development of the hostmot2 fpga firmware is done by Mesa Electronics, who releases source in .zip format. This repository integrates that source with a Linux-centric build infrastructure to produce Debian packages. When incorporating upstream changes from Mesa, the following procedure should be used:
- Put the new source code release on the "upstream" branch as a single large commit
- Merge upstream and master into a (possibly local) testing branch
- Make additional commits to add new card support, adjust for changed filenames, etc
- Test on a representative set of boards
- When the result of testing is satisfactory, merge to master branch. Push new master and upstream branches to git.linuxcnc.org.
In the rare cases that we make a change to a .vhd, .pin, or other file that comes from Mesa, this strategy with an upstream branch lets us retain that change (or have it appear as a merge conflict, if it cannot be automatically applied), instead of losing it when we receive a new set of base source files.