KM3NeT CLB
2.0
KM3NeT CLB v2 Embedded Software
|
To compile and run the software, the following software should be available on your operating system:
Make sure the lm32 compiler is in the path. When you have installed the LM32 System Development Tools for Windows, there will be a 'LatticeMico System SDK Shell' link in the start menu which will set everthing right. Also data2mem
and impact
must be on the path. These are located (for windows) inside the ISE bin directory (bin/nt|nt64).
For windows there must be a version of rm
available on the path, either through msys or cygwin.
Alternativly you may also provide the following variables:
GCC_LM32_BIN
: LM32 GCC bin dir (e.g. C:/LatticeMicoSystem/2.0/micosystem/gtools/lm32/bin
)GCC_LM32_PREFIX
: LM32 GCC binary prefix (default = lm32-elf-
).ISE_BIN
: ISE bin directory (e.g. C:/LatticeMicoSystem/2.0/micosystem/gtools/lm32/bin
)make ISE_BIN_DIR=c:/usr/bin/ise/bin GCC_LM32_PREFIX=lm32-
.Once your environment has been set up, you can simply compile by running make
from the build
directory. If all goes well you should end up with a clbv2msw.elf and clb2msw.bit file in build/exe
.
Once compilation is succesful, you can run the newly created bit file using the 'upload' make target: $clbv2esw/build/>make upload
, and in about 30 seconds your new image should be running on the FPGA.
Unfortunatly I have not been able to get a debugger running on the FPGA yet. Hopefully in the future.
I am using a standard Eclipse CDT install (not the contraption that comes with the micosystem), with the GCC cross compiler. If you configure it correctly it will allow for code-completion and building and running inside Eclipse.