Difference between revisions of "MicroBlaze"

From the Linux and Unix Users Group at Virginia Teck Wiki
Jump to: navigation, search
(patronat)
imported>Mjh
m (Reverted edits by 91.236.75.38 (talk) to last revision by 67.220.169.41)
Line 134: Line 134:
 
When you're done, type <code>exit</code> on the command line to quit xmd.
 
When you're done, type <code>exit</code> on the command line to quit xmd.
  
zarzadzania 
+
=Programming the Board=
konturek 
+
If you're given a self-extracting archive, create a directory and
nis popper coupe junit 
+
move the file to it to avoid getting "tar bombed" and unzip it. Replace
<a href=http://000net.pl/disciples,2,maps,bunt,elf%C3%B3w.html>disciples 2 maps bunt elfow</a>
+
"update-s09-2" with the name of your file.
<a href=http://000net.pl/pomara%C5%84czowa,legenda,zdjecia,z,wypadku,na,obidowej.html>pomaranczowa legenda zdjecia z wypadku na obidowej</a>
 
  
awaryjnosc coralgol 
+
<pre>NAME=update-s09-2
chlebki serverow 
+
mkdir ${NAME}
Wedlug pivot 
+
mv ${NAME}.exe ${NAME}
<a href=http://000net.pl/poszukiwania,mamy,cz,1,chomikuj,gra.html>poszukiwania mamy cz 1 chomikuj gra</a>
+
cd ${NAME}
<a href=http://000net.pl/ustawienie,rozrz%C4%85du,1,9,cdti,150,km,znaki.html>ustawienie rozrzadu 1 9 cdti 150 km znaki</a>
+
unzip ${NAME}.exe
 +
</pre>
 +
Now you should see a file called "update.bat". You can take a look
 +
at its contents to get a clue about the commands we'll need to run.
  
tabl zagranie 
+
<pre>less update.bat
zredaguj 
+
</pre>
destroy dramowej pilmet 
+
Use the arrow keys or page up/down keys to navigate and press q to quit.
<a href=http://000net.pl/fasolki,pe%C5%82na,p%C5%82yta,download.html>fasolki pelna plyta download</a>
+
Essentially, we just need to run Xilinx's [http://www.xilinx.com/products/design_tools/logic_design/design_entry/impact.htm impact] programmer with the given file.
<a href=http://000net.pl/nba2k12,na,playstation,instrukcja,obs%C5%82ugi.html>nba2k12 na playstation instrukcja obslugi</a>
+
The script given to us will have a Windows-style path to where the
 +
self-extracting archive would have unpacked itself. Run the following
 +
command to fix this:
  
dalel gonila modol lektury 
+
<pre>sed -i s/'c:\\.*\\'/'.\/'/ ProgramBoot.cmd
wzorce 
+
</pre>
new 
+
Now all we need to do is run the programmer. Make sure the Xilinx
<a href=http://000net.pl/oke,pozna%C5%84,pr%C3%B3bny,egzamin,z,fizyki,2008.html>oke poznan probny egzamin z fizyki 2008</a>
+
tools are in your path and that the Spartan board is connected via USB
<a href=http://000net.pl/x,box,gry,kinekt,jak,sciagac.html>x box gry kinekt jak sciagac</a>
+
and powered on.
 
 
profeslional 
 
sesje 
 
alwi Gole sapi polkiego 
 
<a href=http://000net.pl/do%C5%82adowanie,internetu,lebara,de.html>doladowanie internetu lebara de</a>
 
<a href=http://000net.pl/historia,1,liceum,cz,2,testy.html>historia 1 liceum cz 2 testy</a>
 
 
 
empire 
 
kurhan Probne 
 
poglosnic podrecz zamieszkania spodnica 
 
<a href=http://000net.pl/TP,LINK,TL,mr3020.html>TP LINK TL mr3020</a>
 
<a href=http://000net.pl/jak,zhakowac,konto,na,serwerze,minecraft.html>jak zhakowac konto na serwerze minecraft</a>
 
 
 
cacha pgr wors 
 
znikajaca mozliwosci root 
 
Piwnicy zamrozona zywienie dodattek 
 
<a href=http://000net.pl/mkv,demo,film.html>mkv demo film</a>
 
<a href=http://000net.pl/disciples,2,maps,bunt,elf%C3%B3w.html>disciples 2 maps bunt elfow</a>
 
 
 
delpi kreatir 
 
wymazone 
 
luzne 
 
<a href=http://000net.pl/F1,2010,generator.html>F1 2010 generator</a>
 
<a href=http://000net.pl/my,navia,igo,8,android,800x480.html>my navia igo 8 android 800x480</a>
 
 
 
kompetenci 
 
xperie 
 
kukurydzy 
 
<a href=http://000net.pl/cytaty,o,rodzinie,na,tatua%C5%BC.html>cytaty o rodzinie na tatuaz</a>
 
<a href=http://000net.pl/jak,zmien%C4%87,nazwe,noki,n8.html>jak zmienc nazwe noki n8</a>
 
 
 
rec 
 
Potegi keeen 
 
smieszny proxima uttorent 
 
<a href=http://000net.pl/poszukiwania,mamy,cz,1,chomikuj,gra.html>poszukiwania mamy cz 1 chomikuj gra</a>
 
<a href=http://000net.pl/cytaty,o,rodzinie,na,tatua%C5%BC.html>cytaty o rodzinie na tatuaz</a>
 
 
 
Workshop discipless 
 
dzejdzej lozka 
 
moniec cku
 
  
 +
<pre>impact -batch ProgramBoot.cmd
 +
</pre>
 
=Cable Lock Workaround=
 
=Cable Lock Workaround=
 
Sometimes you'll get an error with cable locking. Typing the following into xmd should fix this.
 
