This can be used to compile your altera projects on the commandline, i.e. without the GUI.
As Quartus II will throw a lot of garbage into its project dir, a directory layout as follows was picked:
fpga/ nios/ quartus/
Your HDL code (and also the stuff that you might generate by using QSys) goes into fpga/. The quartus directory will contain all the stuff that gets generated by quartus.
In order to use this to build your project, drop all your HDL code into fpga. Edit quartus/Makefile to suit your needs, most interesting variables there should be:
- SRCS (your HDL code)
- PROJECT (your projects name?)
- TOP_LEVEL_ENTITY (your projects top level entity)
- FAMILY, PART and BOARDFILE (for pin assignments, and part selection)
- QUARTUS_PATH (path to the bin/ directory of the desired quartus version)
Now you can create and build your project by:
user$: make -C quartus
In order to program the FPGA device use:
user$: make -C quartus program
- If you generated some components using QSys check the paths in the corresponding _hw.tcl file and make sure the _hw.tcl file is inside (for now ...) the quartus/ directory.