<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.spiderboard.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Js</id>
		<title>spiderboard.org - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.spiderboard.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Js"/>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Special:Contributions/Js"/>
		<updated>2026-05-28T07:35:17Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.29.1</generator>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=346</id>
		<title>Installing OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=346"/>
				<updated>2021-11-12T09:51:51Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing OpenOCD (Linux) ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* If your package distributor provides this version, use your package manager to install OpenOCD:&lt;br /&gt;
* For Debian based distributions the terminal command is:&lt;br /&gt;
*:  &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo apt install openocd&lt;br /&gt;
* If the package version does not work, it is possible to compile OpenOCD from [https://github.com/ntfreak/openocd source (github)].&lt;br /&gt;
&lt;br /&gt;
== Installing OpenOCD (Windows) ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* Prebuild binaries of [https://openocd.org/pages/getting-openocd.html OpenOCD] can be downloaded from [https://github.com/openocd-org/openocd/releases/tag/v0.11.0 here]&lt;br /&gt;
* Install the libusbK driver for the JTAG interface&lt;br /&gt;
** Download and start [https://zadig.akeo.ie/ Zadig]&lt;br /&gt;
** Select &amp;#039;&amp;#039;MX10/Spider JTAG (Interface 0)&amp;#039;&amp;#039; and &amp;#039;&amp;#039;libusbK driver&amp;#039;&amp;#039; and click Install Driver.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Zadig.png|x200px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Shell Script For Easier Use (Linux) ==&lt;br /&gt;
&lt;br /&gt;
A shell script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single terminal command.&lt;br /&gt;
&lt;br /&gt;
* Create the file &amp;#039;&amp;#039;&amp;#039;mx10spider&amp;#039;&amp;#039;&amp;#039; under &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; in your home directory and insert the content below.&lt;br /&gt;
* If not already done, add &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; to the path variable.&lt;br /&gt;
** Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text editor and add the line:&lt;br /&gt;
**: PATH=&amp;quot;.local/bin:$PATH&amp;quot;&lt;br /&gt;
** Logout and login again or run the following command to reload the path variable:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
* Open a terminal and add the executable flag.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; chmod +x .local/bin/mx10spider&lt;br /&gt;
* You are now ready to program the fpga using the command:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider  &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
* If your project is for example located under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039;, use one of the following commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example.svf&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example_pof.svf&lt;br /&gt;
*: for programming the .sof or .pof file respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
me=$(basename $0)&lt;br /&gt;
&lt;br /&gt;
if [ -f &amp;quot;$1&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
    openocd -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd \&lt;br /&gt;
	-expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd \&lt;br /&gt;
	-expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd \&lt;br /&gt;
	-expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd \&lt;br /&gt;
	-expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf $1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tError: No file specified.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;-h&amp;quot; ] || [ &amp;quot;$1&amp;quot; = &amp;quot;--help&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tUtility script to start openocd and run an svf file.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
    echo -e &amp;quot;\tFile not found: $1\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CMD Script For Easier Use (Windows) ==&lt;br /&gt;
&lt;br /&gt;
A CMD script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single console command.&lt;br /&gt;
&lt;br /&gt;
* Create the directory &amp;#039;&amp;#039;OpenOCD\cmd&amp;#039;&amp;#039; and the file &amp;#039;&amp;#039;mx10spider.cmd&amp;#039;&amp;#039; in this directory.&lt;br /&gt;
* Insert the content in this file from below.&lt;br /&gt;
* Add the folder to the path variable.&lt;br /&gt;
&lt;br /&gt;
* Now you can open a console and use the command:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;mx10spider&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;lt;path\to\file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Windowscmd.png|x300px|thumb|Example CMD to programm the FPGA.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this script OpenOCD was installed under &amp;#039;&amp;#039;C:\OpenOCD\bin\openocd.exe&amp;#039;&amp;#039;, adjust this path as necessary.  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider.cmd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;quot;C:\OpenOCD\bin\openocd.exe&amp;quot; -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd -expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd -expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd -expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd -expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf %1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MX10 Hardware Issue ==&lt;br /&gt;
&lt;br /&gt;
Due to a hardware issue on the MX10, in order to get PIC JTAG programming through OpenOCD to work, one has to desolder four resistors on the module.  &lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=1 | left | 750px | thumb | One resistor on the top side of the module, marked with a red cross.]]&lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=2 | center | 750px | thumb | Three resistors on the bottom side of the module, each marked with a red cross.]]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=345</id>
		<title>Installing OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=345"/>
				<updated>2021-11-11T09:50:52Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing OpenOCD (Linux) ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* If your package distributor provides this version, use your package manager to install OpenOCD:&lt;br /&gt;
* For Debian based distributions the terminal command is:&lt;br /&gt;
*:  &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo apt install openocd&lt;br /&gt;
* If the package version does not work, it is possible to compile OpenOCD from [https://github.com/ntfreak/openocd source (github)].&lt;br /&gt;
&lt;br /&gt;
== Installing OpenOCD (Windows) ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* Prebuild binaries of [https://openocd.org/pages/getting-openocd.html OpenOCD] can be downloaded from [https://github.com/xpack-dev-tools/openocd-xpack/releases here]&lt;br /&gt;
* Install the libusbK driver for the JTAG interface&lt;br /&gt;
** Download and start [https://zadig.akeo.ie/ Zadig]&lt;br /&gt;
** Select &amp;#039;&amp;#039;MX10/Spider JTAG (Interface 0)&amp;#039;&amp;#039; and &amp;#039;&amp;#039;libusbK driver&amp;#039;&amp;#039; and click Install Driver.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Zadig.png|x200px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Shell Script For Easier Use (Linux) ==&lt;br /&gt;
&lt;br /&gt;
A shell script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single terminal command.&lt;br /&gt;
&lt;br /&gt;
* Create the file &amp;#039;&amp;#039;&amp;#039;mx10spider&amp;#039;&amp;#039;&amp;#039; under &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; in your home directory and insert the content below.&lt;br /&gt;
* If not already done, add &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; to the path variable.&lt;br /&gt;
** Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text editor and add the line:&lt;br /&gt;
**: PATH=&amp;quot;.local/bin:$PATH&amp;quot;&lt;br /&gt;
** Logout and login again or run the following command to reload the path variable:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
* Open a terminal and add the executable flag.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; chmod +x .local/bin/mx10spider&lt;br /&gt;
* You are now ready to program the fpga using the command:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider  &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
* If your project is for example located under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039;, use one of the following commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example.svf&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example_pof.svf&lt;br /&gt;
*: for programming the .sof or .pof file respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
me=$(basename $0)&lt;br /&gt;
&lt;br /&gt;
if [ -f &amp;quot;$1&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
    openocd -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd \&lt;br /&gt;
	-expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd \&lt;br /&gt;
	-expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd \&lt;br /&gt;
	-expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd \&lt;br /&gt;
	-expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf $1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tError: No file specified.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;-h&amp;quot; ] || [ &amp;quot;$1&amp;quot; = &amp;quot;--help&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tUtility script to start openocd and run an svf file.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
    echo -e &amp;quot;\tFile not found: $1\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CMD Script For Easier Use (Windows) ==&lt;br /&gt;
&lt;br /&gt;
A CMD script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single console command.&lt;br /&gt;
&lt;br /&gt;
* Create the directory &amp;#039;&amp;#039;OpenOCD\cmd&amp;#039;&amp;#039; and the file &amp;#039;&amp;#039;mx10spider.cmd&amp;#039;&amp;#039; in this directory.&lt;br /&gt;
* Insert the content in this file from below.&lt;br /&gt;
* Add the folder to the path variable.&lt;br /&gt;
&lt;br /&gt;
* Now you can open a console and use the command:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;mx10spider&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;lt;path\to\file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Windowscmd.png|x300px|thumb|Example CMD to programm the FPGA.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this script OpenOCD was installed under &amp;#039;&amp;#039;C:\OpenOCD\bin\openocd.exe&amp;#039;&amp;#039;, adjust this path as necessary.  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider.cmd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;quot;C:\OpenOCD\bin\openocd.exe&amp;quot; -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd -expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd -expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd -expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd -expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf %1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MX10 Hardware Issue ==&lt;br /&gt;
&lt;br /&gt;
Due to a hardware issue on the MX10, in order to get PIC JTAG programming through OpenOCD to work, one has to desolder four resistors on the module.  &lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=1 | left | 750px | thumb | One resistor on the top side of the module, marked with a red cross.]]&lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=2 | center | 750px | thumb | Three resistors on the bottom side of the module, each marked with a red cross.]]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=344</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=344"/>
				<updated>2021-11-09T16:19:08Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 20.04)&lt;br /&gt;