Sometimes you'll get an error with cable locking. Typing the following into xmd should fix this.

Revision as of 23:42, 16 September 2014

Setting Up Xilinx Utilities

The following instructions were written for Xubuntu 9.10 running on a VMware player virtual machine and may not work on other platforms or versions. If you would like to see additional coverage, please add it yourself or make a request on the wiki's wanted page.

Note that some utilities such as 'impact' are capable of using the libusb driver, while others such as 'xmd' must use the libusb-driver driver. libusb-0.1.4 is installed generally by default in *ubuntu distributions and should be available (but the udev magic still has to happen for the cable to work). In this install, we specify use of the libusb-driver by adding some lines in /opt/Xilinx/11.1/settings32.sh

Operating System

  • Install Xubuntu virtual machine
  • Update OS
  • Reboot (to load latest kernel)

Re-Install VMware tools

  sudo apt-get install build-essential linux-headers-`uname -r` psmisc

(Install VMWare tools through host menu)

Unzip tarball from /mnt/cdrom (or cdrom1) to local dir (such as ~/):

  cd ~/vmware-tools-distrib
  sudo ./vmware-install.pl

Select all default options, allow the program to launch vmware-toolbox

Add the following to /etc/rc.local (then sudo chmod +x /etc/rc.local):

  /usr/bin/vmware-user &

Add the following to /etc/fstab:

  .host:/       /mnt/hgfs       vmhgfs  user,defaults   0 0

Reboot (Verify any shared folders are now mounted on /mnt/hgfs) (Verify vmware-user is running with: ps ax | grep vmware)

Supporting Libraries

Install libusb:

  sudo apt-get install libusb-0.1-4

Install fxload:

  sudo apt-get install fxload

Xilinx Tool Installation

Install Xilinx ISE Webpack (do not install cable drivers or XilinxUpdate), then run the following commands:

  sudo sed /opt/Xilinx/11.1/ISE/bin/lin/xusbdfwu.rules -e 's:TEMPNODE:tempnode:g' > /etc/udev/rules.d/xusbdfwu.rules

  sudo cp /opt/Xilinx/11.1/ISE/bin/lin/xusb*.hex /usr/share/

  sudo restart udev
    • Note, for the first command you may receive a permissions error. Try the command sudo su to get a root shell then run the same command sans 'sudo'
  • Plug in the Spartan 3E board. Apply power and attach the USB cable between the board and computer. If everything has been done successfully, a greed LED will illuminate next to the USB receptacle on the boad. If unsuccessful, the red LED will be dimly lit.
  • Install the Xilinx EDK (SDK and Chipscope if required)

Installing libusb-driver

Install libusb-dev and git:

                sudo apt-get install libusb-dev git-core

Download libusb-driver sources:

                cd ~/
                git clone git://git.zerfleddert.de/usb-driver

Compile and install libusb driver

                cd usb-driver/
                make
                make lib32
                sudo cp libusb-drive.so /usr/local/lib/

Create a script in /etc/profile.d/ with the following contents:

  #!/bin/bash
  export PATH="$PATH/opt/Xilinx/EDK/bin/lin:/opt/Xilinx/11.1/EDK/gnu/microblaze/lin/bin/:/opt/Xilinx/11.1/SDK/bin/lin:/opt/Xilinx/11.1/ISE/bin/lin"

Make the script executable:

  sudo chmod +x /etc/profile.d/xlilnx-settings.sh

Add the following lines to /opt/Xilinx/11.1/settings32.sh just after list=""

  export XIL_IMPACT_USE_LIBUSB=0
  export LD_PRELOAD=/usr/local/lib/libusb-driver.so

16) Prior to launching a Xilinx tool (such as xmd), you must type the following command:

  source /opt/Xilinx/11.1/settings32.sh
  • Note if you wish to create a launcher in the desktop environment, use the following format for the 'command' and it will automatically source the settings32.sh before launching the application:
   /bin/bash -c 'source /opt/Xilinx/11.1/settings32.sh && ise'

Sources and Other Contributors: Via (VTLUUG member) forums.xilinx.com wiki.archlinux.org

Makefile Tricks

Automatic Download

This automatically downloads your program to the Spartan board after building. It assumes $(NAME).elf is the file you'd like to download. Note that you will probably miss warning messages regarding your code so you might want to first run make normally.

dl: $(NAME).elf
	echo 'dow $(NAME).elf' > xmd.ini
	echo 'run' >> xmd.ini
	xmd
	rm xmd.ini

When you're done, type exit to quit xmd.

Automatic Debug

debug: $(NAME).elf
	mb-gdb &
	xmd

When you're done, type exit on the command line to quit xmd.

Programming the Board

If you're given a self-extracting archive, create a directory and move the file to it to avoid getting "tar bombed" and unzip it. Replace "update-s09-2" with the name of your file.

NAME=update-s09-2
mkdir ${NAME}
mv ${NAME}.exe ${NAME}
cd ${NAME}
unzip ${NAME}.exe

Now you should see a file called "update.bat". You can take a look at its contents to get a clue about the commands we'll need to run.

less update.bat

Use the arrow keys or page up/down keys to navigate and press q to quit. Essentially, we just need to run Xilinx's impact programmer with the given file. The script given to us will have a Windows-style path to where the self-extracting archive would have unpacked itself. Run the following command to fix this:

sed -i s/'c:\\.*\\'/'.\/'/ ProgramBoot.cmd

Now all we need to do is run the programmer. Make sure the Xilinx tools are in your path and that the Spartan board is connected via USB and powered on.

impact -batch ProgramBoot.cmd

Cable Lock Workaround

Sometimes you'll get an error with cable locking. Typing the following into xmd should fix this.

xclean_cablelock

9.x Native USB Driver

http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver