Difference between revisions of "MicroBlaze"
imported>Cov (Import from old wiki) |
imported>Cov |
||
Line 39: | Line 39: | ||
Use the arrow keys or page up/down keys to navigate and press q to quit. | Use the arrow keys or page up/down keys to navigate and press q to quit. | ||
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. | 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. | ||
− | The script given to us will have a Windows-style to where the | + | The script given to us will have a Windows-style path to where the |
self-extracting archive would have unpacked itself. Run the following | self-extracting archive would have unpacked itself. Run the following | ||
command to fix this: | command to fix this: | ||
Line 56: | Line 56: | ||
<pre>xclean_cablelock | <pre>xclean_cablelock | ||
</pre> | </pre> | ||
+ | |||
=9.x Native USB Driver= | =9.x Native USB Driver= | ||
[http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver] | [http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver http://git.zerfleddert.de/cgi-bin/gitweb.cgi/usb-driver] | ||
+ | |||
+ | [[Category:ECE]] | ||
+ | [[Category:Classwork]] | ||
+ | [[Category:Scripts]] |
Revision as of 07:22, 13 November 2009
Contents
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