== Environment Setup == This section describes how to prepare the PC environment for building the CRKit framework using either shell scripts or Simulink. To build the CRKit framework, we would need the following tools : 1. Modelsim 2. Xilinx ISE Design Suite 10.1 3. MATLAB R2008a 4. [http://www.cygwin.com/ Cygwin] (Optional only. If Xilinx EDK tools have been installed then you may use the EDK shell instead. However, the shell terminal is only required if you are planning to run scripts to simulate/build the CRKit platform. If using MATLAB/Simulink environment only then omit this step. Cygwin is known to have interoperability issues with older version of Xilinx EDK shell, therefore it is recommended to use ISE/EDK 10.1 or higher) In our reference environment, we are using two drive partitions : `C:\` partition for OS and software applications, and `D:\` for data files. If you are not using the same drive partitions or directory structures, then you will need to modify the links to the appropriate folders/files according to your particular environment. In the following, we have assumed that all the above software have been installed successfully on your machine. === C: Partition === In `C:\` , do the following steps :[[BR]] 1. Create '''hw''' folder, and '''hw\xlib''' subfolder e.g `c:\hw` and `c:\hw\xlib`. xlib contains the Xilinx precompiled libraries for Modelsim. Those libraries are used only for simulation purposes. [[BR]] 2. Compile Xilinx ISE and EDK libraries into `c:\hw\xlib\ise10.1` and `c:\hw\xlib\edk10.1`, respectively. Each time Xilinx ISE or Modelsim version has been updated then the libraries will need to be recompiled. [wiki:Software/Firmware/Framework/tutorial/config/xlib How to compile Xilinx libraries.][[BR]] === D: Partition === In D:\ , do the following steps :[[BR]] 1. Create '''crkit_svn''' folder e.g. `d:\crkit_svn`, this is the location for CRKit svn folder. [wiki:Software/Firmware/Framework/tutorial/config/svn How to synchronize with CRKit SVN.] [[BR]] 2. Create '''hw''' folder e.g. `d:\hw` [[BR]] 3. Create '''hw\cr_build''' subfolder e.g. `d:\hw\cr_build`. Location for Xilinx ISE place/route project files will be located [[BR]] 4. Create '''hw\simulink''' subfolder e.g. `d:\hw\simulink`. Location for the MATLAB/Simulink generated files [[BR]] 5. Create '''hw\host''' subfolder e.g. `d:\hw\host`. Location for Visual Studio host software [[BR]] === Modelsim === Create Modelsim work folder under d:\hw . [wiki:Software/Firmware/Framework/tutorial/config/modelsim How to setup Modelsim work folder.] [[BR]][[BR]] === Windows Environment Variable === Add following Windows environment variables (for MATLAB/Simulink) :[[BR]] 1. MODELSIM_WORK_HOME = `d:\hw` [[BR]] 2. XILINX_ISE_MODELS = `c:\hw\xlib\ise10.1` [[BR]] [[BR]] === .bash_profile === This step is only required if you plan to build CRKit framework using shell scripts. If using MATLAB/Simulink environment then skip this step. Perform following steps : [[BR]] 1. Copy .bash_profile from `d:\crkit_svn\design\trunk\setup` to `c:\Documents and Settings\YOUR_USER_ACCOUNT` . The shell will pick up the variables each time the shell is started. [[BR]] 2. If not using the same directory structures as described above, then edit .bash_profile to link to the appropriate folder locations. [[BR]] The .bash_profile assumes that the following folders are available for linking 1. [wiki:Software/Firmware/Framework/tutorial/config/svn CRKit svn folder] 2. [wiki:Software/Firmware/Framework/tutorial/config/modelsim Modelsim work folder] 3. [wiki:Software/Firmware/Framework/tutorial/config/xlib Xilinx precompiled libraries for Modelsim] 4. [wiki:Software/Firmware/Framework/tutorial/build/env/edk_lib Xilinx EDK precompiled libraries] (optional for now) === Summary === After following all of the above steps, we should have the following folder structure : {{{ c:\hw\xlib\ise10.1 # xilinx ise libraries for modelsim c:\hw\xlib\edk10.1 # xilinx edk libraries for modelsim d:\crkit_svn # crkit framework svn folder d:\hw\cr_build # xilinx ise project folder for synthesis and place/route d:\hw\simulink # matlab/simulink project folder d:\hw\host # visual studio project folder d:\hw\work # modelsim work folder }}} [..]