* Developer Tools (git, make, gcc, python (3))&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime] (this guide uses version 20.1 Lite)&lt;br /&gt;
* USB Blaster or [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
* SpiderSoM-S, MX10-S8 or MX10-U&lt;br /&gt;
* optionally [https://shop.aries-embedded.de/tools/pmod/302/pmod-8ld?c=88 LED Pmod]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Instructions starting with &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; are commands to be executed in the terminal.&amp;lt;br&amp;gt;&lt;br /&gt;
The working directory is to be taken from context.&lt;br /&gt;
&lt;br /&gt;
== RISC-V Cores ==&lt;br /&gt;
&lt;br /&gt;
Three open source RISC-V cores have been made available for the Intel Platform Designer (Qsys).&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/olofk/serv SERV]&lt;br /&gt;
* [https://github.com/cliffordwolf/picorv32 PicoRV32]&lt;br /&gt;
* [https://github.com/SpinalHDL/VexRiscv VexRiscv]&lt;br /&gt;
&lt;br /&gt;
To install the cores for Intel Platform Designer, first download the source from the [https://github.com/ARIES-Embedded/riscv-on-max10 GitHub repository].&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/ARIES-Embedded/riscv-on-max10.git &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Then copy the cores to a location such as &amp;#039;&amp;#039;&amp;#039;/opt/riscv-cores&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp --parents riscv-on-max10/RiscvCores /opt/riscv-cores&lt;br /&gt;
Start Intel Quartus Prime and add the cores to the global library:&lt;br /&gt;
: Open the menu &amp;#039;&amp;#039;&amp;#039;Assignments&amp;#039;&amp;#039;&amp;#039; -&amp;gt; &amp;#039;&amp;#039;&amp;#039;Settings&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
: Under &amp;#039;&amp;#039;&amp;#039;IP Settings&amp;#039;&amp;#039;&amp;#039; -&amp;gt; &amp;#039;&amp;#039;&amp;#039;IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; add the path&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;/opt/riscv-cores/**/*&amp;#039;&amp;#039;&amp;#039; to the global IP search directories&lt;br /&gt;
Now the cores are available as IP under the group &amp;#039;&amp;#039;RISC-V&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== Programming The Demo ==&lt;br /&gt;
&lt;br /&gt;
=== Compiling Firmware ===&lt;br /&gt;
&lt;br /&gt;
A precompiled memory initialization file (.mif) is available in the &amp;#039;&amp;#039;&amp;#039;Prebuild/&amp;#039;&amp;#039;&amp;#039; folder, that can be used to skip this section.&lt;br /&gt;
&lt;br /&gt;
==== Installing The GNU GCC Toolchain ====&lt;br /&gt;
&lt;br /&gt;
The complete guide for installing the toolchain can be found in the [https://github.com/riscv-collab/riscv-gnu-toolchain RISC-V GNU Toolchain repository].&lt;br /&gt;
&lt;br /&gt;
Download and install the prerequisites:&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo apt-get install autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev&lt;br /&gt;
Clone the repository:&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; git clone https://github.com/riscv-collab/riscv-gnu-toolchain&lt;br /&gt;
Configure build with multilib support for RV32 architectures:&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv-gnu-toolchain&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./configure --prefix=/opt/riscv --with-multilib-generator=&amp;quot;rv32i-ilp32--;rv32im-ilp32-rv32ima-;rv32imc-ilp32-rv32imac-;rv32imafc-ilp32f--&amp;quot;&lt;br /&gt;
Finally start the build, note that this can take some time!&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo make&lt;br /&gt;
Add the build tools to the path variable by opening &amp;#039;&amp;#039;&amp;#039;~/.bashrc&amp;#039;&amp;#039;&amp;#039; or equivalent and add the line:&lt;br /&gt;
: export PATH=&amp;quot;$PATH:/opt/riscv/bin&amp;quot;&lt;br /&gt;
Reload the terminal:&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.bashrc&lt;br /&gt;
Now the build tools are available via:&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;riscv64-unknown-elf-(*)&lt;br /&gt;
&lt;br /&gt;
==== Compiling The RISC-V Firmware ====&lt;br /&gt;
&lt;br /&gt;
Open a terminal in the &amp;#039;&amp;#039;&amp;#039;RiscvSimple/&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;RiscvFreertos/&amp;#039;&amp;#039;&amp;#039; folder of one of the sample projects and run the command:&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
If successful the output files are generated in the subfolder &amp;#039;&amp;#039;&amp;#039;out/&amp;#039;&amp;#039;&amp;#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
Copy the &amp;#039;&amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039;&amp;#039; to the respective Quartus Project folder.&lt;br /&gt;
:&amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ..&lt;br /&gt;
&lt;br /&gt;
=== Quartus Prime Project ===&lt;br /&gt;
&lt;br /&gt;
==== Precompiled Files ====&lt;br /&gt;
&lt;br /&gt;
Precompiled programming files are available for the modules, they can be used to skip the next section and start with [[#Programming the FPGA|programming the FPGA]].&lt;br /&gt;
&lt;br /&gt;
==== Compiling The Quartus Project ====&lt;br /&gt;
&lt;br /&gt;
Start Quartus Prime and open the project corresponding to your module.&amp;lt;br&amp;gt;&lt;br /&gt;
Click on &amp;#039;&amp;#039;&amp;#039;Start Compilation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If successful, the programming files are generated in the folder &amp;#039;&amp;#039;&amp;#039;output_files&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==== Programming the FPGA ====&lt;br /&gt;
&lt;br /&gt;
The FPGA stores its configuration in the internal SRAM.&lt;br /&gt;
The configuration is lost when the device is powered down.&lt;br /&gt;
At bootup the FPGA loads the configuration image from the internal FLASH to the SRAM.&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;.sof&amp;#039;&amp;#039;&amp;#039; file will only write to the SRAM, usually used for testing and debugging,&lt;br /&gt;
whereas the &amp;#039;&amp;#039;&amp;#039;.pof&amp;#039;&amp;#039;&amp;#039; file writes to the FLASH and reboots the FPGA. This image will then be loaded whenever the FPGA is powered on. The &amp;#039;&amp;#039;&amp;#039;.pof&amp;#039;&amp;#039;&amp;#039; file is usually used for deploying.&lt;br /&gt;
&lt;br /&gt;
===== Programming Via USB-Blaster =====&lt;br /&gt;
&lt;br /&gt;
Start Quartus Prime and open the Programmer.&lt;br /&gt;
If no programming file is specified, click &amp;#039;&amp;#039;&amp;#039;Add File&amp;#039;&amp;#039;&amp;#039; and navigate to the &amp;#039;&amp;#039;&amp;#039;Prebuild/&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;output_files&amp;#039;&amp;#039;&amp;#039; folder and select the appropriate file for the module.&lt;br /&gt;
Then under &amp;#039;&amp;#039;&amp;#039;Hardware Setup...&amp;#039;&amp;#039;&amp;#039; select the USB-Blaster.&lt;br /&gt;
Finally press Start.&lt;br /&gt;
&lt;br /&gt;
===== Programming Via OpenOCD =====&lt;br /&gt;
If not done already install and configure [[Installing OpenOCD|OpenOCD]].&lt;br /&gt;
Then open a terminal and use the command with the &amp;#039;&amp;#039;&amp;#039;.svf&amp;#039;&amp;#039;&amp;#039; file:&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
Example: To program the SpiderSoM with the prebuild &amp;quot;&amp;#039;&amp;#039;&amp;#039;.sof&amp;#039;&amp;#039;&amp;#039;&amp;quot; file.&lt;br /&gt;
: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog Prebuild/Spider_S.svf&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Getting_Started:_Quartus_Prime_%26_OpenOCD&amp;diff=343</id>
		<title>Getting Started: Quartus Prime &amp; OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Getting_Started:_Quartus_Prime_%26_OpenOCD&amp;diff=343"/>
				<updated>2021-11-09T16:02:29Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10&amp;lt;sup&amp;gt;[[Installing OpenOCD#MX10 Hardware Issue|[note]]]&amp;lt;/sup&amp;gt; with [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]] (Linux &amp;amp; Windows)&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
* a [https://shop.aries-embedded.de/tools/pmod/302/pmod-8ld Pmod 8LD], to connect to your SpiderBase, in case you want to see the blinking LEDs&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Create a new Quartus Prime Project. Name the project &amp;#039;&amp;#039;Example&amp;#039;&amp;#039;, this will set our top level entity for later.&lt;br /&gt;
&amp;lt;li&amp;gt; In &amp;#039;&amp;#039;Family, Device &amp;amp; Board Settings&amp;#039;&amp;#039;, select Family &amp;quot;MAX 10&amp;quot; and then search for your FPGA. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-new-project.png|x150px|thumb|Project and Top-Level-Entity are being set.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:quartus-set-device.png|x150px|thumb|In this example the 10M08SAU169C8G FPGA is installed on the module.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to &amp;#039;&amp;#039; Assignments -&amp;gt; Device -&amp;gt; Device and Pin Options -&amp;gt; Voltage&amp;#039;&amp;#039; and select 3.3-V LVCMOS as Default I/O Standard.&lt;br /&gt;
&amp;lt;li&amp;gt; If you plan to use OpenOCD, you can enable automatically creating a .svf file. Under &amp;#039;&amp;#039;Device and Pin Options -&amp;gt; Programming Files&amp;#039;&amp;#039; select &amp;#039;&amp;#039;Serial Vector Format File (.svf)&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-assignment-device.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-device-pin-options.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-set-voltage.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-enable-svf.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Open the new file dialog and create a VHDL file.&lt;br /&gt;
&amp;lt;li&amp;gt; Copy and paste the code below.&lt;br /&gt;
&amp;lt;li&amp;gt; Save the VHDL file. This file contains our top level entity &amp;#039;&amp;#039;Example&amp;#039;&amp;#039;, which matches our project configuration.&lt;br /&gt;
&amp;lt;li&amp;gt; Run &amp;#039;&amp;#039;Analysis &amp;amp; Elaboration&amp;#039;&amp;#039;, this will create nodes for pin assignment.&lt;br /&gt;
&amp;lt;li&amp;gt; Open &amp;#039;&amp;#039;Pin Planner&amp;#039;&amp;#039; and edit the location for the existing signals:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Node Name !! SpiderSoM !! MX 10&lt;br /&gt;
|-&lt;br /&gt;
|button[1]&lt;br /&gt;
|PIN_A5&lt;br /&gt;
|PIN_T13&lt;br /&gt;
|-&lt;br /&gt;
|button[0]&lt;br /&gt;
|PIN_B7&lt;br /&gt;
|PIN_T7&lt;br /&gt;
|-&lt;br /&gt;
|led[1]&lt;br /&gt;
|PIN_L2&lt;br /&gt;
|PIN_T6&lt;br /&gt;
|-&lt;br /&gt;
|led[0]&lt;br /&gt;
|PIN_L1&lt;br /&gt;
|PIN_T12&lt;br /&gt;
|-&lt;br /&gt;
|clk25&lt;br /&gt;
|PIN_H4&lt;br /&gt;
|PIN_J12&lt;br /&gt;
|}&lt;br /&gt;
For a complete  pin assignment table see [[Pin Assignment Table|here]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-elaboration.png|x70px|thumb|Analysis &amp;amp; Elaboration]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-planner.png|x70px|thumb|Pin Planner]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-pin-planner.png|x70px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Run &amp;#039;&amp;#039;Compilation&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-compilation.png|x70px|thumb|Compilation]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; The subfolder &amp;#039;&amp;#039;&amp;#039;output_files&amp;#039;&amp;#039;&amp;#039; now contains an Example.sof file, an Example.pof file and if enabled the respective .svf files.&amp;lt;br /&amp;gt;&lt;br /&gt;
.sof (.svf) directly configures the FPGA. This configuration will be lost when the FPGA powers down. &amp;lt;br /&amp;gt;&lt;br /&gt;
.pof (_pof.svf) writes to flash memory. When the FPGA powers up, it will load the configuration stored in the flash memory.&lt;br /&gt;
&amp;lt;li&amp;gt; After programming the FPGA via OpenOCD or USB Blaster the yellow LED on the base should start blinking and the green LED lights up if exactly one user button is pressed.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;VHDL Code:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
library IEEE;&lt;br /&gt;
use IEEE.std_logic_1164.all;&lt;br /&gt;
use IEEE.numeric_std.all;&lt;br /&gt;
&lt;br /&gt;
entity Example is&lt;br /&gt;
	port (&lt;br /&gt;
		clk25	: in	std_logic;&lt;br /&gt;
		button	: in	std_logic_vector(1 downto 0);&lt;br /&gt;
		led	: out	std_logic_vector(1 downto 0)&lt;br /&gt;
	);&lt;br /&gt;
end entity Example;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
architecture arch of Example is&lt;br /&gt;
&lt;br /&gt;
	signal counter : integer range 1 to 12500000 := 1;&lt;br /&gt;
	signal led_yellow : std_logic := &amp;#039;0&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
	process (clk25)&lt;br /&gt;
	begin&lt;br /&gt;
		if (clk25 = &amp;#039;1&amp;#039; and clk25&amp;#039;EVENT) then&lt;br /&gt;
			if (counter &amp;lt; 12500000) then&lt;br /&gt;
				counter &amp;lt;= counter + 1;&lt;br /&gt;
			else&lt;br /&gt;
				led_yellow &amp;lt;= not led_yellow;&lt;br /&gt;
				counter &amp;lt;= 1;&lt;br /&gt;
			end if;&lt;br /&gt;
		end if;				&lt;br /&gt;
	end process;&lt;br /&gt;
	&lt;br /&gt;
	led(1) &amp;lt;= led_yellow;&lt;br /&gt;
	led(0) &amp;lt;= button(0) xor button(1); &lt;br /&gt;
&lt;br /&gt;
end architecture arch;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programming via OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
# If not done already install and configure [[Installing OpenOCD|OpenOCD]].&lt;br /&gt;
# Open a terminal and run the command&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
# If your project for example is under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039; run either:&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example.svf&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example_pof.svf&lt;br /&gt;
#: for programming the &amp;#039;&amp;#039;.sof&amp;#039;&amp;#039; or &amp;#039;&amp;#039;.pof&amp;#039;&amp;#039; file respectively. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_oocd_success.png|thumb|Terminal after successfully running Example.svf]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programming via USB Blaster ==&lt;br /&gt;
# Connect the USB Blaster to the JTAG Header on the SpiderBase.&lt;br /&gt;
# In Quartus Prime, open the Programmer (Tools -&amp;gt; Programmer).&lt;br /&gt;
# Choose whether you want to use the .sof or the .pof file.&lt;br /&gt;
# Click &amp;#039;&amp;#039;Hardware Setup...&amp;#039;&amp;#039; and select your USB Blaster, if there is none available you may need to start the jtag service.&lt;br /&gt;
# Press Start&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-with-blaster.png|thumb|x160px|SpiderSoM and SpiderBase with USB-Blaster connected.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-hwsetup.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-select-blaster.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-start-success.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=342</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=342"/>
				<updated>2021-11-05T12:37:15Z</updated>
		
		<summary type="html">&lt;p&gt;Js: Replaced content with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Under construction.&amp;#039;&amp;#039;&amp;#039;  For now follow the guide from the [https://github.com/ARIES-Embedded/riscv-on-max10/blob/master/GettingStarted.md repository].&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Under construction.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For now follow the guide from the [https://github.com/ARIES-Embedded/riscv-on-max10/blob/master/GettingStarted.md repository].&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=329</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=329"/>
				<updated>2019-11-05T12:36:55Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make, python)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10&amp;lt;sup&amp;gt;[[Installing OpenOCD#MX10 Hardware Issue|[note]]]&amp;lt;/sup&amp;gt; with atleast 8K LE, [[Spiderboard_Baseboard|SpiderBase]], optionally [https://shop.aries-embedded.de/tools/pmod/302/pmod-8ld?c=88 LED Pmod]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* Open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190604_mx10_spider_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd mx10_spider_riscv_freertos/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd mx10_spider_riscv_freertos/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_mx10&amp;#039;&amp;#039; or &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_spider&amp;#039;&amp;#039;, depending on which module you use.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus_spider&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_mx10&amp;#039;&amp;#039; or &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_spider&amp;#039;&amp;#039;&lt;br /&gt;
* Open Device Settings (Assigments -&amp;gt; Device) and select your FPGA, the default FPGA the MX10 project is the 10M08DAF256C8G FPGA and for the SpiderSoM project the 10M08SAU169C8G FPGA.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red or orange LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter. The LED PMod can be acquired in the [https://shop.aries-embedded.de/tools/pmod/302/pmod-8ld?c=88 shop]]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=326</id>
		<title>Installing OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=326"/>
				<updated>2019-09-19T10:31:19Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing OpenOCD (Linux) ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* If your package distributor provides this version, use your package manager to install OpenOCD:&lt;br /&gt;
* For Debian based distributions the terminal command is:&lt;br /&gt;
*:  &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo apt install openocd&lt;br /&gt;
* If the package version does not work, it is possible to compile OpenOCD from [https://github.com/ntfreak/openocd source (github)].&lt;br /&gt;
&lt;br /&gt;
== Installing OpenOCD (Windows) ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* Prebuild binaries can be downloaded from [https://github.com/gnu-mcu-eclipse/openocd/releases GNU MCU Eclipse]&lt;br /&gt;
* The .zip file can be unpacked to any location&lt;br /&gt;
* Install the libusbK driver for the JTAG interface&lt;br /&gt;
** Download and start [https://zadig.akeo.ie/ Zadig]&lt;br /&gt;
** Select &amp;#039;&amp;#039;MX10/Spider JTAG (Interface 0)&amp;#039;&amp;#039; and &amp;#039;&amp;#039;libusbK driver&amp;#039;&amp;#039; and click Install Driver.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Zadig.png|x200px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Shell Script For Easier Use (Linux) ==&lt;br /&gt;
&lt;br /&gt;
A shell script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single terminal command.&lt;br /&gt;
&lt;br /&gt;
* Create the file &amp;#039;&amp;#039;&amp;#039;mx10spider&amp;#039;&amp;#039;&amp;#039; under &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; in your home directory and insert the content below.&lt;br /&gt;
* If not already done, add &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; to the path variable.&lt;br /&gt;
** Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text editor and add the line:&lt;br /&gt;
**: PATH=&amp;quot;.local/bin:$PATH&amp;quot;&lt;br /&gt;
** Logout and login again or run the following command to reload the path variable:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
* Open a terminal and add the executable flag.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; chmod +x .local/bin/mx10spider&lt;br /&gt;
* You are now ready to program the fpga using the command:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider  &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
* If your project is for example located under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039;, use one of the following commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example.svf&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example_pof.svf&lt;br /&gt;
*: for programming the .sof or .pof file respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
me=$(basename $0)&lt;br /&gt;
&lt;br /&gt;
if [ -f &amp;quot;$1&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
    openocd -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd \&lt;br /&gt;
	-expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd \&lt;br /&gt;
	-expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd \&lt;br /&gt;
	-expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd \&lt;br /&gt;
	-expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf $1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tError: No file specified.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;-h&amp;quot; ] || [ &amp;quot;$1&amp;quot; = &amp;quot;--help&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tUtility script to start openocd and run an svf file.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
    echo -e &amp;quot;\tFile not found: $1\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CMD Script For Easier Use (Windows) ==&lt;br /&gt;
&lt;br /&gt;
A CMD script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single console command.&lt;br /&gt;
&lt;br /&gt;
* Create the directory &amp;#039;&amp;#039;OpenOCD\cmd&amp;#039;&amp;#039; and the file &amp;#039;&amp;#039;mx10spider.cmd&amp;#039;&amp;#039; in this directory.&lt;br /&gt;
* Insert the content in this file from below.&lt;br /&gt;
* Add the folder to the path variable.&lt;br /&gt;
&lt;br /&gt;
* Now you can open a console and use the command:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;mx10spider&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;lt;path\to\file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Windowscmd.png|x300px|thumb|Example CMD to programm the FPGA.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this script OpenOCD was installed under &amp;#039;&amp;#039;C:\OpenOCD\bin\openocd.exe&amp;#039;&amp;#039;, adjust this path as necessary.  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider.cmd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;quot;C:\OpenOCD\bin\openocd.exe&amp;quot; -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd -expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd -expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd -expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd -expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf %1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MX10 Hardware Issue ==&lt;br /&gt;
&lt;br /&gt;
Due to a hardware issue on the MX10, in order to get PIC JTAG programming through OpenOCD to work, one has to desolder four resistors on the module.  &lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=1 | left | 750px | thumb | One resistor on the top side of the module, marked with a red cross.]]&lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=2 | center | 750px | thumb | Three resistors on the bottom side of the module, each marked with a red cross.]]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=311</id>
		<title>Installing OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=311"/>
				<updated>2019-09-16T09:00:01Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing OpenOCD (Linux) ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* If your package distributor provides this version, use your package manager to install OpenOCD:&lt;br /&gt;
* For Debian based distributions the terminal command is:&lt;br /&gt;
*:  &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo apt install openocd&lt;br /&gt;
* If the package version does not work, it is possible to compile OpenOCD from [https://github.com/ntfreak/openocd source (github)].&lt;br /&gt;
&lt;br /&gt;
== Installing OpenOCD (Windows) ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* Prebuild binaries can be downloaded from [https://github.com/gnu-mcu-eclipse/openocd/releases GNU MCU Eclipse]&lt;br /&gt;
* The .zip file can be unpacked to any location&lt;br /&gt;
* Install the libusbK driver for the JTAG interface&lt;br /&gt;
** Download and start [https://zadig.akeo.ie/ Zadig]&lt;br /&gt;
** Select &amp;#039;&amp;#039;MX10/Spider JTAG (Interface 0)&amp;#039;&amp;#039; and &amp;#039;&amp;#039;libusbK driver&amp;#039;&amp;#039; and click Install Driver.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Zadig.png|x200px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Shell Script For Easier Use (Linux) ==&lt;br /&gt;
&lt;br /&gt;
A shell script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single terminal command.&lt;br /&gt;
&lt;br /&gt;
* Create the file &amp;#039;&amp;#039;&amp;#039;mx10spider&amp;#039;&amp;#039;&amp;#039; under &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; in your home directory and insert the content below.&lt;br /&gt;
* If not already done, add &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; to the path variable.&lt;br /&gt;
** Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text editor and add the line:&lt;br /&gt;
**: PATH=&amp;quot;.local/bin:$PATH&amp;quot;&lt;br /&gt;
** Logout and login again or run the following command to reload the path variable:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
* Open a terminal and add the executable flag.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; chmod +x .local/bin/mx10spider&lt;br /&gt;
* You are now ready to program the fpga using the command:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider  &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
* If your project is for example located under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039;, use one of the following commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example.svf&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example_pof.svf&lt;br /&gt;
*: for programming the .sof or .pof file respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
me=$(basename $0)&lt;br /&gt;
&lt;br /&gt;
if [ -f &amp;quot;$1&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
    openocd -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd \&lt;br /&gt;
	-expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd \&lt;br /&gt;
	-expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd \&lt;br /&gt;
	-expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd \&lt;br /&gt;
	-expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf $1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tError: No file specified.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;-h&amp;quot; ] || [ &amp;quot;$1&amp;quot; = &amp;quot;--help&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tUtility script to start openocd and run an svf file.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
    echo -e &amp;quot;\tFile not found: $1\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CMD Script For Easier Use (Windows) ==&lt;br /&gt;
&lt;br /&gt;
A CMD script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single console command.&lt;br /&gt;
&lt;br /&gt;
* Create the directory &amp;#039;&amp;#039;OpenOCD\cmd&amp;#039;&amp;#039; and the file &amp;#039;&amp;#039;mx10spider.cmd&amp;#039;&amp;#039; in this directory.&lt;br /&gt;
* Insert the content in this file from below.&lt;br /&gt;
* Add the folder to the path variable.&lt;br /&gt;
&lt;br /&gt;
* Now you can open a console and use the command:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;mx10spider:&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;lt;path\to\file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Windowscmd.png|x300px|thumb|Example CMD to programm the FPGA.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this script OpenOCD was installed under &amp;#039;&amp;#039;C:\OpenOCD\bin\openocd.exe&amp;#039;&amp;#039;, adjust this path as necessary.  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider.cmd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;quot;C:\OpenOCD\bin\openocd.exe&amp;quot; -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd -expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd -expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd -expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd -expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf %1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MX10 Hardware Issue ==&lt;br /&gt;
&lt;br /&gt;
Due to a hardware issue on the MX10, in order to get PIC JTAG programming through OpenOCD to work, one has to desolder four resistors on the module.  &lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=1 | left | 750px | thumb | One resistor on the top side of the module, marked with a red cross.]]&lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=2 | center | 750px | thumb | Three resistors on the bottom side of the module, each marked with a red cross.]]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Getting_Started:_Quartus_Prime_%26_OpenOCD&amp;diff=310</id>
		<title>Getting Started: Quartus Prime &amp; OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Getting_Started:_Quartus_Prime_%26_OpenOCD&amp;diff=310"/>
				<updated>2019-09-16T08:59:40Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10&amp;lt;sup&amp;gt;[[Installing OpenOCD#MX10 Hardware Issue|[note]]]&amp;lt;/sup&amp;gt; with [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]] (Linux &amp;amp; Windows)&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Create a new Quartus Prime Project. Name the project &amp;#039;&amp;#039;Example&amp;#039;&amp;#039;, this will set our top level entity for later.&lt;br /&gt;
&amp;lt;li&amp;gt; In &amp;#039;&amp;#039;Family, Device &amp;amp; Board Settings&amp;#039;&amp;#039;, select Family &amp;quot;MAX 10&amp;quot; and then search for your FPGA. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-new-project.png|x150px|thumb|Project and Top-Level-Entity are being set.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:quartus-set-device.png|x150px|thumb|In this example the 10M08SAU169C8G FPGA is installed on the module.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to &amp;#039;&amp;#039; Assignments -&amp;gt; Device -&amp;gt; Device and Pin Options -&amp;gt; Voltage&amp;#039;&amp;#039; and select 3.3-V LVCMOS as Default I/O Standard.&lt;br /&gt;
&amp;lt;li&amp;gt; If you plan to use OpenOCD, you can enable automatically creating a .svf file. Under &amp;#039;&amp;#039;Device and Pin Options -&amp;gt; Programming Files&amp;#039;&amp;#039; select &amp;#039;&amp;#039;Serial Vector Format File (.svf)&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-assignment-device.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-device-pin-options.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-set-voltage.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-enable-svf.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Open the new file dialog and create a VHDL file.&lt;br /&gt;
&amp;lt;li&amp;gt; Copy and paste the code below.&lt;br /&gt;
&amp;lt;li&amp;gt; Save the VHDL file. This file contains our top level entity &amp;#039;&amp;#039;Example&amp;#039;&amp;#039;, which matches our project configuration.&lt;br /&gt;
&amp;lt;li&amp;gt; Run &amp;#039;&amp;#039;Analysis &amp;amp; Elaboration&amp;#039;&amp;#039;, this will create nodes for pin assignment.&lt;br /&gt;
&amp;lt;li&amp;gt; Open &amp;#039;&amp;#039;Pin Planner&amp;#039;&amp;#039; and edit the location for the existing signals:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Node Name !! SpiderSoM !! MX 10&lt;br /&gt;
|-&lt;br /&gt;
|button[1]&lt;br /&gt;
|PIN_A5&lt;br /&gt;
|PIN_T13&lt;br /&gt;
|-&lt;br /&gt;
|button[0]&lt;br /&gt;
|PIN_B7&lt;br /&gt;
|PIN_T7&lt;br /&gt;
|-&lt;br /&gt;
|led[1]&lt;br /&gt;
|PIN_L2&lt;br /&gt;
|PIN_T6&lt;br /&gt;
|-&lt;br /&gt;
|led[0]&lt;br /&gt;
|PIN_L1&lt;br /&gt;
|PIN_T12&lt;br /&gt;
|-&lt;br /&gt;
|clk25&lt;br /&gt;
|PIN_H4&lt;br /&gt;
|PIN_J12&lt;br /&gt;
|}&lt;br /&gt;
For a complete  pin assignment table see [[Pin Assignment Table|here]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-elaboration.png|x70px|thumb|Analysis &amp;amp; Elaboration]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-planner.png|x70px|thumb|Pin Planner]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-pin-planner.png|x70px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Run &amp;#039;&amp;#039;Compilation&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-compilation.png|x70px|thumb|Compilation]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; The subfolder &amp;#039;&amp;#039;&amp;#039;output_files&amp;#039;&amp;#039;&amp;#039; now contains an Example.sof file, an Example.pof file and if enabled the respective .svf files.&amp;lt;br /&amp;gt;&lt;br /&gt;
.sof (.svf) directly configures the FPGA. This configuration will be lost when the FPGA powers down. &amp;lt;br /&amp;gt;&lt;br /&gt;
.pof (_pof.svf) writes to flash memory. When the FPGA powers up, it will load the configuration stored in the flash memory.&lt;br /&gt;
&amp;lt;li&amp;gt; After programming the FPGA via OpenOCD or USB Blaster the yellow LED on the base should start blinking and the green LED lights up if exactly one user button is pressed.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;VHDL Code:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
library IEEE;&lt;br /&gt;
use IEEE.std_logic_1164.all;&lt;br /&gt;
use IEEE.numeric_std.all;&lt;br /&gt;
&lt;br /&gt;
entity Example is&lt;br /&gt;
	port (&lt;br /&gt;
		clk25	: in	std_logic;&lt;br /&gt;
		button	: in	std_logic_vector(1 downto 0);&lt;br /&gt;
		led	: out	std_logic_vector(1 downto 0)&lt;br /&gt;
	);&lt;br /&gt;
end entity Example;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
architecture archExample of Example is&lt;br /&gt;
&lt;br /&gt;
	signal counter : integer range 1 to 12500000 := 1;&lt;br /&gt;
	signal led_yellow : std_logic := &amp;#039;0&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
	process (clk25)&lt;br /&gt;
	begin&lt;br /&gt;
		if (clk25 = &amp;#039;1&amp;#039; and clk25&amp;#039;EVENT) then&lt;br /&gt;
			if (counter &amp;lt; 12500000) then&lt;br /&gt;
				counter &amp;lt;= counter + 1;&lt;br /&gt;
			else&lt;br /&gt;
				led_yellow &amp;lt;= not led_yellow;&lt;br /&gt;
				counter &amp;lt;= 1;&lt;br /&gt;
			end if;&lt;br /&gt;
		end if;				&lt;br /&gt;
	end process;&lt;br /&gt;
	&lt;br /&gt;
	led(1) &amp;lt;= led_yellow;&lt;br /&gt;
	led(0) &amp;lt;= button(0) xor button(1); &lt;br /&gt;
&lt;br /&gt;
end architecture archExample;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programming via OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
# If not done already install and configure [[Installing OpenOCD|OpenOCD]].&lt;br /&gt;
# Open a terminal and run the command&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
# If your project for example is under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039; run either:&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example.svf&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider /opt/quartus_projects/Example/output_files/Example_pof.svf&lt;br /&gt;
#: for programming the &amp;#039;&amp;#039;.sof&amp;#039;&amp;#039; or &amp;#039;&amp;#039;.pof&amp;#039;&amp;#039; file respectively. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_oocd_success.png|thumb|Terminal after successfully running Example.svf]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programming via USB Blaster ==&lt;br /&gt;
# Connect the USB Blaster to the JTAG Header on the SpiderBase.&lt;br /&gt;
# In Quartus Prime, open the Programmer (Tools -&amp;gt; Programmer).&lt;br /&gt;
# Choose whether you want to use the .sof or the .pof file.&lt;br /&gt;
# Click &amp;#039;&amp;#039;Hardware Setup...&amp;#039;&amp;#039; and select your USB Blaster, if there is none available you may need to start the jtag service.&lt;br /&gt;
# Press Start&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-with-blaster.png|thumb|x160px|SpiderSoM and SpiderBase with USB-Blaster connected.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-hwsetup.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-select-blaster.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-start-success.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Getting_Started:_Quartus_Prime_%26_OpenOCD&amp;diff=309</id>
		<title>Getting Started: Quartus Prime &amp; OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Getting_Started:_Quartus_Prime_%26_OpenOCD&amp;diff=309"/>
				<updated>2019-09-16T08:58:58Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10&amp;lt;sup&amp;gt;[[Installing OpenOCD#MX10 Hardware Issue|[note]]]&amp;lt;/sup&amp;gt; with [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]] (Linux &amp;amp; Windows)&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Create a new Quartus Prime Project. Name the project &amp;#039;&amp;#039;Example&amp;#039;&amp;#039;, this will set our top level entity for later.&lt;br /&gt;
&amp;lt;li&amp;gt; In &amp;#039;&amp;#039;Family, Device &amp;amp; Board Settings&amp;#039;&amp;#039;, select Family &amp;quot;MAX 10&amp;quot; and then search for your FPGA. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-new-project.png|x150px|thumb|Project and Top-Level-Entity are being set.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:quartus-set-device.png|x150px|thumb|In this example the 10M08SAU169C8G FPGA is installed on the module.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to &amp;#039;&amp;#039; Assignments -&amp;gt; Device -&amp;gt; Device and Pin Options -&amp;gt; Voltage&amp;#039;&amp;#039; and select 3.3-V LVCMOS as Default I/O Standard.&lt;br /&gt;
&amp;lt;li&amp;gt; If you plan to use OpenOCD, you can enable automatically creating a .svf file. Under &amp;#039;&amp;#039;Device and Pin Options -&amp;gt; Programming Files&amp;#039;&amp;#039; select &amp;#039;&amp;#039;Serial Vector Format File (.svf)&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-assignment-device.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-device-pin-options.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-set-voltage.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-enable-svf.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Open the new file dialog and create a VHDL file.&lt;br /&gt;
&amp;lt;li&amp;gt; Copy and paste the code below.&lt;br /&gt;
&amp;lt;li&amp;gt; Save the VHDL file. This file contains our top level entity &amp;#039;&amp;#039;Example&amp;#039;&amp;#039;, which matches our project configuration.&lt;br /&gt;
&amp;lt;li&amp;gt; Run &amp;#039;&amp;#039;Analysis &amp;amp; Elaboration&amp;#039;&amp;#039;, this will create nodes for pin assignment.&lt;br /&gt;
&amp;lt;li&amp;gt; Open &amp;#039;&amp;#039;Pin Planner&amp;#039;&amp;#039; and edit the location for the existing signals:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Node Name !! SpiderSoM !! MX 10&lt;br /&gt;
|-&lt;br /&gt;
|button[1]&lt;br /&gt;
|PIN_A5&lt;br /&gt;
|PIN_T13&lt;br /&gt;
|-&lt;br /&gt;
|button[0]&lt;br /&gt;
|PIN_B7&lt;br /&gt;
|PIN_T7&lt;br /&gt;
|-&lt;br /&gt;
|led[1]&lt;br /&gt;
|PIN_L2&lt;br /&gt;
|PIN_T6&lt;br /&gt;
|-&lt;br /&gt;
|led[0]&lt;br /&gt;
|PIN_L1&lt;br /&gt;
|PIN_T12&lt;br /&gt;
|-&lt;br /&gt;
|clk25&lt;br /&gt;
|PIN_H4&lt;br /&gt;
|PIN_J12&lt;br /&gt;
|}&lt;br /&gt;
For a complete  pin assignment table see [[Pin Assignment Table|here]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-elaboration.png|x70px|thumb|Analysis &amp;amp; Elaboration]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-planner.png|x70px|thumb|Pin Planner]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-pin-planner.png|x70px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Run &amp;#039;&amp;#039;Compilation&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-compilation.png|x70px|thumb|Compilation]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; The subfolder &amp;#039;&amp;#039;&amp;#039;output_files&amp;#039;&amp;#039;&amp;#039; now contains an Example.sof file, an Example.pof file and if enabled the respective .svf files.&amp;lt;br /&amp;gt;&lt;br /&gt;
.sof (.svf) directly configures the FPGA. This configuration will be lost when the FPGA powers down. &amp;lt;br /&amp;gt;&lt;br /&gt;
.pof (_pof.svf) writes to flash memory. When the FPGA powers up, it will load the configuration stored in the flash memory.&lt;br /&gt;
&amp;lt;li&amp;gt; After programming the FPGA via OpenOCD or USB Blaster the yellow LED on the base should start blinking and the green LED lights up if exactly one user button is pressed.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;VHDL Code:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
library IEEE;&lt;br /&gt;
use IEEE.std_logic_1164.all;&lt;br /&gt;
use IEEE.numeric_std.all;&lt;br /&gt;
&lt;br /&gt;
entity Example is&lt;br /&gt;
	port (&lt;br /&gt;
		clk25	: in	std_logic;&lt;br /&gt;
		button	: in	std_logic_vector(1 downto 0);&lt;br /&gt;
		led	: out	std_logic_vector(1 downto 0)&lt;br /&gt;
	);&lt;br /&gt;
end entity Example;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
architecture archExample of Example is&lt;br /&gt;
&lt;br /&gt;
	signal counter : integer range 1 to 12500000 := 1;&lt;br /&gt;
	signal led_yellow : std_logic := &amp;#039;0&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
	process (clk25)&lt;br /&gt;
	begin&lt;br /&gt;
		if (clk25 = &amp;#039;1&amp;#039; and clk25&amp;#039;EVENT) then&lt;br /&gt;
			if (counter &amp;lt; 12500000) then&lt;br /&gt;
				counter &amp;lt;= counter + 1;&lt;br /&gt;
			else&lt;br /&gt;
				led_yellow &amp;lt;= not led_yellow;&lt;br /&gt;
				counter &amp;lt;= 1;&lt;br /&gt;
			end if;&lt;br /&gt;
		end if;				&lt;br /&gt;
	end process;&lt;br /&gt;
	&lt;br /&gt;
	led(1) &amp;lt;= led_yellow;&lt;br /&gt;
	led(0) &amp;lt;= button(0) xor button(1); &lt;br /&gt;
&lt;br /&gt;
end architecture archExample;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programming via OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
# If not done already install and configure [[Installing OpenOCD|OpenOCD]].&lt;br /&gt;
# Open a terminal and run the command&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
# If your project for example is under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039; run either:&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projects/Example/output_files/Example.svf&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projects/Example/output_files/Example_pof.svf&lt;br /&gt;
#: for programming the &amp;#039;&amp;#039;.sof&amp;#039;&amp;#039; or &amp;#039;&amp;#039;.pof&amp;#039;&amp;#039; file respectively. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_oocd_success.png|thumb|Terminal after successfully running Example.svf]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programming via USB Blaster ==&lt;br /&gt;
# Connect the USB Blaster to the JTAG Header on the SpiderBase.&lt;br /&gt;
# In Quartus Prime, open the Programmer (Tools -&amp;gt; Programmer).&lt;br /&gt;
# Choose whether you want to use the .sof or the .pof file.&lt;br /&gt;
# Click &amp;#039;&amp;#039;Hardware Setup...&amp;#039;&amp;#039; and select your USB Blaster, if there is none available you may need to start the jtag service.&lt;br /&gt;
# Press Start&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-with-blaster.png|thumb|x160px|SpiderSoM and SpiderBase with USB-Blaster connected.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-hwsetup.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-select-blaster.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-start-success.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=308</id>
		<title>Installing OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=308"/>
				<updated>2019-09-16T08:58:30Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing OpenOCD (Linux) ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* If your package distributor provides this version, use your package manager to install OpenOCD:&lt;br /&gt;
* For Debian based distributions the terminal command is:&lt;br /&gt;
*:  &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo apt install openocd&lt;br /&gt;
* If the package version does not work, it is possible to compile OpenOCD from [https://github.com/ntfreak/openocd source (github)].&lt;br /&gt;
&lt;br /&gt;
== Installing OpenOCD (Windows) ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* Prebuild binaries can be downloaded from [https://github.com/gnu-mcu-eclipse/openocd/releases GNU MCU Eclipse]&lt;br /&gt;
* The .zip file can be unpacked to any location&lt;br /&gt;
* Install the libusbK driver for the JTAG interface&lt;br /&gt;
** Download and start [https://zadig.akeo.ie/ Zadig]&lt;br /&gt;
** Select &amp;#039;&amp;#039;MX10/Spider JTAG (Interface 0)&amp;#039;&amp;#039; and &amp;#039;&amp;#039;libusbK driver&amp;#039;&amp;#039; and click Install Driver.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Zadig.png|x200px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Shell Script For Easier Use (Linux) ==&lt;br /&gt;
&lt;br /&gt;
A shell script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single terminal command.&lt;br /&gt;
&lt;br /&gt;
* Create the file &amp;#039;&amp;#039;&amp;#039;mx10spider_prog&amp;#039;&amp;#039;&amp;#039; under &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; in your home directory and insert the content below.&lt;br /&gt;
* If not already done, add &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; to the path variable.&lt;br /&gt;
** Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text editor and add the line:&lt;br /&gt;
**: PATH=&amp;quot;.local/bin:$PATH&amp;quot;&lt;br /&gt;
** Logout and login again or run the following command to reload the path variable:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
* Open a terminal and add the executable flag.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; chmod +x .local/bin/mx10spider_prog&lt;br /&gt;
* You are now ready to program the fpga using the command:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog  &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
* If your project is for example located under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039;, use one of the following commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projects/Example/output_files/Example.svf&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projects/Example/output_files/Example_pof.svf&lt;br /&gt;
*: for programming the .sof or .pof file respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider_prog:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
me=$(basename $0)&lt;br /&gt;
&lt;br /&gt;
if [ -f &amp;quot;$1&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
    openocd -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd \&lt;br /&gt;
	-expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd \&lt;br /&gt;
	-expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd \&lt;br /&gt;
	-expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd \&lt;br /&gt;
	-expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf $1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tError: No file specified.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;-h&amp;quot; ] || [ &amp;quot;$1&amp;quot; = &amp;quot;--help&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tUtility script to start openocd and run an svf file.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
    echo -e &amp;quot;\tFile not found: $1\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== CMD Script For Easier Use (Windows) ==&lt;br /&gt;
&lt;br /&gt;
A CMD script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single console command.&lt;br /&gt;
&lt;br /&gt;
* Create the directory &amp;#039;&amp;#039;OpenOCD\cmd&amp;#039;&amp;#039; and the file &amp;#039;&amp;#039;mx10spider.cmd&amp;#039;&amp;#039; in this directory.&lt;br /&gt;
* Insert the content in this file from below.&lt;br /&gt;
* Add the folder to the path variable.&lt;br /&gt;
&lt;br /&gt;
* Now you can open a console and use the command:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;mx10spider:&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;lt;path\to\file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Windowscmd.png|x300px|thumb|Example CMD to programm the FPGA.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this script OpenOCD was installed under &amp;#039;&amp;#039;C:\OpenOCD\bin\openocd.exe&amp;#039;&amp;#039;, adjust this path as necessary.  &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider.cmd&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;quot;C:\OpenOCD\bin\openocd.exe&amp;quot; -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd -expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd -expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd -expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd -expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf %1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MX10 Hardware Issue ==&lt;br /&gt;
&lt;br /&gt;
Due to a hardware issue on the MX10, in order to get PIC JTAG programming through OpenOCD to work, one has to desolder four resistors on the module.  &lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=1 | left | 750px | thumb | One resistor on the top side of the module, marked with a red cross.]]&lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=2 | center | 750px | thumb | Three resistors on the bottom side of the module, each marked with a red cross.]]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=File:Windowscmd.png&amp;diff=307</id>
		<title>File:Windowscmd.png</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=File:Windowscmd.png&amp;diff=307"/>
				<updated>2019-09-16T08:56:23Z</updated>
		
		<summary type="html">&lt;p&gt;Js: Js uploaded a new version of File:Windowscmd.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=File:Windowscmd.png&amp;diff=306</id>
		<title>File:Windowscmd.png</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=File:Windowscmd.png&amp;diff=306"/>
				<updated>2019-09-16T08:46:54Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=File:Zadig.png&amp;diff=305</id>
		<title>File:Zadig.png</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=File:Zadig.png&amp;diff=305"/>
				<updated>2019-09-16T08:42:47Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Spiderboard_SoM&amp;diff=304</id>
		<title>Spiderboard SoM</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Spiderboard_SoM&amp;diff=304"/>
				<updated>2019-07-18T09:16:35Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SpiderSoM ==&lt;br /&gt;
The SpiderSoM is a programmable, non-volatile solution based on Intel® MAX®10 FPGA, which enables it to deliver full-featured FPGA capabilities: support for various soft-core CPUs, video-processing algorithms, etc. The SpiderSoM promotes the free and open design concept: all resources, like i.e. design files, gerber, source code, etc. are available under certain open licenses. The SpiderSoM is available as a low cost and extremely flexible platform which enables user to setup a running system according to the required specification in a very short time.&lt;br /&gt;
&lt;br /&gt;
[[File:SpiderSoM-800x496.png|400px]]&lt;br /&gt;
&lt;br /&gt;
This module can be considered as a cost-optimized alternative to the [http://www.aries-embedded.de/?q=MX10 MX10 module].&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
==== Featureset ====&lt;br /&gt;
* MAX 10 FPGA in F256 package&lt;br /&gt;
* Module supports wide range of the devices: from 10M04DC to 10M50DA&lt;br /&gt;
* Optional 4 MByte SPI NOR&lt;br /&gt;
* Optional 4 GByte e.MMC&lt;br /&gt;
* Optional 128/256/512MByte DDR3 DRAM (for 10M 16/25/40/50 FPGAs)&lt;br /&gt;
* Programmable clock generator and PLL, with optional external reference input&lt;br /&gt;
* 178 FPGA GPIO pins, including 13 LVDS transmitters and 54 receivers&lt;br /&gt;
* RTC with battery backup&lt;br /&gt;
* Programmable high-efficient PMIC, FPGA IO voltages are configurable&lt;br /&gt;
* Optional Li-Ion/Li-Pol charger&lt;br /&gt;
* Size: 70mm x 35mm&lt;br /&gt;
&lt;br /&gt;
==== Block Diagram ====&lt;br /&gt;
&lt;br /&gt;
:::::[[File:SpiderSoM-BD.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
MX10 and SpiderSoM modules provide a USB device interface implemented with a Microchip PIC16F1454 microcontroller (MCU).&amp;lt;br /&amp;gt;&lt;br /&gt;
On the host side Linux is supported as Operating System, currently Ubuntu 16.04 LTS is marked as a reference base.&amp;lt;br /&amp;gt;&lt;br /&gt;
On the SoM side the MCU is connected to three interfaces:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;UART&amp;#039;&amp;#039;&amp;#039; - Accessible as standard serial device ( &amp;#039;&amp;#039;/dev/ttyACMx&amp;#039;&amp;#039; ).&lt;br /&gt;
: Connected to the FPGA.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;I2C&amp;#039;&amp;#039;&amp;#039; - Accessible as standard i2c device ( &amp;#039;&amp;#039;/dev/i2c-x&amp;#039;&amp;#039; ). Requires [https://github.com/ARIES-Embedded/i2c-aries-emb driver].&lt;br /&gt;
: Connected to module PMIC, charge controller, RTC and FPGA.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;JTAG&amp;#039;&amp;#039;&amp;#039; - Used with OpenOCD to program the FPGA (see [[Getting Started: Quartus Prime &amp;amp; OpenOCD]] for more).&lt;br /&gt;
* Additionally the MCU implements a bootloader supporting the &amp;#039;&amp;#039;&amp;#039;DFU&amp;#039;&amp;#039;&amp;#039; (Device Firmware Update) protocol (see [[Compiling and Programming PIC Firmware]] for more).&lt;br /&gt;
&lt;br /&gt;
Currently Windows is not fully supported. One can use the serial interface by manually installing the USB Serial driver.&lt;br /&gt;
* Open device manager and select &amp;quot;Other devices&amp;quot; &amp;gt; &amp;quot;Unknown Device&amp;quot;. Open its properties and verify that under the details tab the property &amp;quot;Device install path&amp;quot; reads &amp;quot;USB\VID_04D8&amp;amp;PID_EFD0&amp;amp;MI_02\...&amp;quot; Then in the general tab, select &amp;quot;Update driver&amp;quot;. Here select &amp;quot;Browse my computer...&amp;quot; and &amp;quot;Let me pick from a list...&amp;quot;. Select &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; then select manufacturer &amp;quot;Microsoft&amp;quot; and model &amp;quot;USB Serial Device&amp;quot;. A new COMx device will then be created which can be used with serial tools.&lt;br /&gt;
* Alternative way is to use Zadig (https://zadig.akeo.ie/). With this tool you can overwrite the Composite-Device-driver with a USB Serial driver. Make sure that in the Options tab &amp;quot;List All devices&amp;quot; is checked and &amp;quot;Ignore Hubs or Composite Parents&amp;quot; is unchecked. Then select &amp;quot;MX10/Spider MCU (Composite Parent)&amp;quot; and USB Serial (CDC) and click &amp;quot;Replace Driver&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
==== References ====&lt;br /&gt;
&lt;br /&gt;
* [[Pin Assignment Table| Pin Assignment Table for SpiderSoM and MX10]]&lt;br /&gt;
* [[Compiling and Programming PIC Firmware]]&lt;br /&gt;
* [[Installing OpenOCD]]&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started: Quartus Prime &amp;amp; OpenOCD]]&lt;br /&gt;
* [[RISC-V &amp;amp; FreeRTOS | VectorBlox ORCA RISC-V &amp;amp; FreeRTOS]]&lt;br /&gt;
&lt;br /&gt;
==== Downloads ====&lt;br /&gt;
&lt;br /&gt;
The following components are available for download:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/ARIES-Embedded/i2c-aries-emb Linux I2C Driver for SpiderSoM &amp;amp; MX10 on Github]&lt;br /&gt;
* [https://github.com/ARIES-Embedded/pic16f1-usb-firmware PIC Firmware for SpiderSoM &amp;amp; MX10 on GitHub]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/SpiderSoM/spidersom_V1.2_schematics_2018-05-16.pdf PDF-Schematics]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/SpiderSoM/spidersom_V1.2_project_2018-05-16.zip KiCad Project Files]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/SpiderSoM/spidersom_V1.2_bom_2018-05-26.csv Bill of Materials]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/SpiderSoM/spidersom_V1.2_gerber_2018-05-16.zip Gerber Data]&lt;br /&gt;
&lt;br /&gt;
==== License ====&lt;br /&gt;
&lt;br /&gt;
The SpiderSoM is an Open Hardware. All design files are available under [[CERN_OHL_V1.2]]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=294</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=294"/>
				<updated>2019-06-04T11:27:08Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make, python)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10&amp;lt;sup&amp;gt;[[Installing OpenOCD#MX10 Hardware Issue|[note]]]&amp;lt;/sup&amp;gt; with atleast 8K LE, [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* Open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190604_mx10_spider_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd mx10_spider_riscv_freertos/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd mx10_spider_riscv_freertos/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_mx10&amp;#039;&amp;#039; or &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_spider&amp;#039;&amp;#039;, depending on which module you use.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus_spider&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_mx10&amp;#039;&amp;#039; or &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_spider&amp;#039;&amp;#039;&lt;br /&gt;
* Open Device Settings (Assigments -&amp;gt; Device) and select your FPGA, the default FPGA the MX10 project is the 10M08DAF256C8G FPGA and for the SpiderSoM project the 10M08SAU169C8G FPGA.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red or orange LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=293</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=293"/>
				<updated>2019-06-04T11:25:48Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make, python)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10&amp;lt;sup&amp;gt;[[Installing OpenOCD#MX10 Hardware Issue|[note]]]&amp;lt;/sup&amp;gt; with atleast 8K LE, [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* Open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190604_mx10_spider_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd mx10_spider_riscv_freertos/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd mx10_spider_riscv_freertos/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_mx10&amp;#039;&amp;#039; or &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_spider&amp;#039;&amp;#039;, depending on which module you use.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus_spider&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_mx10&amp;#039;&amp;#039; or &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_spider&amp;#039;&amp;#039;&lt;br /&gt;
* Open Device Settings (Assigments -&amp;gt; Device) and select your FPGA, the default FPGAs are:&lt;br /&gt;
** MX10 SoM project: &amp;#039;&amp;#039;&amp;#039;10M08DAF256C8G&amp;#039;&amp;#039;&amp;#039; FPGA&lt;br /&gt;
** SpiderSoM project: &amp;#039;&amp;#039;&amp;#039;10M08SAU169C8G&amp;#039;&amp;#039;&amp;#039; FPGA&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red or orange LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=292</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=292"/>
				<updated>2019-06-04T11:25:24Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make, python)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10&amp;lt;sup&amp;gt;[[Installing OpenOCD#MX10 Hardware Issue|[note]]]&amp;lt;/sup&amp;gt; with atleast 8K LE, [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* Open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190604_mx10_spider_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd mx10_spider_riscv_freertos/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd mx10_spider_riscv_freertos/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_mx10&amp;#039;&amp;#039; or &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_spider&amp;#039;&amp;#039;, depending on which module you use.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus_spider&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_mx10&amp;#039;&amp;#039; or &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_spider&amp;#039;&amp;#039;&lt;br /&gt;
* Open Device Settings (Assigments -&amp;gt; Device) and select your FPGA, the default FPGAs are:&lt;br /&gt;
** MX10 SoM project: 10M08DAF256C8G FPGA&lt;br /&gt;
** SpiderSoM project: 10M08SAU169C8G FPGA&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red or orange LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=File:Terminal_make_riscv.png&amp;diff=291</id>
		<title>File:Terminal make riscv.png</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=File:Terminal_make_riscv.png&amp;diff=291"/>
				<updated>2019-06-04T11:24:10Z</updated>
		
		<summary type="html">&lt;p&gt;Js: Js uploaded a new version of File:Terminal make riscv.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=290</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=290"/>
				<updated>2019-06-04T11:22:45Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make, python)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10&amp;lt;sup&amp;gt;[[Installing OpenOCD#MX10 Hardware Issue|[note]]]&amp;lt;/sup&amp;gt; with atleast 8K LE, [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* Open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190604_mx10_spider_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd mx10_spider_riscv_freertos/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd mx10_spider_riscv_freertos/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_mx10&amp;#039;&amp;#039; or &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_spider&amp;#039;&amp;#039;, depending on which module you use.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus_spider&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_mx10&amp;#039;&amp;#039; or &amp;#039;&amp;#039;mx10_spider_riscv_freertos/quartus_spider&amp;#039;&amp;#039;&lt;br /&gt;
* Open Device Settings (Assigments -&amp;gt; Device) and select your FPGA, the default FPGAs are&lt;br /&gt;
** MX10 SoM project: 10M08DAF256C8G FPGA&lt;br /&gt;
** SpiderSoM project: 10M08SAU169C8G FPGA&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red or orange LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190604_mx10_spider_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=289</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=289"/>
				<updated>2019-06-04T08:07:32Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make, python)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10&amp;lt;sup&amp;gt;[[Installing OpenOCD#MX10 Hardware Issue|[note]]]&amp;lt;/sup&amp;gt; with atleast 8K LE, [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* Open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
* Open Device Settings (Assigments -&amp;gt; Device) and select your FPGA.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=288</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=288"/>
				<updated>2019-06-04T08:02:45Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make, python)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10&amp;lt;sup&amp;gt;[[Installing OpenOCD#MX10 Hardware Issue|[note]]]&amp;lt;/sup&amp;gt; with atleast 8K LE, [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* Open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Getting_Started:_Quartus_Prime_%26_OpenOCD&amp;diff=287</id>
		<title>Getting Started: Quartus Prime &amp; OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Getting_Started:_Quartus_Prime_%26_OpenOCD&amp;diff=287"/>
				<updated>2019-06-04T08:02:11Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10&amp;lt;sup&amp;gt;[[Installing OpenOCD#MX10 Hardware Issue|[note]]]&amp;lt;/sup&amp;gt; with [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]] (Linux only)&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Create a new Quartus Prime Project. Name the project &amp;#039;&amp;#039;Example&amp;#039;&amp;#039;, this will set our top level entity for later.&lt;br /&gt;
&amp;lt;li&amp;gt; In &amp;#039;&amp;#039;Family, Device &amp;amp; Board Settings&amp;#039;&amp;#039;, select Family &amp;quot;MAX 10&amp;quot; and then search for your FPGA. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-new-project.png|x150px|thumb|Project and Top-Level-Entity are being set.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:quartus-set-device.png|x150px|thumb|In this example the 10M08SAU169C8G FPGA is installed on the module.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to &amp;#039;&amp;#039; Assignments -&amp;gt; Device -&amp;gt; Device and Pin Options -&amp;gt; Voltage&amp;#039;&amp;#039; and select 3.3-V LVCMOS as Default I/O Standard.&lt;br /&gt;
&amp;lt;li&amp;gt; If you plan to use OpenOCD, you can enable automatically creating a .svf file. Under &amp;#039;&amp;#039;Device and Pin Options -&amp;gt; Programming Files&amp;#039;&amp;#039; select &amp;#039;&amp;#039;Serial Vector Format File (.svf)&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-assignment-device.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-device-pin-options.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-set-voltage.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-enable-svf.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Open the new file dialog and create a VHDL file.&lt;br /&gt;
&amp;lt;li&amp;gt; Copy and paste the code below.&lt;br /&gt;
&amp;lt;li&amp;gt; Save the VHDL file. This file contains our top level entity &amp;#039;&amp;#039;Example&amp;#039;&amp;#039;, which matches our project configuration.&lt;br /&gt;
&amp;lt;li&amp;gt; Run &amp;#039;&amp;#039;Analysis &amp;amp; Elaboration&amp;#039;&amp;#039;, this will create nodes for pin assignment.&lt;br /&gt;
&amp;lt;li&amp;gt; Open &amp;#039;&amp;#039;Pin Planner&amp;#039;&amp;#039; and edit the location for the existing signals:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Node Name !! SpiderSoM !! MX 10&lt;br /&gt;
|-&lt;br /&gt;
|button[1]&lt;br /&gt;
|PIN_A5&lt;br /&gt;
|PIN_T13&lt;br /&gt;
|-&lt;br /&gt;
|button[0]&lt;br /&gt;
|PIN_B7&lt;br /&gt;
|PIN_T7&lt;br /&gt;
|-&lt;br /&gt;
|led[1]&lt;br /&gt;
|PIN_L2&lt;br /&gt;
|PIN_T6&lt;br /&gt;
|-&lt;br /&gt;
|led[0]&lt;br /&gt;
|PIN_L1&lt;br /&gt;
|PIN_T12&lt;br /&gt;
|-&lt;br /&gt;
|clk25&lt;br /&gt;
|PIN_H4&lt;br /&gt;
|PIN_J12&lt;br /&gt;
|}&lt;br /&gt;
For a complete  pin assignment table see [[Pin Assignment Table|here]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-elaboration.png|x70px|thumb|Analysis &amp;amp; Elaboration]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-planner.png|x70px|thumb|Pin Planner]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-pin-planner.png|x70px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Run &amp;#039;&amp;#039;Compilation&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-compilation.png|x70px|thumb|Compilation]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; The subfolder &amp;#039;&amp;#039;&amp;#039;output_files&amp;#039;&amp;#039;&amp;#039; now contains an Example.sof file, an Example.pof file and if enabled the respective .svf files.&amp;lt;br /&amp;gt;&lt;br /&gt;
.sof (.svf) directly configures the FPGA. This configuration will be lost when the FPGA powers down. &amp;lt;br /&amp;gt;&lt;br /&gt;
.pof (_pof.svf) writes to flash memory. When the FPGA powers up, it will load the configuration stored in the flash memory.&lt;br /&gt;
&amp;lt;li&amp;gt; After programming the FPGA via OpenOCD or USB Blaster the yellow LED on the base should start blinking and the green LED lights up if exactly one user button is pressed.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;VHDL Code:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
library IEEE;&lt;br /&gt;
use IEEE.std_logic_1164.all;&lt;br /&gt;
use IEEE.numeric_std.all;&lt;br /&gt;
&lt;br /&gt;
entity Example is&lt;br /&gt;
	port (&lt;br /&gt;
		clk25	: in	std_logic;&lt;br /&gt;
		button	: in	std_logic_vector(1 downto 0);&lt;br /&gt;
		led	: out	std_logic_vector(1 downto 0)&lt;br /&gt;
	);&lt;br /&gt;
end entity Example;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
architecture archExample of Example is&lt;br /&gt;
&lt;br /&gt;
	signal counter : integer range 1 to 12500000 := 1;&lt;br /&gt;
	signal led_yellow : std_logic := &amp;#039;0&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
	process (clk25)&lt;br /&gt;
	begin&lt;br /&gt;
		if (clk25 = &amp;#039;1&amp;#039; and clk25&amp;#039;EVENT) then&lt;br /&gt;
			if (counter &amp;lt; 12500000) then&lt;br /&gt;
				counter &amp;lt;= counter + 1;&lt;br /&gt;
			else&lt;br /&gt;
				led_yellow &amp;lt;= not led_yellow;&lt;br /&gt;
				counter &amp;lt;= 1;&lt;br /&gt;
			end if;&lt;br /&gt;
		end if;				&lt;br /&gt;
	end process;&lt;br /&gt;
	&lt;br /&gt;
	led(1) &amp;lt;= led_yellow;&lt;br /&gt;
	led(0) &amp;lt;= button(0) xor button(1); &lt;br /&gt;
&lt;br /&gt;
end architecture archExample;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programming via OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
# If not done already install and configure [[Installing OpenOCD|OpenOCD]].&lt;br /&gt;
# Open a terminal and run the command&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
# If your project for example is under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039; run either:&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projects/Example/output_files/Example.svf&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projects/Example/output_files/Example_pof.svf&lt;br /&gt;
#: for programming the &amp;#039;&amp;#039;.sof&amp;#039;&amp;#039; or &amp;#039;&amp;#039;.pof&amp;#039;&amp;#039; file respectively. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_oocd_success.png|thumb|Terminal after successfully running Example.svf]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programming via USB Blaster ==&lt;br /&gt;
# Connect the USB Blaster to the JTAG Header on the SpiderBase.&lt;br /&gt;
# In Quartus Prime, open the Programmer (Tools -&amp;gt; Programmer).&lt;br /&gt;
# Choose whether you want to use the .sof or the .pof file.&lt;br /&gt;
# Click &amp;#039;&amp;#039;Hardware Setup...&amp;#039;&amp;#039; and select your USB Blaster, if there is none available you may need to start the jtag service.&lt;br /&gt;
# Press Start&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-with-blaster.png|thumb|x160px|SpiderSoM and SpiderBase with USB-Blaster connected.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-hwsetup.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-select-blaster.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-start-success.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=286</id>
		<title>Installing OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=286"/>
				<updated>2019-06-04T07:52:22Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* If your package distributor provides this version, use your package manager to install OpenOCD:&lt;br /&gt;
* For Debian based distributions the terminal command is:&lt;br /&gt;
*:  &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo apt install openocd&lt;br /&gt;
* If the package version does not work, it is possible to compile OpenOCD from [https://github.com/ntfreak/openocd source (github)].&lt;br /&gt;
&lt;br /&gt;
== Shell Script For Easier Use ==&lt;br /&gt;
&lt;br /&gt;
A shell script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single terminal command.&lt;br /&gt;
&lt;br /&gt;
* Create the file &amp;#039;&amp;#039;&amp;#039;mx10spider_prog&amp;#039;&amp;#039;&amp;#039; under &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; in your home directory and insert the content below.&lt;br /&gt;
* If not already done, add &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; to the path variable.&lt;br /&gt;
** Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text editor and add the line:&lt;br /&gt;
**: PATH=&amp;quot;.local/bin:$PATH&amp;quot;&lt;br /&gt;
** Logout and login again or run the following command to reload the path variable:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
* Open a terminal and add the executable flag.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; chmod +x .local/bin/mx10spider_prog&lt;br /&gt;
* You are now ready to program the fpga using the command:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog  &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
* If your project is for example located under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039;, use one of the following commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projets/Example/output_files/Example.svf&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projets/Example/output_files/Example_pof.svf&lt;br /&gt;
*: for programming the .sof or .pof file respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider_prog:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
me=$(basename $0)&lt;br /&gt;
&lt;br /&gt;
if [ -f &amp;quot;$1&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
    openocd -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd \&lt;br /&gt;
	-expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd \&lt;br /&gt;
	-expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd \&lt;br /&gt;
	-expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd \&lt;br /&gt;
	-expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf $1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tError: No file specified.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;-h&amp;quot; ] || [ &amp;quot;$1&amp;quot; = &amp;quot;--help&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tUtility script to start openocd and run an svf file.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
    echo -e &amp;quot;\tFile not found: $1\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MX10 Hardware Issue ==&lt;br /&gt;
&lt;br /&gt;
Due to a hardware issue on the MX10, in order to get PIC JTAG programming through OpenOCD to work, one has to desolder four resistors on the module.  &lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=1 | left | 750px | thumb | One resistor on the top side of the module, marked with a red cross.]]&lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=2 | center | 750px | thumb | Three resistors on the bottom side of the module, each marked with a red cross.]]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=285</id>
		<title>Installing OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=285"/>
				<updated>2019-06-04T07:51:37Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* If your package distributor provides this version, use your package manager to install OpenOCD:&lt;br /&gt;
* For Debian based distributions the terminal command is:&lt;br /&gt;
*:  &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo apt install openocd&lt;br /&gt;
* If the package version does not work, it is possible to compile OpenOCD from [https://github.com/ntfreak/openocd source (github)].&lt;br /&gt;
&lt;br /&gt;
== Shell Script For Easier Use ==&lt;br /&gt;
&lt;br /&gt;
A shell script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single terminal command.&lt;br /&gt;
&lt;br /&gt;
* Create the file &amp;#039;&amp;#039;&amp;#039;mx10spider_prog&amp;#039;&amp;#039;&amp;#039; under &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; in your home directory and insert the content below.&lt;br /&gt;
* If not already done, add &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; to the path variable.&lt;br /&gt;
** Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text editor and add the line:&lt;br /&gt;
**: PATH=&amp;quot;.local/bin:$PATH&amp;quot;&lt;br /&gt;
** Logout and login again or run the following command to reload the path variable:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
* Open a terminal and add the executable flag.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; chmod +x .local/bin/mx10spider_prog&lt;br /&gt;
* You are now ready to program the fpga using the command:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog  &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
* If your project is for example located under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039;, use one of the following commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projets/Example/output_files/Example.svf&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projets/Example/output_files/Example_pof.svf&lt;br /&gt;
*: for programming the .sof or .pof file respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider_prog:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
me=$(basename $0)&lt;br /&gt;
&lt;br /&gt;
if [ -f &amp;quot;$1&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
    openocd -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd \&lt;br /&gt;
	-expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd \&lt;br /&gt;
	-expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd \&lt;br /&gt;
	-expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd \&lt;br /&gt;
	-expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf $1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tError: No file specified.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;-h&amp;quot; ] || [ &amp;quot;$1&amp;quot; = &amp;quot;--help&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tUtility script to start openocd and run an svf file.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
    echo -e &amp;quot;\tFile not found: $1\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MX10 Hardware Issue ==&lt;br /&gt;
&lt;br /&gt;
Due to a hardware issue on the MX10, in order to get PIC JTAG programming through OpenOCD to work, one has to desolder four resistors on the module.  &lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=1 | left | 750px | thumb | One resistor on the top side of the module.]]&lt;br /&gt;
[[File:Mx10-resistors-to-remove.pdf | page=2 | center | 750px | thumb | Three resistors on the bottom side of the module.]]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=File:Mx10-resistors-to-remove.pdf&amp;diff=284</id>
		<title>File:Mx10-resistors-to-remove.pdf</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=File:Mx10-resistors-to-remove.pdf&amp;diff=284"/>
				<updated>2019-06-04T07:43:14Z</updated>
		
		<summary type="html">&lt;p&gt;Js: Due to a hardware issue, these resistors have to be removed, in order to get PIC JTAG programming to work.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Due to a hardware issue, these resistors have to be removed, in order to get PIC JTAG programming to work.&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Pin_Assignment_Table&amp;diff=283</id>
		<title>Pin Assignment Table</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Pin_Assignment_Table&amp;diff=283"/>
				<updated>2019-06-03T12:23:56Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== On Module ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function  !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| CLK25_0 || PIN_H4 || PIN_F9&lt;br /&gt;
|-&lt;br /&gt;
| CLK25_1 || PIN_F13 || PIN_J12&lt;br /&gt;
|-&lt;br /&gt;
| CLK0_P || PIN_H6 || PIN_L3&lt;br /&gt;
|-&lt;br /&gt;
| CLK0_N || PIN_G5 || PIN_M3&lt;br /&gt;
|-&lt;br /&gt;
| DPCLK0  || PIN_N2 || PIN_N2?&lt;br /&gt;
|-&lt;br /&gt;
| DPCLK1 || PIN_N3 || PIN_P1&lt;br /&gt;
|-&lt;br /&gt;
| CLK2_P || PIN_G9 || -&lt;br /&gt;
|-&lt;br /&gt;
| CLK2_N || PIN_G10 || -&lt;br /&gt;
|-&lt;br /&gt;
| D1 (Red / Orange LED) || PIN_D6 || PIN_C5&lt;br /&gt;
|-&lt;br /&gt;
| D2 (Green LED) || PIN_C5 || PIN_E7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SDRAM ===&lt;br /&gt;
&lt;br /&gt;
SDRAM is available on SpiderSoM in place of DDR3.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| LDQM || PIN_K10 || -&lt;br /&gt;
|-&lt;br /&gt;
| WEN || PIN_K11 || -&lt;br /&gt;
|-&lt;br /&gt;
| RASN || PIN_J10 || -&lt;br /&gt;
|-&lt;br /&gt;
| CASN || PIN_L12 || -&lt;br /&gt;
|-&lt;br /&gt;
| UDQM || PIN_K12 || -&lt;br /&gt;
|-&lt;br /&gt;
| CSN || PIN_J12 || -&lt;br /&gt;
|-&lt;br /&gt;
| CKE || PIN_J9 || -&lt;br /&gt;
|-&lt;br /&gt;
| CLK || PIN_J13 || -&lt;br /&gt;
|-&lt;br /&gt;
| BA0 || PIN_H10 || -&lt;br /&gt;
|-&lt;br /&gt;
| BA1 || PIN_H13 || -&lt;br /&gt;
|-&lt;br /&gt;
| A0 || PIN_E9 || -&lt;br /&gt;
|-&lt;br /&gt;
| A1 || PIN_D9 || -&lt;br /&gt;
|-&lt;br /&gt;
| A2 || PIN_E10 || -&lt;br /&gt;
|-&lt;br /&gt;
| A3 || PIN_D11 || -&lt;br /&gt;
|-&lt;br /&gt;
| A4 || PIN_B13 || -&lt;br /&gt;
|-&lt;br /&gt;
| A5 || PIN_B12 || -&lt;br /&gt;
|-&lt;br /&gt;
| A6 || PIN_A12 || -&lt;br /&gt;
|-&lt;br /&gt;
| A7 || PIN_C11 || -&lt;br /&gt;
|-&lt;br /&gt;
| A8 || PIN_C12 || -&lt;br /&gt;
|-&lt;br /&gt;
| A9 || PIN_D12 || -&lt;br /&gt;
|-&lt;br /&gt;
| A10 || PIN_F8 || -&lt;br /&gt;
|-&lt;br /&gt;
| A11 || PIN_B11 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ0 || PIN_J7 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ1 || PIN_K7 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ2 || PIN_N9 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ3 || PIN_N10 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ4 || PIN_M12 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ5 || PIN_M13 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ6 || PIN_M10 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ7 || PIN_L10 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ8 || PIN_M9 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ9 || PIN_N6 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ10 || PIN_M7 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ11 || PIN_N7 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ12 || PIN_K6 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ13 || PIN_M8 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ14 || PIN_N8 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ15 || PIN_J6 || -&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DDR3 ===&lt;br /&gt;
&lt;br /&gt;
DDR3 is available on MX10 in place of SDRAM.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| CKE || - || PIN_D16&lt;br /&gt;
|-&lt;br /&gt;
| CK_N || - || PIN_C15&lt;br /&gt;
|-&lt;br /&gt;
| CK || - || PIN_D15&lt;br /&gt;
|-&lt;br /&gt;
| CS_N || - || PIN_H15&lt;br /&gt;
|-&lt;br /&gt;
| WE_N || - || PIN_J15&lt;br /&gt;
|-&lt;br /&gt;
| RESET_N || - || PIN_K15&lt;br /&gt;
|-&lt;br /&gt;
| RAS_N || - || PIN_J16&lt;br /&gt;
|-&lt;br /&gt;
| CAS_N || - || PIN_H15&lt;br /&gt;
|-&lt;br /&gt;
| ODT || - || PIN_J14&lt;br /&gt;
|-&lt;br /&gt;
| DM || - || PIN_G15&lt;br /&gt;
|-&lt;br /&gt;
| DQS_N || - || PIN_G12&lt;br /&gt;
|-&lt;br /&gt;
| DQS || - || PIN_G11&lt;br /&gt;
|-&lt;br /&gt;
| DQ0 || - || PIN_H11&lt;br /&gt;
|-&lt;br /&gt;
| DQ1 || - || PIN_H12&lt;br /&gt;
|-&lt;br /&gt;
| DQ2 || - || PIN_G14&lt;br /&gt;
|-&lt;br /&gt;
| DQ3 || - || PIN_G16&lt;br /&gt;
|-&lt;br /&gt;
| DQ4 || - || PIN_F16&lt;br /&gt;
|-&lt;br /&gt;
| DQ5 || - || PIN_F14&lt;br /&gt;
|-&lt;br /&gt;
| DQ6 || - || PIN_E15&lt;br /&gt;
|-&lt;br /&gt;
| DQ7 || - || PIN_E14&lt;br /&gt;
|-&lt;br /&gt;
| BA0 || - || PIN_D14&lt;br /&gt;
|-&lt;br /&gt;
| BA1 || - || PIN_B16&lt;br /&gt;
|-&lt;br /&gt;
| BA2 || - || PIN_C16&lt;br /&gt;
|-&lt;br /&gt;
| A0 || - || PIN_T15&lt;br /&gt;
|-&lt;br /&gt;
| A1 || - || PIN_K14&lt;br /&gt;
|-&lt;br /&gt;
| A2 || - || PIN_K12&lt;br /&gt;
|-&lt;br /&gt;
| A3 || - || PIN_K11&lt;br /&gt;
|-&lt;br /&gt;
| A4 || - || PIN_P16&lt;br /&gt;
|-&lt;br /&gt;
| A5 || - || PIN_R15&lt;br /&gt;
|-&lt;br /&gt;
| A6 || - || PIN_N16&lt;br /&gt;
|-&lt;br /&gt;
| A7 || - || PIN_M14&lt;br /&gt;
|-&lt;br /&gt;
| A8 || - || PIN_P15&lt;br /&gt;
|-&lt;br /&gt;
| A9 || - || PIN_M15&lt;br /&gt;
|-&lt;br /&gt;
| A10 || - || PIN_N14&lt;br /&gt;
|-&lt;br /&gt;
| A11 || - || PIN_L12&lt;br /&gt;
|-&lt;br /&gt;
| A12 || - || PIN_L11&lt;br /&gt;
|-&lt;br /&gt;
| A13 || - || PIN_J11&lt;br /&gt;
|-&lt;br /&gt;
| A14 || - || PIN_T14&lt;br /&gt;
|-&lt;br /&gt;
| A15 || - || PIN_C14&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== eMMC Flash ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| CMD || PIN_B10 || PIN_E10&lt;br /&gt;
|-&lt;br /&gt;
| CLK || PIN_E8 || PIN_B13&lt;br /&gt;
|-&lt;br /&gt;
| RSTN || PIN_A7 || PIN_A13&lt;br /&gt;
|-&lt;br /&gt;
| DAT0 || PIN_A6 || PIN_D12&lt;br /&gt;
|-&lt;br /&gt;
| DAT1 || PIN_E6 || PIN_C13&lt;br /&gt;
|-&lt;br /&gt;
| DAT2 || PIN_A4 || PIN_E11&lt;br /&gt;
|-&lt;br /&gt;
| DAT3 || PIN_B6 || PIN_C12&lt;br /&gt;
|-&lt;br /&gt;
| DAT4 || PIN_A3 || PIN_F11&lt;br /&gt;
|-&lt;br /&gt;
| DAT5 || PIN_B4 || PIN_A14&lt;br /&gt;
|-&lt;br /&gt;
| DAT6 || PIN_B3 || PIN_F12&lt;br /&gt;
|-&lt;br /&gt;
| DAT7 || PIN_B5 || PIN_F10&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== UART, I2C &amp;amp; SPI ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| UART_TX || PIN_G4 || PIN_H6&lt;br /&gt;
|-&lt;br /&gt;
| UART_RX || PIN_F4 || PIN_J5&lt;br /&gt;
|-&lt;br /&gt;
| I2C_SCL || PIN_H2 || PIN_J3&lt;br /&gt;
|-&lt;br /&gt;
| I2C_SDA || PIN_H3 || PIN_J2&lt;br /&gt;
|-&lt;br /&gt;
| SPI_SCLK || PIN_H9 || PIN_K5&lt;br /&gt;
|-&lt;br /&gt;
| SPI_MOSI || PIN_G13 || PIN_L2&lt;br /&gt;
|-&lt;br /&gt;
| SPI_MISO || PIN_G12 || PIN_L6&lt;br /&gt;
|-&lt;br /&gt;
| SPI_SSN || PIN_H8 || PIN_N1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== On Baseboard ==&lt;br /&gt;
&lt;br /&gt;
=== Buttons &amp;amp; LEDs ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! Description !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| D1 || LED Yellow || PIN_L2 || PIN_T6&lt;br /&gt;
|-&lt;br /&gt;
| D2 || LED Green || PIN_L1 || PIN_T12&lt;br /&gt;
|-&lt;br /&gt;
| S1 || Reset Button || PIN_B9 || PIN_B10&lt;br /&gt;
|-&lt;br /&gt;
| S3 || User Button 1 || PIN_B7 || PIN_T7&lt;br /&gt;
|-&lt;br /&gt;
| S4 || User Button 2 || PIN_A5 || PIN_T13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== PMod ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| J2 Pin 1 || PIN_A11 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD&amp;gt;SpiderSoM: Shared with Arduino Shield&amp;lt;/ref&amp;gt;|| PIN_B4&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 2 || PIN_A10 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD /&amp;gt;|| PIN_A5&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 3 || PIN_A9 || PIN_L7&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 4 || PIN_A8 || PIN_M6&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 5 || PIN_F12 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD /&amp;gt;|| PIN_A2&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 6 || PIN_E12 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD /&amp;gt;|| PIN_A3&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 7 || PIN_C10 || PIN_P4&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 8 || PIN_C9 || PIN_N5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| J3 Pin 1 || PIN_A2 || PIN_L8&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 2 || PIN_B2 || PIN_M7&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 3 || PIN_K1 || PIN_R6&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 4 || PIN_K2 || PIN_R5&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 5 || PIN_F9 || PIN_P5&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 6 || PIN_F10 || PIN_R4&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 7 || PIN_J1 || PIN_P6&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 8 || PIN_J2 || PIN_R7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| J4 Pin 1 || PIN_M1 || PIN_P9&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 2 || PIN_M2 || PIN_P8&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 3 || PIN_M4 || PIN_P13&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 4 || PIN_M5 || PIN_P12&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 5 || PIN_L3 || PIN_T11&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 6 || PIN_M3 || PIN_R10&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 7 || PIN_L4 || PIN_M8&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 8 || PIN_L5 || PIN_M9&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| J5 Pin 1 || PIN_K8 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD /&amp;gt; || PIN_L10&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 2 || PIN_J8 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD /&amp;gt; || PIN_M11&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 3 || PIN_N5 || PIN_L9&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 4 || PIN_N4 || PIN_M10&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 5 || PIN_L11 || PIN_T9&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 6 || PIN_M11 || PIN_R9&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 7 || PIN_J5 || PIN_T8&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 8 || PIN_K5 || PIN_R8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Arduino Shield ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| A0 || PIN_D1 || PIN_F5&lt;br /&gt;
|-&lt;br /&gt;
| A1 || PIN_C2 || PIN_F4&lt;br /&gt;
|-&lt;br /&gt;
| A2 || PIN_E3 || PIN_H5&lt;br /&gt;
|-&lt;br /&gt;
| A3 || PIN_E4 || PIN_G5&lt;br /&gt;
|-&lt;br /&gt;
| A4 &amp;lt;ref group=&amp;quot;note&amp;quot;&amp;gt; May be connected to Arduino SDA or ADC1_IN5&amp;lt;/ref&amp;gt; || PIN_C1 || PIN_G2&lt;br /&gt;
|-&lt;br /&gt;
| A5 &amp;lt;ref group=&amp;quot;note&amp;quot;&amp;gt; May be connected to Arduino SCL or ADC1_IN6&amp;lt;/ref&amp;gt; || PIN_B1 || PIN_F1&lt;br /&gt;
|-&lt;br /&gt;
| D0 || PIN_K13 || PIN_B3&lt;br /&gt;
|-&lt;br /&gt;
| D1 || PIN_E13 || PIN_A4&lt;br /&gt;
|-&lt;br /&gt;
| D2 || PIN_F12 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ2&amp;gt;SpiderSoM: Shared with PMod J2&amp;lt;/ref&amp;gt; || PIN_B9&lt;br /&gt;
|-&lt;br /&gt;
| D3 || PIN_E12 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ2 /&amp;gt; || PIN_A8&lt;br /&gt;
|-&lt;br /&gt;
| D4 || PIN_A11 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ2 /&amp;gt; || PIN_A12&lt;br /&gt;
|-&lt;br /&gt;
| D5 || PIN_A10 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ2 /&amp;gt; || PIN_A11&lt;br /&gt;
|-&lt;br /&gt;
| D6 || PIN_K8 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ5&amp;gt;SpiderSom: Shared with PMod J5&amp;lt;/ref&amp;gt; || PIN_B12&lt;br /&gt;
|-&lt;br /&gt;
| D7 || PIN_J8 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ5 /&amp;gt; || PIN_B11&lt;br /&gt;
|-&lt;br /&gt;
| B0 || PIN_D8 || PIN_B8&lt;br /&gt;
|-&lt;br /&gt;
| B1 || PIN_H5 || PIN_B7&lt;br /&gt;
|-&lt;br /&gt;
| B2 || PIN_L13 || PIN_A6&lt;br /&gt;
|-&lt;br /&gt;
| B3 || PIN_H1 || PIN_A7&lt;br /&gt;
|-&lt;br /&gt;
| B4 || PIN_N11 || PIN_C6&lt;br /&gt;
|-&lt;br /&gt;
| B5 || PIN_N12 || PIN_B6&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{notelist}}&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Getting_Started:_Quartus_Prime_%26_OpenOCD&amp;diff=282</id>
		<title>Getting Started: Quartus Prime &amp; OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Getting_Started:_Quartus_Prime_%26_OpenOCD&amp;diff=282"/>
				<updated>2019-06-03T12:20:14Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10 with [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]] (Linux only)&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Create a new Quartus Prime Project. Name the project &amp;#039;&amp;#039;Example&amp;#039;&amp;#039;, this will set our top level entity for later.&lt;br /&gt;
&amp;lt;li&amp;gt; In &amp;#039;&amp;#039;Family, Device &amp;amp; Board Settings&amp;#039;&amp;#039;, select Family &amp;quot;MAX 10&amp;quot; and then search for your FPGA. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-new-project.png|x150px|thumb|Project and Top-Level-Entity are being set.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:quartus-set-device.png|x150px|thumb|In this example the 10M08SAU169C8G FPGA is installed on the module.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Go to &amp;#039;&amp;#039; Assignments -&amp;gt; Device -&amp;gt; Device and Pin Options -&amp;gt; Voltage&amp;#039;&amp;#039; and select 3.3-V LVCMOS as Default I/O Standard.&lt;br /&gt;
&amp;lt;li&amp;gt; If you plan to use OpenOCD, you can enable automatically creating a .svf file. Under &amp;#039;&amp;#039;Device and Pin Options -&amp;gt; Programming Files&amp;#039;&amp;#039; select &amp;#039;&amp;#039;Serial Vector Format File (.svf)&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-assignment-device.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-device-pin-options.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-set-voltage.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-enable-svf.png|x150px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Open the new file dialog and create a VHDL file.&lt;br /&gt;
&amp;lt;li&amp;gt; Copy and paste the code below.&lt;br /&gt;
&amp;lt;li&amp;gt; Save the VHDL file. This file contains our top level entity &amp;#039;&amp;#039;Example&amp;#039;&amp;#039;, which matches our project configuration.&lt;br /&gt;
&amp;lt;li&amp;gt; Run &amp;#039;&amp;#039;Analysis &amp;amp; Elaboration&amp;#039;&amp;#039;, this will create nodes for pin assignment.&lt;br /&gt;
&amp;lt;li&amp;gt; Open &amp;#039;&amp;#039;Pin Planner&amp;#039;&amp;#039; and edit the location for the existing signals:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Node Name !! SpiderSoM !! MX 10&lt;br /&gt;
|-&lt;br /&gt;
|button[1]&lt;br /&gt;
|PIN_A5&lt;br /&gt;
|PIN_T13&lt;br /&gt;
|-&lt;br /&gt;
|button[0]&lt;br /&gt;
|PIN_B7&lt;br /&gt;
|PIN_T7&lt;br /&gt;
|-&lt;br /&gt;
|led[1]&lt;br /&gt;
|PIN_L2&lt;br /&gt;
|PIN_T6&lt;br /&gt;
|-&lt;br /&gt;
|led[0]&lt;br /&gt;
|PIN_L1&lt;br /&gt;
|PIN_T12&lt;br /&gt;
|-&lt;br /&gt;
|clk25&lt;br /&gt;
|PIN_H4&lt;br /&gt;
|PIN_J12&lt;br /&gt;
|}&lt;br /&gt;
For a complete  pin assignment table see [[Pin Assignment Table|here]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-elaboration.png|x70px|thumb|Analysis &amp;amp; Elaboration]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-planner.png|x70px|thumb|Pin Planner]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-pin-planner.png|x70px|thumb]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Run &amp;#039;&amp;#039;Compilation&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:Quartus-bar-compilation.png|x70px|thumb|Compilation]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; The subfolder &amp;#039;&amp;#039;&amp;#039;output_files&amp;#039;&amp;#039;&amp;#039; now contains an Example.sof file, an Example.pof file and if enabled the respective .svf files.&amp;lt;br /&amp;gt;&lt;br /&gt;
.sof (.svf) directly configures the FPGA. This configuration will be lost when the FPGA powers down. &amp;lt;br /&amp;gt;&lt;br /&gt;
.pof (_pof.svf) writes to flash memory. When the FPGA powers up, it will load the configuration stored in the flash memory.&lt;br /&gt;
&amp;lt;li&amp;gt; After programming the FPGA via OpenOCD or USB Blaster the yellow LED on the base should start blinking and the green LED lights up if exactly one user button is pressed.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;VHDL Code:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
library IEEE;&lt;br /&gt;
use IEEE.std_logic_1164.all;&lt;br /&gt;
use IEEE.numeric_std.all;&lt;br /&gt;
&lt;br /&gt;
entity Example is&lt;br /&gt;
	port (&lt;br /&gt;
		clk25	: in	std_logic;&lt;br /&gt;
		button	: in	std_logic_vector(1 downto 0);&lt;br /&gt;
		led	: out	std_logic_vector(1 downto 0)&lt;br /&gt;
	);&lt;br /&gt;
end entity Example;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
architecture archExample of Example is&lt;br /&gt;
&lt;br /&gt;
	signal counter : integer range 1 to 12500000 := 1;&lt;br /&gt;
	signal led_yellow : std_logic := &amp;#039;0&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
begin&lt;br /&gt;
&lt;br /&gt;
	process (clk25)&lt;br /&gt;
	begin&lt;br /&gt;
		if (clk25 = &amp;#039;1&amp;#039; and clk25&amp;#039;EVENT) then&lt;br /&gt;
			if (counter &amp;lt; 12500000) then&lt;br /&gt;
				counter &amp;lt;= counter + 1;&lt;br /&gt;
			else&lt;br /&gt;
				led_yellow &amp;lt;= not led_yellow;&lt;br /&gt;
				counter &amp;lt;= 1;&lt;br /&gt;
			end if;&lt;br /&gt;
		end if;				&lt;br /&gt;
	end process;&lt;br /&gt;
	&lt;br /&gt;
	led(1) &amp;lt;= led_yellow;&lt;br /&gt;
	led(0) &amp;lt;= button(0) xor button(1); &lt;br /&gt;
&lt;br /&gt;
end architecture archExample;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programming via OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
# If not done already install and configure [[Installing OpenOCD|OpenOCD]].&lt;br /&gt;
# Open a terminal and run the command&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
# If your project for example is under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039; run either:&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projects/Example/output_files/Example.svf&lt;br /&gt;
#: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projects/Example/output_files/Example_pof.svf&lt;br /&gt;
#: for programming the &amp;#039;&amp;#039;.sof&amp;#039;&amp;#039; or &amp;#039;&amp;#039;.pof&amp;#039;&amp;#039; file respectively. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_oocd_success.png|thumb|Terminal after successfully running Example.svf]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Programming via USB Blaster ==&lt;br /&gt;
# Connect the USB Blaster to the JTAG Header on the SpiderBase.&lt;br /&gt;
# In Quartus Prime, open the Programmer (Tools -&amp;gt; Programmer).&lt;br /&gt;
# Choose whether you want to use the .sof or the .pof file.&lt;br /&gt;
# Click &amp;#039;&amp;#039;Hardware Setup...&amp;#039;&amp;#039; and select your USB Blaster, if there is none available you may need to start the jtag service.&lt;br /&gt;
# Press Start&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt; &lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-with-blaster.png|thumb|x160px|SpiderSoM and SpiderBase with USB-Blaster connected.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-hwsetup.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-select-blaster.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:programmer-start-success.png|thumb|x170px]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Spiderboard_Baseboard&amp;diff=281</id>
		<title>Spiderboard Baseboard</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Spiderboard_Baseboard&amp;diff=281"/>
				<updated>2019-06-03T10:56:43Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SpiderBase ==&lt;br /&gt;
&lt;br /&gt;
The Spiderboard Baseboard (SpiderBase) is a unique baseboard, designed to host the [[Spiderboard SoM]] / [http://www.aries-embedded.de/?q=MX10  MX10 SoM] based on Intel PSG (former Altera®) MAX® 10 FPGAs. &lt;br /&gt;
&lt;br /&gt;
:::::::::[[File:Spiderboard-baseboard-bird.500x500.png|600px]]&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
==== Featureset ====&lt;br /&gt;
&lt;br /&gt;
* simple baseboard in 2 layer design&lt;br /&gt;
* compatibility to the [[Spiderboard SoM]] as well as the [http://www.aries-embedded.de/?q=MX10  MX10 SoM].&lt;br /&gt;
* open hardware&lt;br /&gt;
* MxM2 pcb edge connector&lt;br /&gt;
* every pin of the MxM2 connector module is accessible at one of the pinheaders&lt;br /&gt;
* large 25x15 .1” prototyping area&lt;br /&gt;
* 4 Pmod compatible connectors (3.3V or 5V supply voltage selectable)&lt;br /&gt;
* 2 user push buttons&lt;br /&gt;
* reset and power buttons&lt;br /&gt;
* 2 user LEDs&lt;br /&gt;
* Arduino shield compatible interface&lt;br /&gt;
* Intel PSG Blaster compatible programming interfaces&lt;br /&gt;
* USB mini B connector&lt;br /&gt;
* CR2032 cell holder&lt;br /&gt;
* JST-2.0 lithium battery connector&lt;br /&gt;
* configuration jumpers (e.g. boot selection for MX10 module)&lt;br /&gt;
&lt;br /&gt;
==== Block Diagram ====&lt;br /&gt;
&lt;br /&gt;
:::::[[File:MX10 baseboard BD.png|500px]]&lt;br /&gt;
&lt;br /&gt;
==== Component Locations ====&lt;br /&gt;
&lt;br /&gt;
[[File:Spiderbase_components.png]]&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
==== Downloads ====&lt;br /&gt;
&lt;br /&gt;
The following components are available for download:&lt;br /&gt;
&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/Baseboard/spiderboard_schematics_V2.0_2017-10-27.pdf PDF-Schematics]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/Baseboard/spiderboard_V2.0_project_2017-10-27.tar.gz KiCad Project Files]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/Baseboard/spiderboard_V2.0_bom_2017-10-27.csv Bill of Materials]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/Baseboard/spiderboard_V2.0_gerber_2017-10-27.tar.gz Gerber Data]&lt;br /&gt;
&lt;br /&gt;
==== License ====&lt;br /&gt;
&lt;br /&gt;
The Spiderboard Baseboard is an Open Hardware. All design files are available under [[CERN_OHL_V1.2]]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Spiderboard_SoM&amp;diff=280</id>
		<title>Spiderboard SoM</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Spiderboard_SoM&amp;diff=280"/>
				<updated>2019-06-03T10:53:27Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SpiderSoM ==&lt;br /&gt;
The SpiderSoM is a programmable, non-volatile solution based on Intel® MAX®10 FPGA, which enables it to deliver full-featured FPGA capabilities: support for various soft-core CPUs, video-processing algorithms, etc. The SpiderSoM promotes the free and open design concept: all resources, like i.e. design files, gerber, source code, etc. are available under certain open licenses. The SpiderSoM is available as a low cost and extremely flexible platform which enables user to setup a running system according to the required specification in a very short time.&lt;br /&gt;
&lt;br /&gt;
[[File:SpiderSoM-800x496.png|400px]]&lt;br /&gt;
&lt;br /&gt;
This module can be considered as a cost-optimized alternative to the [http://www.aries-embedded.de/?q=MX10 MX10 module].&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
==== Featureset ====&lt;br /&gt;
* MAX 10 FPGA in F256 package&lt;br /&gt;
* Module supports wide range of the devices: from 10M04DC to 10M50DA&lt;br /&gt;
* Optional 4 MByte SPI NOR&lt;br /&gt;
* Optional 4 GByte e.MMC&lt;br /&gt;
* Optional 128/256/512MByte DDR3 DRAM (for 10M 16/25/40/50 FPGAs)&lt;br /&gt;
* Programmable clock generator and PLL, with optional external reference input&lt;br /&gt;
* 178 FPGA GPIO pins, including 13 LVDS transmitters and 54 receivers&lt;br /&gt;
* RTC with battery backup&lt;br /&gt;
* Programmable high-efficient PMIC, FPGA IO voltages are configurable&lt;br /&gt;
* Optional Li-Ion/Li-Pol charger&lt;br /&gt;
* Size: 70mm x 35mm&lt;br /&gt;
&lt;br /&gt;
==== Block Diagram ====&lt;br /&gt;
&lt;br /&gt;
:::::[[File:SpiderSoM-BD.png|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
MX10 and SpiderSoM modules provide a USB device interface implemented with a Microchip PIC16F1454 microcontroller (MCU).&amp;lt;br /&amp;gt;&lt;br /&gt;
On the host side Linux is supported as Operating System, currently Ubuntu 16.04 LTS is marked as a reference base.&amp;lt;br /&amp;gt;&lt;br /&gt;
On the SoM side the MCU is connected to three interfaces:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;UART&amp;#039;&amp;#039;&amp;#039; - Accessible as standard serial device ( &amp;#039;&amp;#039;/dev/ttyACMx&amp;#039;&amp;#039; ).&lt;br /&gt;
: Connected to the FPGA.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;I2C&amp;#039;&amp;#039;&amp;#039; - Accessible as standard i2c device ( &amp;#039;&amp;#039;/dev/i2c-x&amp;#039;&amp;#039; ). Requires [https://github.com/ARIES-Embedded/i2c-aries-emb driver].&lt;br /&gt;
: Connected to module PMIC, charge controller, RTC and FPGA.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;JTAG&amp;#039;&amp;#039;&amp;#039; - Used with OpenOCD to program the FPGA (see [[Getting Started: Quartus Prime &amp;amp; OpenOCD]] for more).&lt;br /&gt;
* Additionally the MCU implements a bootloader supporting the &amp;#039;&amp;#039;&amp;#039;DFU&amp;#039;&amp;#039;&amp;#039; (Device Firmware Update) protocol (see [[Compiling and Programming PIC Firmware]] for more).&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
==== References ====&lt;br /&gt;
&lt;br /&gt;
* [[Pin Assignment Table| Pin Assignment Table for SpiderSoM and MX10]]&lt;br /&gt;
* [[Compiling and Programming PIC Firmware]]&lt;br /&gt;
* [[Installing OpenOCD]]&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
* [[Getting Started: Quartus Prime &amp;amp; OpenOCD]]&lt;br /&gt;
* [[RISC-V &amp;amp; FreeRTOS | VectorBlox ORCA RISC-V &amp;amp; FreeRTOS]]&lt;br /&gt;
&lt;br /&gt;
==== Downloads ====&lt;br /&gt;
&lt;br /&gt;
The following components are available for download:&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/ARIES-Embedded/i2c-aries-emb Linux I2C Driver for SpiderSoM &amp;amp; MX10 on Github]&lt;br /&gt;
* [https://github.com/ARIES-Embedded/pic16f1-usb-firmware PIC Firmware for SpiderSoM &amp;amp; MX10 on GitHub]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/SpiderSoM/spidersom_V1.2_schematics_2018-05-16.pdf PDF-Schematics]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/SpiderSoM/spidersom_V1.2_project_2018-05-16.zip KiCad Project Files]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/SpiderSoM/spidersom_V1.2_bom_2018-05-26.csv Bill of Materials]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/Spiderboard/SpiderSoM/spidersom_V1.2_gerber_2018-05-16.zip Gerber Data]&lt;br /&gt;
&lt;br /&gt;
==== License ====&lt;br /&gt;
&lt;br /&gt;
The SpiderSoM is an Open Hardware. All design files are available under [[CERN_OHL_V1.2]]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=279</id>
		<title>Installing OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=279"/>
				<updated>2019-06-03T10:06:01Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* If your package distributor provides this version, use your package manager to install OpenOCD:&lt;br /&gt;
* For Debian based distributions the terminal command is:&lt;br /&gt;
*:  &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo apt install openocd&lt;br /&gt;
* If the package version does not work, it is possible to compile OpenOCD from [https://github.com/ntfreak/openocd source (github)].&lt;br /&gt;
&lt;br /&gt;
== Shell Script For Easier Use ==&lt;br /&gt;
&lt;br /&gt;
A shell script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single terminal command.&lt;br /&gt;
&lt;br /&gt;
* Create the file &amp;#039;&amp;#039;&amp;#039;mx10spider_prog&amp;#039;&amp;#039;&amp;#039; under &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; in your home directory and insert the content below.&lt;br /&gt;
* If not already done, add &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; to the path variable.&lt;br /&gt;
** Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text editor and add the line:&lt;br /&gt;
**: PATH=&amp;quot;.local/bin:$PATH&amp;quot;&lt;br /&gt;
** Logout and login again or run the following command to reload the path variable:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
* Open a terminal and add the executable flag.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; chmod +x .local/bin/mx10spider_prog&lt;br /&gt;
* You are now ready to program the fpga using the command:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog  &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
* If your project is for example located under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039;, use one of the following commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projets/Example/output_files/Example.svf&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projets/Example/output_files/Example_pof.svf&lt;br /&gt;
*: for programming the .sof or .pof file respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider_prog:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
me=$(basename $0)&lt;br /&gt;
&lt;br /&gt;
if [ -f &amp;quot;$1&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
    openocd -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd \&lt;br /&gt;
	-expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd \&lt;br /&gt;
	-expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd \&lt;br /&gt;
	-expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd \&lt;br /&gt;
	-expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf $1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tError: No file specified.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;-h&amp;quot; ] || [ &amp;quot;$1&amp;quot; = &amp;quot;--help&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo -e &amp;quot;\tUtility script to start openocd and run an svf file.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
    echo -e &amp;quot;\tFile not found: $1\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Pin_Assignment_Table&amp;diff=278</id>
		<title>Pin Assignment Table</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Pin_Assignment_Table&amp;diff=278"/>
				<updated>2019-05-28T11:30:57Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== On Module ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function  !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| CLK25_0 || PIN_H4 || PIN_F9&lt;br /&gt;
|-&lt;br /&gt;
| CLK25_1 || PIN_F13 || PIN_J12&lt;br /&gt;
|-&lt;br /&gt;
| CLK0_P || PIN_H6 || PIN_L3&lt;br /&gt;
|-&lt;br /&gt;
| CLK0_N || PIN_G5 || PIN_M3&lt;br /&gt;
|-&lt;br /&gt;
| DPCLK0  || PIN_N2 || PIN_N2?&lt;br /&gt;
|-&lt;br /&gt;
| DPCLK1 || PIN_N3 || PIN_P1&lt;br /&gt;
|-&lt;br /&gt;
| CLK2_P || PIN_G9 || -&lt;br /&gt;
|-&lt;br /&gt;
| CLK2_N || PIN_G10 || -&lt;br /&gt;
|-&lt;br /&gt;
| D1 (Red LED) || PIN_D6 || PIN_C5&lt;br /&gt;
|-&lt;br /&gt;
| D2 (Green LED) || PIN_C5 || PIN_E7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SDRAM ===&lt;br /&gt;
&lt;br /&gt;
SDRAM is available on SpiderSoM in place of DDR3.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| LDQM || PIN_K10 || -&lt;br /&gt;
|-&lt;br /&gt;
| WEN || PIN_K11 || -&lt;br /&gt;
|-&lt;br /&gt;
| RASN || PIN_J10 || -&lt;br /&gt;
|-&lt;br /&gt;
| CASN || PIN_L12 || -&lt;br /&gt;
|-&lt;br /&gt;
| UDQM || PIN_K12 || -&lt;br /&gt;
|-&lt;br /&gt;
| CSN || PIN_J12 || -&lt;br /&gt;
|-&lt;br /&gt;
| CKE || PIN_J9 || -&lt;br /&gt;
|-&lt;br /&gt;
| CLK || PIN_J13 || -&lt;br /&gt;
|-&lt;br /&gt;
| BA0 || PIN_H10 || -&lt;br /&gt;
|-&lt;br /&gt;
| BA1 || PIN_H13 || -&lt;br /&gt;
|-&lt;br /&gt;
| A0 || PIN_E9 || -&lt;br /&gt;
|-&lt;br /&gt;
| A1 || PIN_D9 || -&lt;br /&gt;
|-&lt;br /&gt;
| A2 || PIN_E10 || -&lt;br /&gt;
|-&lt;br /&gt;
| A3 || PIN_D11 || -&lt;br /&gt;
|-&lt;br /&gt;
| A4 || PIN_B13 || -&lt;br /&gt;
|-&lt;br /&gt;
| A5 || PIN_B12 || -&lt;br /&gt;
|-&lt;br /&gt;
| A6 || PIN_A12 || -&lt;br /&gt;
|-&lt;br /&gt;
| A7 || PIN_C11 || -&lt;br /&gt;
|-&lt;br /&gt;
| A8 || PIN_C12 || -&lt;br /&gt;
|-&lt;br /&gt;
| A9 || PIN_D12 || -&lt;br /&gt;
|-&lt;br /&gt;
| A10 || PIN_F8 || -&lt;br /&gt;
|-&lt;br /&gt;
| A11 || PIN_B11 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ0 || PIN_J7 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ1 || PIN_K7 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ2 || PIN_N9 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ3 || PIN_N10 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ4 || PIN_M12 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ5 || PIN_M13 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ6 || PIN_M10 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ7 || PIN_L10 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ8 || PIN_M9 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ9 || PIN_N6 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ10 || PIN_M7 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ11 || PIN_N7 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ12 || PIN_K6 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ13 || PIN_M8 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ14 || PIN_N8 || -&lt;br /&gt;
|-&lt;br /&gt;
| DQ15 || PIN_J6 || -&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DDR3 ===&lt;br /&gt;
&lt;br /&gt;
DDR3 is available on MX10 in place of SDRAM.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| CKE || - || PIN_D16&lt;br /&gt;
|-&lt;br /&gt;
| CK_N || - || PIN_C15&lt;br /&gt;
|-&lt;br /&gt;
| CK || - || PIN_D15&lt;br /&gt;
|-&lt;br /&gt;
| CS_N || - || PIN_H15&lt;br /&gt;
|-&lt;br /&gt;
| WE_N || - || PIN_J15&lt;br /&gt;
|-&lt;br /&gt;
| RESET_N || - || PIN_K15&lt;br /&gt;
|-&lt;br /&gt;
| RAS_N || - || PIN_J16&lt;br /&gt;
|-&lt;br /&gt;
| CAS_N || - || PIN_H15&lt;br /&gt;
|-&lt;br /&gt;
| ODT || - || PIN_J14&lt;br /&gt;
|-&lt;br /&gt;
| DM || - || PIN_G15&lt;br /&gt;
|-&lt;br /&gt;
| DQS_N || - || PIN_G12&lt;br /&gt;
|-&lt;br /&gt;
| DQS || - || PIN_G11&lt;br /&gt;
|-&lt;br /&gt;
| DQ0 || - || PIN_H11&lt;br /&gt;
|-&lt;br /&gt;
| DQ1 || - || PIN_H12&lt;br /&gt;
|-&lt;br /&gt;
| DQ2 || - || PIN_G14&lt;br /&gt;
|-&lt;br /&gt;
| DQ3 || - || PIN_G16&lt;br /&gt;
|-&lt;br /&gt;
| DQ4 || - || PIN_F16&lt;br /&gt;
|-&lt;br /&gt;
| DQ5 || - || PIN_F14&lt;br /&gt;
|-&lt;br /&gt;
| DQ6 || - || PIN_E15&lt;br /&gt;
|-&lt;br /&gt;
| DQ7 || - || PIN_E14&lt;br /&gt;
|-&lt;br /&gt;
| BA0 || - || PIN_D14&lt;br /&gt;
|-&lt;br /&gt;
| BA1 || - || PIN_B16&lt;br /&gt;
|-&lt;br /&gt;
| BA2 || - || PIN_C16&lt;br /&gt;
|-&lt;br /&gt;
| A0 || - || PIN_T15&lt;br /&gt;
|-&lt;br /&gt;
| A1 || - || PIN_K14&lt;br /&gt;
|-&lt;br /&gt;
| A2 || - || PIN_K12&lt;br /&gt;
|-&lt;br /&gt;
| A3 || - || PIN_K11&lt;br /&gt;
|-&lt;br /&gt;
| A4 || - || PIN_P16&lt;br /&gt;
|-&lt;br /&gt;
| A5 || - || PIN_R15&lt;br /&gt;
|-&lt;br /&gt;
| A6 || - || PIN_N16&lt;br /&gt;
|-&lt;br /&gt;
| A7 || - || PIN_M14&lt;br /&gt;
|-&lt;br /&gt;
| A8 || - || PIN_P15&lt;br /&gt;
|-&lt;br /&gt;
| A9 || - || PIN_M15&lt;br /&gt;
|-&lt;br /&gt;
| A10 || - || PIN_N14&lt;br /&gt;
|-&lt;br /&gt;
| A11 || - || PIN_L12&lt;br /&gt;
|-&lt;br /&gt;
| A12 || - || PIN_L11&lt;br /&gt;
|-&lt;br /&gt;
| A13 || - || PIN_J11&lt;br /&gt;
|-&lt;br /&gt;
| A14 || - || PIN_T14&lt;br /&gt;
|-&lt;br /&gt;
| A15 || - || PIN_C14&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== eMMC Flash ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| CMD || PIN_B10 || PIN_E10&lt;br /&gt;
|-&lt;br /&gt;
| CLK || PIN_E8 || PIN_B13&lt;br /&gt;
|-&lt;br /&gt;
| RSTN || PIN_A7 || PIN_A13&lt;br /&gt;
|-&lt;br /&gt;
| DAT0 || PIN_A6 || PIN_D12&lt;br /&gt;
|-&lt;br /&gt;
| DAT1 || PIN_E6 || PIN_C13&lt;br /&gt;
|-&lt;br /&gt;
| DAT2 || PIN_A4 || PIN_E11&lt;br /&gt;
|-&lt;br /&gt;
| DAT3 || PIN_B6 || PIN_C12&lt;br /&gt;
|-&lt;br /&gt;
| DAT4 || PIN_A3 || PIN_F11&lt;br /&gt;
|-&lt;br /&gt;
| DAT5 || PIN_B4 || PIN_A14&lt;br /&gt;
|-&lt;br /&gt;
| DAT6 || PIN_B3 || PIN_F12&lt;br /&gt;
|-&lt;br /&gt;
| DAT7 || PIN_B5 || PIN_F10&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== UART, I2C &amp;amp; SPI ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| UART_TX || PIN_G4 || PIN_H6&lt;br /&gt;
|-&lt;br /&gt;
| UART_RX || PIN_F4 || PIN_J5&lt;br /&gt;
|-&lt;br /&gt;
| I2C_SCL || PIN_H2 || PIN_J3&lt;br /&gt;
|-&lt;br /&gt;
| I2C_SDA || PIN_H3 || PIN_J2&lt;br /&gt;
|-&lt;br /&gt;
| SPI_SCLK || PIN_H9 || PIN_K5&lt;br /&gt;
|-&lt;br /&gt;
| SPI_MOSI || PIN_G13 || PIN_L2&lt;br /&gt;
|-&lt;br /&gt;
| SPI_MISO || PIN_G12 || PIN_L6&lt;br /&gt;
|-&lt;br /&gt;
| SPI_SSN || PIN_H8 || PIN_N1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== On Baseboard ==&lt;br /&gt;
&lt;br /&gt;
=== Buttons &amp;amp; LEDs ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! Description !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| D1 || LED Yellow || PIN_L2 || PIN_T6&lt;br /&gt;
|-&lt;br /&gt;
| D2 || LED Green || PIN_L1 || PIN_T12&lt;br /&gt;
|-&lt;br /&gt;
| S1 || Reset Button || PIN_B9 || PIN_B10&lt;br /&gt;
|-&lt;br /&gt;
| S3 || User Button 1 || PIN_B7 || PIN_T7&lt;br /&gt;
|-&lt;br /&gt;
| S4 || User Button 2 || PIN_A5 || PIN_T13&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== PMod ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| J2 Pin 1 || PIN_A11 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD&amp;gt;SpiderSoM: Shared with Arduino Shield&amp;lt;/ref&amp;gt;|| PIN_B4&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 2 || PIN_A10 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD /&amp;gt;|| PIN_A5&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 3 || PIN_A9 || PIN_L7&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 4 || PIN_A8 || PIN_M6&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 5 || PIN_F12 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD /&amp;gt;|| PIN_A2&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 6 || PIN_E12 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD /&amp;gt;|| PIN_A3&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 7 || PIN_C10 || PIN_P4&lt;br /&gt;
|- &lt;br /&gt;
| J2 Pin 8 || PIN_C9 || PIN_N5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| J3 Pin 1 || PIN_A2 || PIN_L8&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 2 || PIN_B2 || PIN_M7&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 3 || PIN_K1 || PIN_R6&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 4 || PIN_K2 || PIN_R5&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 5 || PIN_F9 || PIN_P5&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 6 || PIN_F10 || PIN_R4&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 7 || PIN_J1 || PIN_P6&lt;br /&gt;
|- &lt;br /&gt;
| J3 Pin 8 || PIN_J2 || PIN_R7&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| J4 Pin 1 || PIN_M1 || PIN_P9&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 2 || PIN_M2 || PIN_P8&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 3 || PIN_M4 || PIN_P13&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 4 || PIN_M5 || PIN_P12&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 5 || PIN_L3 || PIN_T11&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 6 || PIN_M3 || PIN_R10&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 7 || PIN_L4 || PIN_M8&lt;br /&gt;
|- &lt;br /&gt;
| J4 Pin 8 || PIN_L5 || PIN_M9&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| J5 Pin 1 || PIN_K8 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD /&amp;gt; || PIN_L10&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 2 || PIN_J8 &amp;lt;ref group=&amp;quot;note&amp;quot; name=ARD /&amp;gt; || PIN_M11&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 3 || PIN_N5 || PIN_L9&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 4 || PIN_N4 || PIN_M10&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 5 || PIN_L11 || PIN_T9&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 6 || PIN_M11 || PIN_R9&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 7 || PIN_J5 || PIN_T8&lt;br /&gt;
|- &lt;br /&gt;
| J5 Pin 8 || PIN_K5 || PIN_R8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Arduino Shield ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function !! SpiderSoM !! MX10&lt;br /&gt;
|-&lt;br /&gt;
| A0 || PIN_D1 || PIN_F5&lt;br /&gt;
|-&lt;br /&gt;
| A1 || PIN_C2 || PIN_F4&lt;br /&gt;
|-&lt;br /&gt;
| A2 || PIN_E3 || PIN_H5&lt;br /&gt;
|-&lt;br /&gt;
| A3 || PIN_E4 || PIN_G5&lt;br /&gt;
|-&lt;br /&gt;
| A4 &amp;lt;ref group=&amp;quot;note&amp;quot;&amp;gt; May be connected to Arduino SDA or ADC1_IN5&amp;lt;/ref&amp;gt; || PIN_C1 || PIN_G2&lt;br /&gt;
|-&lt;br /&gt;
| A5 &amp;lt;ref group=&amp;quot;note&amp;quot;&amp;gt; May be connected to Arduino SCL or ADC1_IN6&amp;lt;/ref&amp;gt; || PIN_B1 || PIN_F1&lt;br /&gt;
|-&lt;br /&gt;
| D0 || PIN_K13 || PIN_B3&lt;br /&gt;
|-&lt;br /&gt;
| D1 || PIN_E13 || PIN_A4&lt;br /&gt;
|-&lt;br /&gt;
| D2 || PIN_F12 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ2&amp;gt;SpiderSoM: Shared with PMod J2&amp;lt;/ref&amp;gt; || PIN_B9&lt;br /&gt;
|-&lt;br /&gt;
| D3 || PIN_E12 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ2 /&amp;gt; || PIN_A8&lt;br /&gt;
|-&lt;br /&gt;
| D4 || PIN_A11 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ2 /&amp;gt; || PIN_A12&lt;br /&gt;
|-&lt;br /&gt;
| D5 || PIN_A10 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ2 /&amp;gt; || PIN_A11&lt;br /&gt;
|-&lt;br /&gt;
| D6 || PIN_K8 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ5&amp;gt;SpiderSom: Shared with PMod J5&amp;lt;/ref&amp;gt; || PIN_B12&lt;br /&gt;
|-&lt;br /&gt;
| D7 || PIN_J8 &amp;lt;ref group=&amp;quot;note&amp;quot; name=PMODJ5 /&amp;gt; || PIN_B11&lt;br /&gt;
|-&lt;br /&gt;
| B0 || PIN_D8 || PIN_B8&lt;br /&gt;
|-&lt;br /&gt;
| B1 || PIN_H5 || PIN_B7&lt;br /&gt;
|-&lt;br /&gt;
| B2 || PIN_L13 || PIN_A6&lt;br /&gt;
|-&lt;br /&gt;
| B3 || PIN_H1 || PIN_A7&lt;br /&gt;
|-&lt;br /&gt;
| B4 || PIN_N11 || PIN_C6&lt;br /&gt;
|-&lt;br /&gt;
| B5 || PIN_N12 || PIN_B6&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{{notelist}}&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=277</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=277"/>
				<updated>2019-05-28T11:28:05Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make, python)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10 with atleast 8K LE, [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* Open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=276</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=276"/>
				<updated>2019-05-28T11:27:44Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] or MX10 with atleast 8K LE, [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* Open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=275</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=275"/>
				<updated>2019-05-28T10:24:47Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] (alternatively MX10) with atleast 8K LE, [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* Open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=274</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=274"/>
				<updated>2019-05-27T11:49:46Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] (alternatively MX10) with [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* Open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=273</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=273"/>
				<updated>2019-05-27T10:49:31Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] (alternatively MX10) with [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* For this, open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:spider-running-riscv-leds.png|x330px|thumb|Spider with LED PMod connected on J2 showing the binary counter.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li style=&amp;quot;display: inline-block;&amp;quot;&amp;gt; [[File:terminal_picocom.png|x330px|thumb|Characters written are looped back and displayed.]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=272</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=272"/>
				<updated>2019-05-27T10:43:41Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] (alternatively MX10) with [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* For this, open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|1200px|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_picocom.png|500px|Characters written are looped back and displayed.]]&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=File:Spider-running-riscv-leds.png&amp;diff=271</id>
		<title>File:Spider-running-riscv-leds.png</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=File:Spider-running-riscv-leds.png&amp;diff=271"/>
				<updated>2019-05-27T10:42:35Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=270</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=270"/>
				<updated>2019-05-27T09:52:10Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] (alternatively MX10) with [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=&amp;quot;/opt/riscv/bin:$PATH&amp;quot;&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|thumb|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* For this, open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_picocom.png|thumb|Characters written are looped back and displayed.]]&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=269</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=269"/>
				<updated>2019-05-27T09:51:58Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] (alternatively MX10) with [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: PATH=/opt/riscv/bin:$PATH&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|thumb|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* For this, open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_picocom.png|thumb|Characters written are looped back and displayed.]]&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=268</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=268"/>
				<updated>2019-05-27T09:45:46Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
* Linux Operating System (this guide uses Ubuntu 16.04)&lt;br /&gt;
* Utility Software (git, make)&lt;br /&gt;
* [http://fpgasoftware.intel.com/?edition=lite Quartus Prime]&lt;br /&gt;
* A [[Spiderboard_SoM|SpiderSoM]] (alternatively MX10) with [[Spiderboard_Baseboard|SpiderBase]]&lt;br /&gt;
* One of the following:&lt;br /&gt;
** [[Installing OpenOCD|OpenOCD]]&lt;br /&gt;
** USB Blaster and Quartus Programmer&lt;br /&gt;
&lt;br /&gt;
== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: This guide uses the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039;, you can substitute them if you wish.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: export PATH=/opt/riscv/bin:$PATH&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|thumb|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* For this, open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cp out/bootrom.mif ../quartus&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then type in as search path &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039; and click on the &amp;#039;&amp;#039;Add&amp;#039;&amp;#039; button.&lt;br /&gt;
[[File:quartus_setting_iploc.png|700px|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
[[File:qsys-ram-init.png|900px|Setting the memory initialization in Qsys Platform Designer]]&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_picocom.png|thumb|Characters written are looped back and displayed.]]&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=File:Qsys-ram-init.png&amp;diff=267</id>
		<title>File:Qsys-ram-init.png</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=File:Qsys-ram-init.png&amp;diff=267"/>
				<updated>2019-05-27T09:06:49Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=266</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=266"/>
				<updated>2019-05-27T08:49:01Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: In this guide the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039; were chosen.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: export PATH=/opt/riscv/bin:$PATH&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|thumb|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Then choose either RISC-V or RISC-V &amp;amp; FreeRTOS and run make.&lt;br /&gt;
* For this, open a terminal window and run the commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; wget &amp;lt;nowiki&amp;gt;ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; unzip 20190506_SpiderSoM_quartus_riscv_freertos.zip&lt;br /&gt;
** For the RISC-V standalone demo:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv&lt;br /&gt;
** Or for RISC-V with FreeRTOS:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd riscv_freertos_example/riscv_freertos&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* This will create the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initialization File) in the subfolder &amp;#039;&amp;#039;out&amp;#039;&amp;#039;.&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
[[File:quartus_setting_iploc.png|thumb|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then use as search path: &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039;&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_picocom.png|thumb|Characters written are looped back and displayed.]]&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=265</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=265"/>
				<updated>2019-05-27T08:06:48Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: In this guide the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039; were chosen.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: export PATH=/opt/riscv/bin:$PATH&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|thumb|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Open a terminal window, change directory to either &amp;#039;&amp;#039;&amp;#039;riscv_freertos_example/riscv&amp;#039;&amp;#039;&amp;#039; (for the RISC-V demo) or &amp;#039;&amp;#039;&amp;#039;riscv_freertos_example/riscv_freertos&amp;#039;&amp;#039;&amp;#039; (for the RISC-V FreeRTOS demo) and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* The folder &amp;#039;&amp;#039;out&amp;#039;&amp;#039; now contains the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initalization File).&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
[[File:quartus_setting_iploc.png|thumb|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then use as search path: &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039;&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. Per default the bootrom.mif in the quartus folder will be used.&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_picocom.png|thumb|Characters written are looped back and displayed.]]&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=264</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=264"/>
				<updated>2019-05-27T07:44:32Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: In this guide the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039; were chosen.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: export PATH=/opt/riscv/bin:$PATH&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|thumb|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Open a terminal window, change directory to either &amp;#039;&amp;#039;&amp;#039;riscv_freertos_example/riscv&amp;#039;&amp;#039;&amp;#039; (for the RISC-V demo) or &amp;#039;&amp;#039;&amp;#039;riscv_freertos_example/riscv_freertos&amp;#039;&amp;#039;&amp;#039; (for the RISC-V FreeRTOS demo) and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* The folder &amp;#039;&amp;#039;out&amp;#039;&amp;#039; now contains the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initalization File).&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
[[File:quartus_setting_iploc.png|thumb|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then use as search path: &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039;&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. (The default is to use the bootrom.mif in the quartus folder)&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_picocom.png|thumb|Characters written are looped back and displayed.]]&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=263</id>
		<title>Installing OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=263"/>
				<updated>2019-05-23T11:59:49Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* If your package distributor provides this version, use your package manager to install OpenOCD:&lt;br /&gt;
* For Debian based distributions the terminal command is:&lt;br /&gt;
*:  &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo apt install openocd&lt;br /&gt;
* If the package version does not work, it is possible to compile OpenOCD from [https://github.com/ntfreak/openocd source (github)].&lt;br /&gt;
&lt;br /&gt;
== Shell Script For Easier Use ==&lt;br /&gt;
&lt;br /&gt;
A shell script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single terminal command.&lt;br /&gt;
&lt;br /&gt;
* Create the file &amp;#039;&amp;#039;&amp;#039;mx10spider_prog&amp;#039;&amp;#039;&amp;#039; under &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; in your home directory and insert the content below.&lt;br /&gt;
* If not already done, add &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; to the path variable.&lt;br /&gt;
** Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text editor and add the line:&lt;br /&gt;
**: PATH=&amp;quot;.local/bin:$PATH&amp;quot;&lt;br /&gt;
** Logout and login again or run the following command to reload the path variable:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
* Open a terminal and add the executable flag.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; chmod +x .local/bin/mx10spider_prog&lt;br /&gt;
* You are now ready to program the fpga using the command:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog  &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
* If your project is for example located under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039;, use one of the following commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projets/Example/output_files/Example.svf&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projets/Example/output_files/Example_pof.svf&lt;br /&gt;
*: for programming the .sof or .pof file respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider_prog:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
me=$(basename $0)&lt;br /&gt;
&lt;br /&gt;
if [ -f &amp;quot;$1&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
    openocd -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd \&lt;br /&gt;
	-expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd \&lt;br /&gt;
	-expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd \&lt;br /&gt;
	-expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd \&lt;br /&gt;
	-expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf $1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;\tError: No file specified.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;-h&amp;quot; ] || [ &amp;quot;$1&amp;quot; = &amp;quot;--help&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;\tUtility script to start openocd and run an svf file.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;\tFile not found: $1\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=262</id>
		<title>Installing OpenOCD</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=Installing_OpenOCD&amp;diff=262"/>
				<updated>2019-05-23T11:58:51Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing OpenOCD ==&lt;br /&gt;
&lt;br /&gt;
* OpenOCD Version &amp;gt;= 0.10 with the libftdi driver is required.&lt;br /&gt;
* If your package distributor provides this version, use your package manager to install OpenOCD:&lt;br /&gt;
* For Debian based distributions the terminal command is:&lt;br /&gt;
*:  &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo apt install openocd&lt;br /&gt;
* If the package version does not work, it is possible to compile OpenOCD from [https://github.com/ntfreak/openocd source (github)].&lt;br /&gt;
&lt;br /&gt;
== Shell Script For Easier Use ==&lt;br /&gt;
&lt;br /&gt;
A shell script can be used that starts OpenOCD, runs the svf file and shuts down afterwards, allowing conveniently programming the FPGA using a single terminal command.&lt;br /&gt;
&lt;br /&gt;
* Create the file &amp;#039;&amp;#039;&amp;#039;mx10spider_prog&amp;#039;&amp;#039;&amp;#039; under &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; in your home directory and insert the content below.&lt;br /&gt;
* If not already done, add &amp;#039;&amp;#039;.local/bin&amp;#039;&amp;#039; to the path variable.&lt;br /&gt;
** Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text editor and add the line:&lt;br /&gt;
**: PATH=&amp;quot;.local/bin:$PATH&amp;quot;&lt;br /&gt;
** Logout and login again or run following command to reload path variable:&lt;br /&gt;
**: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
* Open a terminal and add the executable flag.&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; chmod +x .local/bin/mx10spider_prog&lt;br /&gt;
* You are now ready to program the fpga using the command:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog  &amp;#039;&amp;#039;&amp;lt;path/to/file.svf&amp;gt;&amp;#039;&amp;#039;&lt;br /&gt;
* If your project is for example located under &amp;#039;&amp;#039;/opt/quartus_projects/Example&amp;#039;&amp;#039;, use one of the following commands:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projets/Example/output_files/Example.svf&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; mx10spider_prog /opt/quartus_projets/Example/output_files/Example_pof.svf&lt;br /&gt;
*: for programming the .sof or .pof file respectively.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;mx10spider_prog:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
me=$(basename $0)&lt;br /&gt;
&lt;br /&gt;
if [ -f &amp;quot;$1&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
    openocd -c &amp;quot;interface usb_blaster&amp;quot; -c &amp;quot;usb_blaster_lowlevel_driver ftdi&amp;quot; -c &amp;quot;usb_blaster_vid_pid 0x04d8 0xefd0&amp;quot; -c &amp;quot;jtag newtap max10 tap -irlen 10 -expected-id 0x31810dd -expected-id 0x318a0dd \&lt;br /&gt;
	-expected-id 0x31820dd -expected-id 0x31830dd -expected-id 0x31840dd \&lt;br /&gt;
	-expected-id 0x318d0dd -expected-id 0x31850dd -expected-id 0x31010dd \&lt;br /&gt;
	-expected-id 0x310a0dd -expected-id 0x31020dd -expected-id 0x31030dd \&lt;br /&gt;
	-expected-id 0x31040dd -expected-id 0x310d0dd -expected-id 0x31050dd&amp;quot; -c &amp;quot;init&amp;quot; -c &amp;quot;svf $1 progress&amp;quot; -c &amp;quot;shutdown&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;\tError: No file specified.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
elif [ &amp;quot;$1&amp;quot; = &amp;quot;-h&amp;quot; ] || [ &amp;quot;$1&amp;quot; = &amp;quot;--help&amp;quot; ]; then&lt;br /&gt;
&lt;br /&gt;
	echo &amp;quot;\tUtility script to start openocd and run an svf file.\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
else&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;\tFile not found: $1\n\tUsage: $me &amp;lt;file.svf&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
fi&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=261</id>
		<title>RISC-V &amp; FreeRTOS</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=RISC-V_%26_FreeRTOS&amp;diff=261"/>
				<updated>2019-05-23T11:57:17Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installing VectorBlox ORCA Core and RISC-V Tools ==&lt;br /&gt;
&lt;br /&gt;
* Download the source from [https://github.com/VectorBlox/orca https://github.com/VectorBlox/orca] using git.&lt;br /&gt;
*: In this guide the install locations &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; and &amp;#039;&amp;#039;/opt/riscv/&amp;#039;&amp;#039; were chosen.&lt;br /&gt;
* Open a terminal window and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; &amp;lt;nowiki&amp;gt; git clone https://github.com/VectorBlox/orca.git /opt/orca &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; cd /opt/orca/tools/riscv-toolchain/&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; export RISCV_INSTALL=&amp;quot;/opt/riscv&amp;quot;&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; ./build-toolchain.sh&lt;br /&gt;
*:: Info: This may take a while.&lt;br /&gt;
* Finally, add the RISC-V tools to your path. Open &amp;#039;&amp;#039;.profile&amp;#039;&amp;#039; in your home directory with a text exitor and add the line:&lt;br /&gt;
*: export PATH=/opt/riscv/bin:$PATH&lt;br /&gt;
* After updating the path variable you may need to logout and login again or run the following command in the terminal:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; source ~/.profile&lt;br /&gt;
&lt;br /&gt;
== Compiling Firmware ==&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_make_riscv.png|thumb|Terminal after calling make.]]&lt;br /&gt;
&lt;br /&gt;
* Download the [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example] and unpack.&lt;br /&gt;
* Open a terminal window, change directory to either &amp;#039;&amp;#039;riscv_freertos_example/riscv&amp;#039;&amp;#039; or &amp;#039;&amp;#039;riscv_freertos_example/riscv_freertos&amp;#039;&amp;#039; and run:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; make&lt;br /&gt;
* The folder &amp;#039;&amp;#039;out&amp;#039;&amp;#039; now contains the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; (Memory Initalization File).&lt;br /&gt;
* Copy the &amp;#039;&amp;#039;bootrom.mif&amp;#039;&amp;#039; to &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Quartus Prime Project ==&lt;br /&gt;
&lt;br /&gt;
[[File:quartus_setting_iploc.png|thumb|Type in the search path and then click on &amp;#039;&amp;#039;Add&amp;#039;&amp;#039;.]]&lt;br /&gt;
&lt;br /&gt;
* Open Quartus Prime and load the project under &amp;#039;&amp;#039;riscv_freertos_example/quartus&amp;#039;&amp;#039;.&lt;br /&gt;
*: INFO: This Quartus project is specific to the SpiderSoM - for the MX10 the pin assignment has to be changed.&lt;br /&gt;
* Open &amp;#039;&amp;#039;&amp;#039;Assignments -&amp;gt; Settings -&amp;gt; IP Settings -&amp;gt; IP Catalog Search Locations&amp;#039;&amp;#039;&amp;#039; and add the search path to ORCA.&lt;br /&gt;
*: If ORCA was installed under &amp;#039;&amp;#039;/opt/orca/&amp;#039;&amp;#039; then use as search path: &amp;#039;&amp;#039;/opt/orca/**/*&amp;#039;&amp;#039;&lt;br /&gt;
* (Optional) Launch Qsys Platform Designer and open &amp;#039;&amp;#039;qsys.qsys&amp;#039;&amp;#039;&lt;br /&gt;
** (Optional) Under System Contents, double-click &amp;#039;&amp;#039;onchip_memory2_0&amp;#039;&amp;#039; and under memory initialization provide your bootrom.mif file. (The default is to use the bootrom.mif in the quartus folder)&lt;br /&gt;
** (Optional) Save and Generate the Qsys system.&lt;br /&gt;
* Compile the project and program it onto the FPGA using either [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via OpenOCD | OpenOCD]] or [[Getting Started: Quartus Prime &amp;amp; OpenOCD#Programming via USB Blaster| USB-Blaster]].&lt;br /&gt;
&lt;br /&gt;
After programming:&lt;br /&gt;
&lt;br /&gt;
[[File:terminal_picocom.png|thumb|Characters written are looped back and displayed.]]&lt;br /&gt;
&lt;br /&gt;
* If the red LED on the module starts blinking once per second, the FPGA was programmed successfully.&lt;br /&gt;
* If the green LED on the module starts blinking once every two seconds, the RISC-V Core and its firmware is working.&lt;br /&gt;
* PMod J2 will output a binary counter.&lt;br /&gt;
* You can use the UART of the FPGA by using standard tools such as picocom:&lt;br /&gt;
*: &amp;#039;&amp;#039;&amp;#039;$&amp;#039;&amp;#039;&amp;#039; sudo picocom -b 115200 /dev/ttyACM0&lt;br /&gt;
** Every character written is looped back and should be displayed on the terminal.&lt;br /&gt;
&lt;br /&gt;
== Downloads ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/VectorBlox/orca VectorBlox ORCA]&lt;br /&gt;
* [ftp://ftp.aries-embedded.de/products/MX10/software/demo/20190506_SpiderSoM_quartus_riscv_freertos.zip RISC-V &amp;amp; FreeRTOS Example]&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	<entry>
		<id>http://www.spiderboard.org/index.php?title=File:Quartus_setting_iploc.png&amp;diff=260</id>
		<title>File:Quartus setting iploc.png</title>
		<link rel="alternate" type="text/html" href="http://www.spiderboard.org/index.php?title=File:Quartus_setting_iploc.png&amp;diff=260"/>
				<updated>2019-05-23T11:24:59Z</updated>
		
		<summary type="html">&lt;p&gt;Js: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Js</name></author>	</entry>

	</feed>