Development Environment

From Milkymist Wiki

Jump to: navigation, search

MilkyMist consists of several components that need to be build using different tools. On this page you will find the instruction for setting up a development environment to build all of these components.

Contents

[edit] Required tools

You will need:

  • GNU Make,
  • Bourne Again Shell (bash),
  • Xilinx ISE for synthesizing the FPGA bitstream (WebPack is enough),
  • LatticeMico32 toolchain for building the SoC software,

For the host-side tools:

  • native GCC toolchain,
  • libGD,

For the demonstration firmware:

  • clang,
  • gcc-avr,
  • RE2C,
  • Lemon parser generator,
  • Scilab.


[edit] LM32 Toolchain and Flickernoise

For systems where a prebuilt package is not available see the RTEMS_build_instructions and Flickernoise_build_instructions

[edit] Download locations

Xilinx ISE needs to be downloaded from the Xilinx website at http://www.xilinx.com/support/download/index.htm. After you have created a user account, you can continue to download the ISE Design Suite. For synthesizing the bitstream of Milkymist the ISE Webpack will suffice. You are advised to download the Single File Download Image (tar) using the Download Manager instead of the Web Install Client. The download is not very reliable without the Download Manager and you will probably have to retry several times if you don't use it.

The LatticeMico32 toolchain is provided as a thirdparty component on the Milkymist website at http://milkymist.org/3rdparty/. The GCC 4.4 built is currently the recommended version.

Although re2c (lexer) and lemon (parser generator) are quite well known, they are not provided by all the distributions as a standard component. When needed, it will be explained how to obtain and install it in the distribution specific instructions.

Scilab is a numerical computational package used by the demonstration firmware. Several download options are provided on their website: http://www.scilab.org/products/scilab/download

[edit] CentOS/RHEL

To build to bitstream and firmware on CentOS/RHEL it is advised to use the latest version available of the installation media and preferred to use a 32-bit version.

[edit] Additional packages needed

Enable the EPEL repository on CentOS/RHEL 5 using the command

 su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm'

Fedora Electronic Lab will be used as the basis of the system. This will provide packages for hardware design and simulation. Most of them aren't used in the process of building the software side of Milkymist, but could be used to participate in the overall hardware design.

To use the LatticeMico32 toolchain on CentOS/RHEL you need to install a package that provides libmpfr and to build the demonstration firmware you need lemon. Since CentOS/RHEL and the EPEL repository do not provide these, we have created some packages that will provide the necessary libraries. Signed packages can be downloaded from http://gbraad.fedorapeople.org/files/el5/ or http://files.gbraad.nl/milkymist/.

[edit] Steps

Install ISE Webpack in /opt/Xilinx/. Unpack and run ./xsetup

Since CentOS/RHEL does not support the group install function, you will need to install the Fedora Electronic Lab as mentioned on https://fedorahosted.org/fedora-electronic-lab/wiki/FAQ#EPELRepository. It will form the basis of the rest of the system.

 yum install alliance dfu-programmer dinotrace eclipse-cdt eclipse-subclipse electric emacs-verilog-mode \
 eqntott espresso-ab geda-docs geda-examples geda-gattrib geda-gnetlist geda-gschem geda-gsymcheck geda-symbols \
 geda-utils gerbv gnucap gplcver gpsim gputils gtkwave gtkwave irsim iverilog iverilog linsmith magic netgen \
 ngspice pcb perl-Hardware-Verilog-Parser perl-Hardware-Vhdl-Parser perl-ModelSim-List perl-Perlilog perl-Verilog \
 perl-Verilog-Readmem qucs qucs tkcvs tkgate toped vhd2vl vrq xcircuit freehdl octave-forge

To be able to build the host and demonstration firmware

 yum install gd-devel gmp re2c
 rpm -ivh mpfr-2.4.1-2.i386.rpm
 rpm -ivh lemon-3.6.17-1.i386.rpm
 cd /opt
 tar xzvf scilab-5.2.0.bin.linux-i686.tar.gz
 tar xjvf micotoolchain44.tar.bz2

and include these as paths to your .bash_profile

 export PATH=/opt/scilab/bin:/opt/mico32/bin/:$PATH

To be able to get the source code from the repository you need Git.

 yum install git gitk

To build the FPGA bitstream and demonstration firmware

 . /opt/Xilinx/11.1/settings32.sh
 cd ~/Projects/Milkymist
 ./build_bitstream
 ./build_bios
 ./build_demo

[edit] Fedora

[edit] Fedora 12/13

[edit] Steps

Install ISE Webpack in /opt/Xilinx. Unpack and run ./xsetup.

disable or set SE-Linux to permissive. Instructions

 setenforce 0

To install the basic system, you will need the Fedora Electronic Lab.

 yum groupinstall "Electronic Lab"

To build the host and demonstration firmware

 yum install gd-devel re2c lemon
 cd /opt
 tar xzvf scilab-5.2.0.bin.linux-i686.tar.gz
 tar xjvf micotoolchain44.tar.bz2 

and include these as paths to your .bash_profile

 export PATH=/opt/scilab/bin:/opt/mico32/bin/:$PATH

To be able to get the source code from the repository you need Git.

 yum install git gitk

To build the FPGA bitstream

 . /opt/Xilinx/12.1/settings32.sh
 cd ~/Projects/Milkymist
 ./build_bitstream

Due to the way the ISE settings control the LD_LIBRARY_PATH, you should preferably build the rest of the Milkymist components from a separate bash instance, else a build using the LatticeMico32 toolchain will fail.

[edit] Fedora 14

[edit] Steps

To install the Milkymist development tools provided by Fedora:

 yum groupinstall Milkymist

You will still need to install ISE to build the bitstream.

[edit] Debian/Ubuntu

To make your life easier, Debian packages are available for the LatticeMico32 GCC toolchain used for building Milkymist software, and for flterm, the RS232 software upload program.

This could be outdate, please use and compile RTEMS toolchain instead

Add this line to your /etc/apt/sources.list:

 deb http://www.milkymist.org/debian/ ./

and install with:

 apt-get update
 apt-get install gcc-lm32 flterm
Personal tools