<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.linksprite.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Youkee</id>
	<title>LinkSprite Playgound - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.linksprite.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Youkee"/>
	<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php/Special:Contributions/Youkee"/>
	<updated>2026-04-30T14:40:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=LinkNode_R4:_Arduino-compatible_WiFi_relay_controller&amp;diff=8464</id>
		<title>LinkNode R4: Arduino-compatible WiFi relay controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=LinkNode_R4:_Arduino-compatible_WiFi_relay_controller&amp;diff=8464"/>
		<updated>2016-04-29T02:38:58Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LinkNode R4 is a WiFi relay controller and it is powered by ESP-12f ESP8266 WiFi module which is comptiable with Arduino programming. There are 4 relay channels and each channel allows you to control high-power devices (up to 10 A) via the on-board relay. LinkNode R4 can be used to remotely turn lights, fans and other devices on/off. The WiFi interface will allow you to associate the board with your existing WiFi network and send the commands over the network.&lt;br /&gt;
&lt;br /&gt;
[[File:1-246.png]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
*ESP-12f ESP8266 WiFi module&lt;br /&gt;
*4 Channel relays，supporting:&lt;br /&gt;
**277V AC， 10A&lt;br /&gt;
**125V AC， 12A&lt;br /&gt;
*7-28V DC power&lt;br /&gt;
*Two work modes:&lt;br /&gt;
**Program via UART&lt;br /&gt;
**Boot from flash&lt;br /&gt;
*4 indiator LEDs&lt;br /&gt;
&lt;br /&gt;
== LinkNode R4 Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-247.png]]&lt;br /&gt;
&lt;br /&gt;
== Control logic ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-248.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Get started in Arduino programming ===&lt;br /&gt;
&lt;br /&gt;
a. Requirements&lt;br /&gt;
&lt;br /&gt;
Software&lt;br /&gt;
&lt;br /&gt;
*[https://www.arduino.cc/en/Main/Software Arduino IDE], (the latest version is 1.6.8 )&lt;br /&gt;
*The [https://github.com/esp8266/Arduino Arduino core] for LinkNode R4&lt;br /&gt;
 ** Hardware**&lt;br /&gt;
&lt;br /&gt;
*12V/1A-15V/1A DC power is recommanded.&lt;br /&gt;
*USB TTL UART cable&lt;br /&gt;
&lt;br /&gt;
b. Install Arduino core for ESP8266&lt;br /&gt;
&lt;br /&gt;
*Install Arduino 1.6.8 from the [http://www.arduino.cc/en/main/software Arduino website].&lt;br /&gt;
*Start Arduino and go to File --&amp;gt; Preferences .&lt;br /&gt;
*Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.&lt;br /&gt;
&lt;br /&gt;
[[File:1-249.png]]&lt;br /&gt;
&lt;br /&gt;
*Open Boards Manager from Tools --&amp;gt; Board menu --&amp;gt; Boards Manager. &lt;br /&gt;
&lt;br /&gt;
[[File:1-250.png]]&lt;br /&gt;
&lt;br /&gt;
*Search and install esp8266 platform (and don't forget to select your ESP8266 board from Tools --&amp;gt; Board menu after installation). &lt;br /&gt;
&lt;br /&gt;
[[File:1-251.png]]&lt;br /&gt;
&lt;br /&gt;
c. Check the configuration of Board&lt;br /&gt;
&lt;br /&gt;
Because the LinkNode R4 has not been added into the offcial ESP8266 Arduino core repository yet, so you can't find this board on the boards list, but you can use the Generic ESP8266 Module, and select Flash Mode as QIO. &lt;br /&gt;
&lt;br /&gt;
[[File:1-252.png]]&lt;br /&gt;
&lt;br /&gt;
d. Create a Arduino Project&lt;br /&gt;
&lt;br /&gt;
*Enter the following source code and compile&lt;br /&gt;
&lt;br /&gt;
  /*Turn on and off the S3 relay in every second */&lt;br /&gt;
  void setup()&lt;br /&gt;
  {&lt;br /&gt;
    pinMode(12,OUTPUT); &lt;br /&gt;
    Serial.begin(9600); &lt;br /&gt;
  }&lt;br /&gt;
  void loop()&lt;br /&gt;
  {&lt;br /&gt;
    digitalWrite(12,HIGH);&lt;br /&gt;
    Serial.println(&amp;quot;Relay ON\n&amp;quot;);&lt;br /&gt;
    delay(1000);&lt;br /&gt;
    digitalWrite(12,LOW);&lt;br /&gt;
    Serial.println(&amp;quot;Relay OFF\n&amp;quot;);&lt;br /&gt;
    delay(1000);  &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
e. Test&lt;br /&gt;
&lt;br /&gt;
[[File:1-253.png]]&lt;br /&gt;
&lt;br /&gt;
*Jump out the S5 on LinkNode R4 and select program via UART&lt;br /&gt;
*Connect DC power to LinkNode R4&lt;br /&gt;
*Connect USB TTL UART cable to UART port of LinkNode R4&lt;br /&gt;
*Connnect the other side to PC&lt;br /&gt;
*Check your serial port which your PC recognize&lt;br /&gt;
*Click the **Upload* on Arduino IDE&lt;br /&gt;
*After finished, jump out the S5 on LinkNode R4 and select boot from flash&lt;br /&gt;
&lt;br /&gt;
=== 2. Remotely control LinkNode R4 with LinkSprite.IO platform ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/YaoQ/pcduino-doc/blob/master/LinkNodeR4/www.linksprite.io LinkSprite IO] is an IoT platform which supports RESTful API and WebSocket. These make the mobile APP, website application or device connect it very easily. The following I will introduce is about how to use LinkNode R4 to communicate with LinkSprite IO platform.&lt;br /&gt;
&lt;br /&gt;
a. Create a new account and device on LinkSprite.io&lt;br /&gt;
&lt;br /&gt;
Go to [http://www.linksprite.io/ www.linksprite.io] and sign up&lt;br /&gt;
Enter your Email and password to create a new account&lt;br /&gt;
Go to My Account to get your own API Key. The API Key is fatal because only add the Key in your codes, can the data sync to your IoTgo account.&lt;br /&gt;
&lt;br /&gt;
[[File:1-254.png]]&lt;br /&gt;
&lt;br /&gt;
*Click My Device, and choose Create DIY Device.&lt;br /&gt;
&lt;br /&gt;
[[File:1-255.png]]&lt;br /&gt;
&lt;br /&gt;
*Click the created device icon and get the DeviceID.&lt;br /&gt;
&lt;br /&gt;
[[File:1-256.png]]&lt;br /&gt;
&lt;br /&gt;
b. Query the source code using your own apikey and device ID&lt;br /&gt;
&lt;br /&gt;
Device API which the LinkSprite IO support is JSON-based, which means all request and response data is enclosed in JSON format. Currently it supports 3 kind of request.&lt;br /&gt;
&lt;br /&gt;
*Update: Update device status to LinkSprite IO&lt;br /&gt;
*Query: Get device status from LinkSprite IO&lt;br /&gt;
&lt;br /&gt;
This demo will send http POST request to query the param--light on linksprite.io, if the light is on, then turn one relay on, if off, then turn off the relay.&lt;br /&gt;
&lt;br /&gt;
c. Install WiFi Manager library&lt;br /&gt;
&lt;br /&gt;
To make it more convinent, we add WiFi manager library in this demo.&lt;br /&gt;
&lt;br /&gt;
The ESP8266 WiFi Connection manager with web captive portal, this Arduino library can make configure AP's SSID and password via web page when you want LinkNode R4 to connect to AP.&lt;br /&gt;
&lt;br /&gt;
*Open Arduino IDE and go to Sketch --&amp;gt; Include Library --&amp;gt; Manage Libraries&lt;br /&gt;
*Search the wifimanager and install it&lt;br /&gt;
&lt;br /&gt;
[[File:1-257.png]]&lt;br /&gt;
&lt;br /&gt;
d. Develope source code&lt;br /&gt;
&lt;br /&gt;
*Enter the following source code&lt;br /&gt;
*Configure your apikey and deviceID in the source code&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;ESP8266WiFi.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;WString.h&amp;gt;&lt;br /&gt;
    //the library are needed for autoconfig WiFi&lt;br /&gt;
    #include &amp;lt;DNSServer.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;ESP8266WebServer.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;WiFiManager.h&amp;gt;       &lt;br /&gt;
    // replace with your own API key and device ID,&lt;br /&gt;
    String apikey = &amp;quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;;&lt;br /&gt;
    const char* deviceID=&amp;quot;xxxxxxxxxxxxx&amp;quot;;&lt;br /&gt;
   const char* server = &amp;quot;www.linksprite.io&amp;quot;;&lt;br /&gt;
  WiFiClient client;&lt;br /&gt;
  void setup() {                &lt;br /&gt;
    Serial.begin(115200);&lt;br /&gt;
    pinMode(12, OUTPUT);&lt;br /&gt;
    WiFiManager wifiManager;&lt;br /&gt;
    wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));&lt;br /&gt;
    wifiManager.autoConnect(&amp;quot;LinkNodeAP&amp;quot;);&lt;br /&gt;
    Serial.print(&amp;quot;WiFi Connected ...\n&amp;quot;);&lt;br /&gt;
    Serial.println(&amp;quot;WiFi connected&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  void loop() {&lt;br /&gt;
    if (client.connect(server,80)) {  &lt;br /&gt;
    String  postStr =&amp;quot;{&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;action\&amp;quot;:\&amp;quot;query\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;apikey\&amp;quot;:\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr += apikey;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;deviceid\&amp;quot;:\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr += deviceID;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;\&amp;quot;params\&amp;quot;:&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;[&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;\&amp;quot;light\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;]&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;}&amp;quot;;&lt;br /&gt;
       client.print(&amp;quot;POST /api/http HTTP/1.1\n&amp;quot;);&lt;br /&gt;
       client.print(&amp;quot;Host: &amp;quot;);&lt;br /&gt;
       client.print(server);&lt;br /&gt;
       client.print(&amp;quot;\nContent-Type: application/json\n&amp;quot;);&lt;br /&gt;
       client.print(&amp;quot;Content-Length: &amp;quot;);&lt;br /&gt;
       client.print(postStr.length());&lt;br /&gt;
       client.print(&amp;quot;\n\n&amp;quot;);&lt;br /&gt;
       client.print(postStr);     &lt;br /&gt;
    }&lt;br /&gt;
    delay(1000);&lt;br /&gt;
    Serial.println(&amp;quot;Store response...&amp;quot;);&lt;br /&gt;
    String request = &amp;quot;&amp;quot;;&lt;br /&gt;
    while (client.available()) {&lt;br /&gt;
      char c = client.read();&lt;br /&gt;
      request +=c;&lt;br /&gt;
    }&lt;br /&gt;
  if (request!= NULL)&lt;br /&gt;
  {&lt;br /&gt;
    int index1 = request.indexOf(&amp;quot;:{&amp;quot;);&lt;br /&gt;
    int index2 = request.indexOf(&amp;quot;},&amp;quot;);&lt;br /&gt;
    String param = request.substring(index1, index2 + 1);&lt;br /&gt;
    Serial.print(&amp;quot;The param is &amp;quot;);&lt;br /&gt;
    Serial.println(param);&lt;br /&gt;
&lt;br /&gt;
    if(param.indexOf(&amp;quot;off&amp;quot;)&amp;gt;0){&lt;br /&gt;
        digitalWrite(12, LOW);    &lt;br /&gt;
        Serial.println(&amp;quot;OFF&amp;quot;);&lt;br /&gt;
    } else if(param.indexOf(&amp;quot;on&amp;quot;)&amp;gt;0){&lt;br /&gt;
        digitalWrite(12, HIGH);    &lt;br /&gt;
        Serial.println(&amp;quot;ON&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  client.stop();&lt;br /&gt;
  Serial.println(&amp;quot;Waiting...&amp;quot;);    &lt;br /&gt;
  delay(2000);  &lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
e. Configure to accece WiFi AP&lt;br /&gt;
&lt;br /&gt;
*Take the step above to upload the program, the LinkNode R4 will create a AP called LinkNodeAP&lt;br /&gt;
*Use your mobile phone to connect this AP&lt;br /&gt;
*Open a browser and enter the ip address 10.0.1.1 and you will see the following website:&lt;br /&gt;
&lt;br /&gt;
[[File:1-258.jpg| 640px]]&lt;br /&gt;
&lt;br /&gt;
*Click the button configure WiFi&lt;br /&gt;
*Select your WiFi AP which you want to connect and enter your wifi password.&lt;br /&gt;
*If connecting failed, you can go to the same website to configure it again.&lt;br /&gt;
*Also, you can use Serial Monitor in Arduino IDE to check the status.&lt;br /&gt;
*After that, LinkNode R4 will connect to Linksprite IO via the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
f. Test&lt;br /&gt;
&lt;br /&gt;
*Open the serial monitor to check the status&lt;br /&gt;
&lt;br /&gt;
[[File:1-259.png]]&lt;br /&gt;
&lt;br /&gt;
*Open your light device which is create on linksprite.io&lt;br /&gt;
*Click the button ON and OFF&lt;br /&gt;
*Check the status of relay on LinkNode R4, is it following your control?&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=LinkNode_R4:_Arduino-compatible_WiFi_relay_controller&amp;diff=8463</id>
		<title>LinkNode R4: Arduino-compatible WiFi relay controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=LinkNode_R4:_Arduino-compatible_WiFi_relay_controller&amp;diff=8463"/>
		<updated>2016-04-29T02:38:36Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* 2. Remotely control LinkNode R4 with LinkSprite.IO platform */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LinkNode R4 is a WiFi relay controller and it is powered by ESP-12f ESP8266 WiFi module which is comptiable with Arduino programming. There are 4 relay channels and each channel allows you to control high-power devices (up to 10 A) via the on-board relay. LinkNode R4 can be used to remotely turn lights, fans and other devices on/off. The WiFi interface will allow you to associate the board with your existing WiFi network and send the commands over the network.&lt;br /&gt;
&lt;br /&gt;
[[File:1-246.png]]&lt;br /&gt;
&lt;br /&gt;
== Feature ==&lt;br /&gt;
&lt;br /&gt;
*ESP-12f ESP8266 WiFi module&lt;br /&gt;
*4 Channel relays，supporting:&lt;br /&gt;
**277V AC， 10A&lt;br /&gt;
**125V AC， 12A&lt;br /&gt;
*7-28V DC power&lt;br /&gt;
*Two work modes:&lt;br /&gt;
**Program via UART&lt;br /&gt;
**Boot from flash&lt;br /&gt;
*4 indiator LEDs&lt;br /&gt;
&lt;br /&gt;
== LinkNode R4 Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-247.png]]&lt;br /&gt;
&lt;br /&gt;
== Control logic ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-248.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Get started in Arduino programming ===&lt;br /&gt;
&lt;br /&gt;
a. Requirements&lt;br /&gt;
&lt;br /&gt;
Software&lt;br /&gt;
&lt;br /&gt;
*[https://www.arduino.cc/en/Main/Software Arduino IDE], (the latest version is 1.6.8 )&lt;br /&gt;
*The [https://github.com/esp8266/Arduino Arduino core] for LinkNode R4&lt;br /&gt;
 ** Hardware**&lt;br /&gt;
&lt;br /&gt;
*12V/1A-15V/1A DC power is recommanded.&lt;br /&gt;
*USB TTL UART cable&lt;br /&gt;
&lt;br /&gt;
b. Install Arduino core for ESP8266&lt;br /&gt;
&lt;br /&gt;
*Install Arduino 1.6.8 from the [http://www.arduino.cc/en/main/software Arduino website].&lt;br /&gt;
*Start Arduino and go to File --&amp;gt; Preferences .&lt;br /&gt;
*Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.&lt;br /&gt;
&lt;br /&gt;
[[File:1-249.png]]&lt;br /&gt;
&lt;br /&gt;
*Open Boards Manager from Tools --&amp;gt; Board menu --&amp;gt; Boards Manager. &lt;br /&gt;
&lt;br /&gt;
[[File:1-250.png]]&lt;br /&gt;
&lt;br /&gt;
*Search and install esp8266 platform (and don't forget to select your ESP8266 board from Tools --&amp;gt; Board menu after installation). &lt;br /&gt;
&lt;br /&gt;
[[File:1-251.png]]&lt;br /&gt;
&lt;br /&gt;
c. Check the configuration of Board&lt;br /&gt;
&lt;br /&gt;
Because the LinkNode R4 has not been added into the offcial ESP8266 Arduino core repository yet, so you can't find this board on the boards list, but you can use the Generic ESP8266 Module, and select Flash Mode as QIO. &lt;br /&gt;
&lt;br /&gt;
[[File:1-252.png]]&lt;br /&gt;
&lt;br /&gt;
d. Create a Arduino Project&lt;br /&gt;
&lt;br /&gt;
*Enter the following source code and compile&lt;br /&gt;
&lt;br /&gt;
  /*Turn on and off the S3 relay in every second */&lt;br /&gt;
  void setup()&lt;br /&gt;
  {&lt;br /&gt;
    pinMode(12,OUTPUT); &lt;br /&gt;
    Serial.begin(9600); &lt;br /&gt;
  }&lt;br /&gt;
  void loop()&lt;br /&gt;
  {&lt;br /&gt;
    digitalWrite(12,HIGH);&lt;br /&gt;
    Serial.println(&amp;quot;Relay ON\n&amp;quot;);&lt;br /&gt;
    delay(1000);&lt;br /&gt;
    digitalWrite(12,LOW);&lt;br /&gt;
    Serial.println(&amp;quot;Relay OFF\n&amp;quot;);&lt;br /&gt;
    delay(1000);  &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
e. Test&lt;br /&gt;
&lt;br /&gt;
[[File:1-253.png]]&lt;br /&gt;
&lt;br /&gt;
*Jump out the S5 on LinkNode R4 and select program via UART&lt;br /&gt;
*Connect DC power to LinkNode R4&lt;br /&gt;
*Connect USB TTL UART cable to UART port of LinkNode R4&lt;br /&gt;
*Connnect the other side to PC&lt;br /&gt;
*Check your serial port which your PC recognize&lt;br /&gt;
*Click the **Upload* on Arduino IDE&lt;br /&gt;
*After finished, jump out the S5 on LinkNode R4 and select boot from flash&lt;br /&gt;
&lt;br /&gt;
=== 2. Remotely control LinkNode R4 with LinkSprite.IO platform ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/YaoQ/pcduino-doc/blob/master/LinkNodeR4/www.linksprite.io LinkSprite IO] is an IoT platform which supports RESTful API and WebSocket. These make the mobile APP, website application or device connect it very easily. The following I will introduce is about how to use LinkNode R4 to communicate with LinkSprite IO platform.&lt;br /&gt;
&lt;br /&gt;
a. Create a new account and device on LinkSprite.io&lt;br /&gt;
&lt;br /&gt;
Go to [http://www.linksprite.io/ www.linksprite.io] and sign up&lt;br /&gt;
Enter your Email and password to create a new account&lt;br /&gt;
Go to My Account to get your own API Key. The API Key is fatal because only add the Key in your codes, can the data sync to your IoTgo account.&lt;br /&gt;
&lt;br /&gt;
[[File:1-254.png]]&lt;br /&gt;
&lt;br /&gt;
*Click My Device, and choose Create DIY Device.&lt;br /&gt;
&lt;br /&gt;
[[File:1-255.png]]&lt;br /&gt;
&lt;br /&gt;
*Click the created device icon and get the DeviceID.&lt;br /&gt;
&lt;br /&gt;
[[File:1-256.png]]&lt;br /&gt;
&lt;br /&gt;
b. Query the source code using your own apikey and device ID&lt;br /&gt;
&lt;br /&gt;
Device API which the LinkSprite IO support is JSON-based, which means all request and response data is enclosed in JSON format. Currently it supports 3 kind of request.&lt;br /&gt;
&lt;br /&gt;
*Update: Update device status to LinkSprite IO&lt;br /&gt;
*Query: Get device status from LinkSprite IO&lt;br /&gt;
&lt;br /&gt;
This demo will send http POST request to query the param--light on linksprite.io, if the light is on, then turn one relay on, if off, then turn off the relay.&lt;br /&gt;
&lt;br /&gt;
c. Install WiFi Manager library&lt;br /&gt;
&lt;br /&gt;
To make it more convinent, we add WiFi manager library in this demo.&lt;br /&gt;
&lt;br /&gt;
The ESP8266 WiFi Connection manager with web captive portal, this Arduino library can make configure AP's SSID and password via web page when you want LinkNode R4 to connect to AP.&lt;br /&gt;
&lt;br /&gt;
*Open Arduino IDE and go to Sketch --&amp;gt; Include Library --&amp;gt; Manage Libraries&lt;br /&gt;
*Search the wifimanager and install it&lt;br /&gt;
&lt;br /&gt;
[[File:1-257.png]]&lt;br /&gt;
&lt;br /&gt;
d. Develope source code&lt;br /&gt;
&lt;br /&gt;
*Enter the following source code&lt;br /&gt;
*Configure your apikey and deviceID in the source code&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;ESP8266WiFi.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;WString.h&amp;gt;&lt;br /&gt;
    //the library are needed for autoconfig WiFi&lt;br /&gt;
    #include &amp;lt;DNSServer.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;ESP8266WebServer.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;WiFiManager.h&amp;gt;       &lt;br /&gt;
    // replace with your own API key and device ID,&lt;br /&gt;
    String apikey = &amp;quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;;&lt;br /&gt;
    const char* deviceID=&amp;quot;xxxxxxxxxxxxx&amp;quot;;&lt;br /&gt;
   const char* server = &amp;quot;www.linksprite.io&amp;quot;;&lt;br /&gt;
  WiFiClient client;&lt;br /&gt;
  void setup() {                &lt;br /&gt;
    Serial.begin(115200);&lt;br /&gt;
    pinMode(12, OUTPUT);&lt;br /&gt;
    WiFiManager wifiManager;&lt;br /&gt;
    wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));&lt;br /&gt;
    wifiManager.autoConnect(&amp;quot;LinkNodeAP&amp;quot;);&lt;br /&gt;
    Serial.print(&amp;quot;WiFi Connected ...\n&amp;quot;);&lt;br /&gt;
    Serial.println(&amp;quot;WiFi connected&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  void loop() {&lt;br /&gt;
    if (client.connect(server,80)) {  &lt;br /&gt;
    String  postStr =&amp;quot;{&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;action\&amp;quot;:\&amp;quot;query\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;apikey\&amp;quot;:\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr += apikey;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;deviceid\&amp;quot;:\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr += deviceID;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;\&amp;quot;params\&amp;quot;:&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;[&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;\&amp;quot;light\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;]&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;}&amp;quot;;&lt;br /&gt;
       client.print(&amp;quot;POST /api/http HTTP/1.1\n&amp;quot;);&lt;br /&gt;
       client.print(&amp;quot;Host: &amp;quot;);&lt;br /&gt;
       client.print(server);&lt;br /&gt;
       client.print(&amp;quot;\nContent-Type: application/json\n&amp;quot;);&lt;br /&gt;
       client.print(&amp;quot;Content-Length: &amp;quot;);&lt;br /&gt;
       client.print(postStr.length());&lt;br /&gt;
       client.print(&amp;quot;\n\n&amp;quot;);&lt;br /&gt;
       client.print(postStr);     &lt;br /&gt;
    }&lt;br /&gt;
    delay(1000);&lt;br /&gt;
    Serial.println(&amp;quot;Store response...&amp;quot;);&lt;br /&gt;
    String request = &amp;quot;&amp;quot;;&lt;br /&gt;
    while (client.available()) {&lt;br /&gt;
      char c = client.read();&lt;br /&gt;
      request +=c;&lt;br /&gt;
    }&lt;br /&gt;
  if (request!= NULL)&lt;br /&gt;
  {&lt;br /&gt;
    int index1 = request.indexOf(&amp;quot;:{&amp;quot;);&lt;br /&gt;
    int index2 = request.indexOf(&amp;quot;},&amp;quot;);&lt;br /&gt;
    String param = request.substring(index1, index2 + 1);&lt;br /&gt;
    Serial.print(&amp;quot;The param is &amp;quot;);&lt;br /&gt;
    Serial.println(param);&lt;br /&gt;
&lt;br /&gt;
    if(param.indexOf(&amp;quot;off&amp;quot;)&amp;gt;0){&lt;br /&gt;
        digitalWrite(12, LOW);    &lt;br /&gt;
        Serial.println(&amp;quot;OFF&amp;quot;);&lt;br /&gt;
    } else if(param.indexOf(&amp;quot;on&amp;quot;)&amp;gt;0){&lt;br /&gt;
        digitalWrite(12, HIGH);    &lt;br /&gt;
        Serial.println(&amp;quot;ON&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  client.stop();&lt;br /&gt;
  Serial.println(&amp;quot;Waiting...&amp;quot;);    &lt;br /&gt;
  delay(2000);  &lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
e. Configure to accece WiFi AP&lt;br /&gt;
&lt;br /&gt;
*Take the step above to upload the program, the LinkNode R4 will create a AP called LinkNodeAP&lt;br /&gt;
*Use your mobile phone to connect this AP&lt;br /&gt;
*Open a browser and enter the ip address 10.0.1.1 and you will see the following website:&lt;br /&gt;
&lt;br /&gt;
[[File:1-258.jpg| 640px]]&lt;br /&gt;
&lt;br /&gt;
*Click the button configure WiFi&lt;br /&gt;
*Select your WiFi AP which you want to connect and enter your wifi password.&lt;br /&gt;
*If connecting failed, you can go to the same website to configure it again.&lt;br /&gt;
*Also, you can use Serial Monitor in Arduino IDE to check the status.&lt;br /&gt;
*After that, LinkNode R4 will connect to Linksprite IO via the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
f. Test&lt;br /&gt;
&lt;br /&gt;
*Open the serial monitor to check the status&lt;br /&gt;
&lt;br /&gt;
[[File:1-259.png]]&lt;br /&gt;
&lt;br /&gt;
*Open your light device which is create on linksprite.io&lt;br /&gt;
*Click the button ON and OFF&lt;br /&gt;
*Check the status of relay on LinkNode R4, is it following your control?&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=LinkNode_R8:_Arduino-compatible_WiFi_relay_controller&amp;diff=8462</id>
		<title>LinkNode R8: Arduino-compatible WiFi relay controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=LinkNode_R8:_Arduino-compatible_WiFi_relay_controller&amp;diff=8462"/>
		<updated>2016-04-29T02:36:57Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* 2. Remotely control LinkNode R8 with LinkSprite.IO platform */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LinkNode R8 is a WiFi relay controller and it is powered by ESP-12f ESP8266 WiFi module which is comptiable with Arduino programming. There are 8 relay channels and each channel allows you to control high-power devices (up to 10 A) via the on-board relay. LinkNode R8 can be used to remotely turn lights, fans and other devices on/off. The WiFi interface will allow you to associate the board with your existing WiFi network and send the commands over the network.&lt;br /&gt;
&lt;br /&gt;
[[File:1-260.jpg| 640px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
*ESP-12f ESP8266 WiFi module&lt;br /&gt;
*8 Channel relays，supporting:&lt;br /&gt;
**277V AC， 10A&lt;br /&gt;
**125V AC， 12A&lt;br /&gt;
*7-28V DC power&lt;br /&gt;
*Two work modes:&lt;br /&gt;
**Program via UART&lt;br /&gt;
**Boot from flash&lt;br /&gt;
*8 indiator LEDs&lt;br /&gt;
&lt;br /&gt;
== LinkNode R8 Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-261.png]]&lt;br /&gt;
&lt;br /&gt;
== Control logic ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-262.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Get started in Arduino programming ===&lt;br /&gt;
&lt;br /&gt;
a. Requirements&lt;br /&gt;
&lt;br /&gt;
Software&lt;br /&gt;
&lt;br /&gt;
*[https://www.arduino.cc/en/Main/Software Arduino IDE], (the latest version is 1.6.8 )&lt;br /&gt;
*The [https://github.com/esp8266/Arduino Arduino core] for LinkNode R8&lt;br /&gt;
 ** Hardware**&lt;br /&gt;
&lt;br /&gt;
*12V/1A-15V/1A DC power is recommanded.&lt;br /&gt;
*USB TTL UART cable&lt;br /&gt;
&lt;br /&gt;
b. Install Arduino core for ESP8266&lt;br /&gt;
&lt;br /&gt;
*Install Arduino 1.6.8 from the [http://www.arduino.cc/en/main/software Arduino website].&lt;br /&gt;
*Start Arduino and go to File --&amp;gt; Preferences .&lt;br /&gt;
*Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.&lt;br /&gt;
&lt;br /&gt;
[[File:1-249.png]]&lt;br /&gt;
&lt;br /&gt;
*Open Boards Manager from Tools --&amp;gt; Board menu --&amp;gt; Boards Manager. &lt;br /&gt;
&lt;br /&gt;
[[File:1-250.png]]&lt;br /&gt;
&lt;br /&gt;
*Search and install esp8266 platform (and don't forget to select your ESP8266 board from Tools --&amp;gt; Board menu after installation). &lt;br /&gt;
&lt;br /&gt;
[[File:1-251.png]]&lt;br /&gt;
&lt;br /&gt;
c. Check the configuration of Board&lt;br /&gt;
&lt;br /&gt;
Because the LinkNode R8 has not been added into the offcial ESP8266 Arduino core repository yet, so you can't find this board on the boards list, but you can use the Generic ESP8266 Module, and select Flash Mode as QIO. &lt;br /&gt;
&lt;br /&gt;
[[File:1-252.png]]&lt;br /&gt;
&lt;br /&gt;
d. Create a Arduino Project&lt;br /&gt;
&lt;br /&gt;
*Enter the following source code and compile&lt;br /&gt;
&lt;br /&gt;
  /*Turn on and off the S3 relay in every second */&lt;br /&gt;
  void setup()&lt;br /&gt;
  {&lt;br /&gt;
    pinMode(12,OUTPUT); &lt;br /&gt;
    Serial.begin(9600); &lt;br /&gt;
  }&lt;br /&gt;
  void loop()&lt;br /&gt;
  {&lt;br /&gt;
    digitalWrite(12,HIGH);&lt;br /&gt;
    Serial.println(&amp;quot;Relay ON\n&amp;quot;);&lt;br /&gt;
    delay(1000);&lt;br /&gt;
    digitalWrite(12,LOW);&lt;br /&gt;
    Serial.println(&amp;quot;Relay OFF\n&amp;quot;);&lt;br /&gt;
    delay(1000);  &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
e. Test&lt;br /&gt;
&lt;br /&gt;
[[File:1-253.png]]&lt;br /&gt;
&lt;br /&gt;
*Jump out the S5 on LinkNode R8 and select program via UART&lt;br /&gt;
*Connect DC power to LinkNode R8&lt;br /&gt;
*Connect USB TTL UART cable to UART port of LinkNode R8&lt;br /&gt;
*Connnect the other side to PC&lt;br /&gt;
*Check your serial port which your PC recognize&lt;br /&gt;
*Click the **Upload* on Arduino IDE&lt;br /&gt;
*After finished, jump out the S5 on LinkNode R8 and select boot from flash&lt;br /&gt;
&lt;br /&gt;
=== 2. Remotely control LinkNode R8 with LinkSprite.IO platform ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/YaoQ/pcduino-doc/blob/master/LinkNodeR4/www.linksprite.io LinkSprite IO] is an IoT platform which supports RESTful API and WebSocket. These make the mobile APP, website application or device connect it very easily. The following I will introduce is about how to use LinkNode R8 to communicate with LinkSprite IO platform.&lt;br /&gt;
&lt;br /&gt;
a. Create a new account and device on LinkSprite.io&lt;br /&gt;
&lt;br /&gt;
Go to [http://www.linksprite.io/ www.linksprite.io] and sign up&lt;br /&gt;
Enter your Email and password to create a new account&lt;br /&gt;
Go to My Account to get your own API Key. The API Key is fatal because only add the Key in your codes, can the data sync to your IoTgo account.&lt;br /&gt;
&lt;br /&gt;
[[File:1-254.png]]&lt;br /&gt;
&lt;br /&gt;
*Click My Device, and choose Create DIY Device.&lt;br /&gt;
&lt;br /&gt;
[[File:1-255.png]]&lt;br /&gt;
&lt;br /&gt;
*Click the created device icon and get the DeviceID.&lt;br /&gt;
&lt;br /&gt;
[[File:1-256.png]]&lt;br /&gt;
&lt;br /&gt;
b. Query the source code using your own apikey and device ID&lt;br /&gt;
&lt;br /&gt;
Device API which the LinkSprite IO support is JSON-based, which means all request and response data is enclosed in JSON format. Currently it supports 3 kind of request.&lt;br /&gt;
&lt;br /&gt;
*Update: Update device status to LinkSprite IO&lt;br /&gt;
*Query: Get device status from LinkSprite IO&lt;br /&gt;
&lt;br /&gt;
This demo will send http POST request to query the param--light on linksprite.io, if the light is on, then turn one relay on, if off, then turn off the relay.&lt;br /&gt;
&lt;br /&gt;
c. Install WiFi Manager library&lt;br /&gt;
&lt;br /&gt;
To make it more convinent, we add WiFi manager library in this demo.&lt;br /&gt;
&lt;br /&gt;
The ESP8266 WiFi Connection manager with web captive portal, this Arduino library can make configure AP's SSID and password via web page when you want LinkNode R8 to connect to AP.&lt;br /&gt;
&lt;br /&gt;
*Open Arduino IDE and go to Sketch --&amp;gt; Include Library --&amp;gt; Manage Libraries&lt;br /&gt;
*Search the wifimanager and install it&lt;br /&gt;
&lt;br /&gt;
[[File:1-257.png]]&lt;br /&gt;
&lt;br /&gt;
d. Develope source code&lt;br /&gt;
&lt;br /&gt;
*Enter the following source code&lt;br /&gt;
*Configure your apikey and deviceID in the source code&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;ESP8266WiFi.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;WString.h&amp;gt;&lt;br /&gt;
    //the library are needed for autoconfig WiFi&lt;br /&gt;
    #include &amp;lt;DNSServer.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;ESP8266WebServer.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;WiFiManager.h&amp;gt;       &lt;br /&gt;
    // replace with your own API key and device ID,&lt;br /&gt;
    String apikey = &amp;quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;;&lt;br /&gt;
    const char* deviceID=&amp;quot;xxxxxxxxxxxxx&amp;quot;;&lt;br /&gt;
   const char* server = &amp;quot;www.linksprite.io&amp;quot;;&lt;br /&gt;
  WiFiClient client;&lt;br /&gt;
  void setup() {                &lt;br /&gt;
    Serial.begin(115200);&lt;br /&gt;
    pinMode(12, OUTPUT);&lt;br /&gt;
    WiFiManager wifiManager;&lt;br /&gt;
    wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));&lt;br /&gt;
    wifiManager.autoConnect(&amp;quot;LinkNodeAP&amp;quot;);&lt;br /&gt;
    Serial.print(&amp;quot;WiFi Connected ...\n&amp;quot;);&lt;br /&gt;
    Serial.println(&amp;quot;WiFi connected&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  void loop() {&lt;br /&gt;
    if (client.connect(server,80)) {  &lt;br /&gt;
    String  postStr =&amp;quot;{&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;action\&amp;quot;:\&amp;quot;query\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;apikey\&amp;quot;:\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr += apikey;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;deviceid\&amp;quot;:\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr += deviceID;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;\&amp;quot;params\&amp;quot;:&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;[&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;\&amp;quot;light\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;]&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;}&amp;quot;;&lt;br /&gt;
       client.print(&amp;quot;POST /api/http HTTP/1.1\n&amp;quot;);&lt;br /&gt;
       client.print(&amp;quot;Host: &amp;quot;);&lt;br /&gt;
       client.print(server);&lt;br /&gt;
       client.print(&amp;quot;\nContent-Type: application/json\n&amp;quot;);&lt;br /&gt;
       client.print(&amp;quot;Content-Length: &amp;quot;);&lt;br /&gt;
       client.print(postStr.length());&lt;br /&gt;
       client.print(&amp;quot;\n\n&amp;quot;);&lt;br /&gt;
       client.print(postStr);     &lt;br /&gt;
    }&lt;br /&gt;
    delay(1000);&lt;br /&gt;
    Serial.println(&amp;quot;Store response...&amp;quot;);&lt;br /&gt;
    String request = &amp;quot;&amp;quot;;&lt;br /&gt;
    while (client.available()) {&lt;br /&gt;
      char c = client.read();&lt;br /&gt;
      request +=c;&lt;br /&gt;
    }&lt;br /&gt;
  if (request!= NULL)&lt;br /&gt;
  {&lt;br /&gt;
    int index1 = request.indexOf(&amp;quot;:{&amp;quot;);&lt;br /&gt;
    int index2 = request.indexOf(&amp;quot;},&amp;quot;);&lt;br /&gt;
    String param = request.substring(index1, index2 + 1);&lt;br /&gt;
    Serial.print(&amp;quot;The param is &amp;quot;);&lt;br /&gt;
    Serial.println(param);&lt;br /&gt;
&lt;br /&gt;
    if(param.indexOf(&amp;quot;off&amp;quot;)&amp;gt;0){&lt;br /&gt;
        digitalWrite(12, LOW);    &lt;br /&gt;
        Serial.println(&amp;quot;OFF&amp;quot;);&lt;br /&gt;
    } else if(param.indexOf(&amp;quot;on&amp;quot;)&amp;gt;0){&lt;br /&gt;
        digitalWrite(12, HIGH);    &lt;br /&gt;
        Serial.println(&amp;quot;ON&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  client.stop();&lt;br /&gt;
  Serial.println(&amp;quot;Waiting...&amp;quot;);    &lt;br /&gt;
  delay(2000);  &lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
e. Configure to accece WiFi AP&lt;br /&gt;
&lt;br /&gt;
*Take the step above to upload the program, the LinkNode R8 will create a AP called LinkNodeAP&lt;br /&gt;
*Use your mobile phone to connect this AP&lt;br /&gt;
*Open a browser and enter the ip address 10.0.1.1 and you will see the following website:&lt;br /&gt;
&lt;br /&gt;
[[File:1-258.jpg| 640px]]&lt;br /&gt;
&lt;br /&gt;
*Click the button configure WiFi&lt;br /&gt;
*Select your WiFi AP which you want to connect and enter your wifi password.&lt;br /&gt;
*If connecting failed, you can go to the same website to configure it again.&lt;br /&gt;
*Also, you can use Serial Monitor in Arduino IDE to check the status.&lt;br /&gt;
*After that, LinkNode R8 will connect to Linksprite IO via the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
f. Test&lt;br /&gt;
&lt;br /&gt;
*Open the serial monitor to check the status&lt;br /&gt;
&lt;br /&gt;
[[File:1-259.png]]&lt;br /&gt;
&lt;br /&gt;
*Open your light device which is create on linksprite.io&lt;br /&gt;
*Click the button ON and OFF&lt;br /&gt;
*Check the status of relay on LinkNode R8, is it following your control?&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=LinkNode_R8:_Arduino-compatible_WiFi_relay_controller&amp;diff=8461</id>
		<title>LinkNode R8: Arduino-compatible WiFi relay controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=LinkNode_R8:_Arduino-compatible_WiFi_relay_controller&amp;diff=8461"/>
		<updated>2016-04-29T02:35:57Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* 2. Remotely control LinkNode R8 with LinkSprite.IO platform */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LinkNode R8 is a WiFi relay controller and it is powered by ESP-12f ESP8266 WiFi module which is comptiable with Arduino programming. There are 8 relay channels and each channel allows you to control high-power devices (up to 10 A) via the on-board relay. LinkNode R8 can be used to remotely turn lights, fans and other devices on/off. The WiFi interface will allow you to associate the board with your existing WiFi network and send the commands over the network.&lt;br /&gt;
&lt;br /&gt;
[[File:1-260.jpg| 640px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
*ESP-12f ESP8266 WiFi module&lt;br /&gt;
*8 Channel relays，supporting:&lt;br /&gt;
**277V AC， 10A&lt;br /&gt;
**125V AC， 12A&lt;br /&gt;
*7-28V DC power&lt;br /&gt;
*Two work modes:&lt;br /&gt;
**Program via UART&lt;br /&gt;
**Boot from flash&lt;br /&gt;
*8 indiator LEDs&lt;br /&gt;
&lt;br /&gt;
== LinkNode R8 Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-261.png]]&lt;br /&gt;
&lt;br /&gt;
== Control logic ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-262.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Get started in Arduino programming ===&lt;br /&gt;
&lt;br /&gt;
a. Requirements&lt;br /&gt;
&lt;br /&gt;
Software&lt;br /&gt;
&lt;br /&gt;
*[https://www.arduino.cc/en/Main/Software Arduino IDE], (the latest version is 1.6.8 )&lt;br /&gt;
*The [https://github.com/esp8266/Arduino Arduino core] for LinkNode R8&lt;br /&gt;
 ** Hardware**&lt;br /&gt;
&lt;br /&gt;
*12V/1A-15V/1A DC power is recommanded.&lt;br /&gt;
*USB TTL UART cable&lt;br /&gt;
&lt;br /&gt;
b. Install Arduino core for ESP8266&lt;br /&gt;
&lt;br /&gt;
*Install Arduino 1.6.8 from the [http://www.arduino.cc/en/main/software Arduino website].&lt;br /&gt;
*Start Arduino and go to File --&amp;gt; Preferences .&lt;br /&gt;
*Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.&lt;br /&gt;
&lt;br /&gt;
[[File:1-249.png]]&lt;br /&gt;
&lt;br /&gt;
*Open Boards Manager from Tools --&amp;gt; Board menu --&amp;gt; Boards Manager. &lt;br /&gt;
&lt;br /&gt;
[[File:1-250.png]]&lt;br /&gt;
&lt;br /&gt;
*Search and install esp8266 platform (and don't forget to select your ESP8266 board from Tools --&amp;gt; Board menu after installation). &lt;br /&gt;
&lt;br /&gt;
[[File:1-251.png]]&lt;br /&gt;
&lt;br /&gt;
c. Check the configuration of Board&lt;br /&gt;
&lt;br /&gt;
Because the LinkNode R8 has not been added into the offcial ESP8266 Arduino core repository yet, so you can't find this board on the boards list, but you can use the Generic ESP8266 Module, and select Flash Mode as QIO. &lt;br /&gt;
&lt;br /&gt;
[[File:1-252.png]]&lt;br /&gt;
&lt;br /&gt;
d. Create a Arduino Project&lt;br /&gt;
&lt;br /&gt;
*Enter the following source code and compile&lt;br /&gt;
&lt;br /&gt;
  /*Turn on and off the S3 relay in every second */&lt;br /&gt;
  void setup()&lt;br /&gt;
  {&lt;br /&gt;
    pinMode(12,OUTPUT); &lt;br /&gt;
    Serial.begin(9600); &lt;br /&gt;
  }&lt;br /&gt;
  void loop()&lt;br /&gt;
  {&lt;br /&gt;
    digitalWrite(12,HIGH);&lt;br /&gt;
    Serial.println(&amp;quot;Relay ON\n&amp;quot;);&lt;br /&gt;
    delay(1000);&lt;br /&gt;
    digitalWrite(12,LOW);&lt;br /&gt;
    Serial.println(&amp;quot;Relay OFF\n&amp;quot;);&lt;br /&gt;
    delay(1000);  &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
e. Test&lt;br /&gt;
&lt;br /&gt;
[[File:1-253.png]]&lt;br /&gt;
&lt;br /&gt;
*Jump out the S5 on LinkNode R8 and select program via UART&lt;br /&gt;
*Connect DC power to LinkNode R8&lt;br /&gt;
*Connect USB TTL UART cable to UART port of LinkNode R8&lt;br /&gt;
*Connnect the other side to PC&lt;br /&gt;
*Check your serial port which your PC recognize&lt;br /&gt;
*Click the **Upload* on Arduino IDE&lt;br /&gt;
*After finished, jump out the S5 on LinkNode R8 and select boot from flash&lt;br /&gt;
&lt;br /&gt;
=== 2. Remotely control LinkNode R8 with LinkSprite.IO platform ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/YaoQ/pcduino-doc/blob/master/LinkNodeR4/www.linksprite.io LinkSprite IO] is an IoT platform which supports RESTful API and WebSocket. These make the mobile APP, website application or device connect it very easily. The following I will introduce is about how to use LinkNode R8 to communicate with LinkSprite IO platform.&lt;br /&gt;
&lt;br /&gt;
a. Create a new account and device on LinkSprite.io&lt;br /&gt;
&lt;br /&gt;
Go to [http://www.linksprite.io/ www.linksprite.io] and sign up&lt;br /&gt;
Enter your Email and password to create a new account&lt;br /&gt;
Go to My Account to get your own API Key. The API Key is fatal because only add the Key in your codes, can the data sync to your IoTgo account.&lt;br /&gt;
&lt;br /&gt;
[[File:1-254.png]]&lt;br /&gt;
&lt;br /&gt;
*Click My Device, and choose Create DIY Device.&lt;br /&gt;
&lt;br /&gt;
[[File:1-255.png]]&lt;br /&gt;
&lt;br /&gt;
*Click the created device icon and get the DeviceID.&lt;br /&gt;
&lt;br /&gt;
[[File:1-256.png]]&lt;br /&gt;
&lt;br /&gt;
b. Query the source code using your own apikey and device ID&lt;br /&gt;
&lt;br /&gt;
Device API which the LinkSprite IO support is JSON-based, which means all request and response data is enclosed in JSON format. Currently it supports 3 kind of request.&lt;br /&gt;
&lt;br /&gt;
*Update: Update device status to LinkSprite IO&lt;br /&gt;
*Query: Get device status from LinkSprite IO&lt;br /&gt;
&lt;br /&gt;
This demo will send http POST request to query the param--light on linksprite.io, if the light is on, then turn one relay on, if off, then turn off the relay.&lt;br /&gt;
&lt;br /&gt;
c. Install WiFi Manager library&lt;br /&gt;
&lt;br /&gt;
To make it more convinent, we add WiFi manager library in this demo.&lt;br /&gt;
&lt;br /&gt;
The ESP8266 WiFi Connection manager with web captive portal, this Arduino library can make configure AP's SSID and password via web page when you want LinkNode D1 to connect to AP.&lt;br /&gt;
&lt;br /&gt;
*Open Arduino IDE and go to Sketch --&amp;gt; Include Library --&amp;gt; Manage Libraries&lt;br /&gt;
*Search the wifimanager and install it&lt;br /&gt;
&lt;br /&gt;
[[File:1-257.png]]&lt;br /&gt;
&lt;br /&gt;
d. Develope source code&lt;br /&gt;
&lt;br /&gt;
*Enter the following source code&lt;br /&gt;
*Configure your apikey and deviceID in the source code&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;ESP8266WiFi.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;WString.h&amp;gt;&lt;br /&gt;
    //the library are needed for autoconfig WiFi&lt;br /&gt;
    #include &amp;lt;DNSServer.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;ESP8266WebServer.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;WiFiManager.h&amp;gt;       &lt;br /&gt;
    // replace with your own API key and device ID,&lt;br /&gt;
    String apikey = &amp;quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;;&lt;br /&gt;
    const char* deviceID=&amp;quot;xxxxxxxxxxxxx&amp;quot;;&lt;br /&gt;
   const char* server = &amp;quot;www.linksprite.io&amp;quot;;&lt;br /&gt;
  WiFiClient client;&lt;br /&gt;
  void setup() {                &lt;br /&gt;
    Serial.begin(115200);&lt;br /&gt;
    pinMode(12, OUTPUT);&lt;br /&gt;
    WiFiManager wifiManager;&lt;br /&gt;
    wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));&lt;br /&gt;
    wifiManager.autoConnect(&amp;quot;LinkNodeAP&amp;quot;);&lt;br /&gt;
    Serial.print(&amp;quot;WiFi Connected ...\n&amp;quot;);&lt;br /&gt;
    Serial.println(&amp;quot;WiFi connected&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  void loop() {&lt;br /&gt;
    if (client.connect(server,80)) {  &lt;br /&gt;
    String  postStr =&amp;quot;{&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;action\&amp;quot;:\&amp;quot;query\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;apikey\&amp;quot;:\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr += apikey;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;deviceid\&amp;quot;:\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr += deviceID;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;\&amp;quot;params\&amp;quot;:&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;[&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;\&amp;quot;light\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;]&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;}&amp;quot;;&lt;br /&gt;
       client.print(&amp;quot;POST /api/http HTTP/1.1\n&amp;quot;);&lt;br /&gt;
       client.print(&amp;quot;Host: &amp;quot;);&lt;br /&gt;
       client.print(server);&lt;br /&gt;
       client.print(&amp;quot;\nContent-Type: application/json\n&amp;quot;);&lt;br /&gt;
       client.print(&amp;quot;Content-Length: &amp;quot;);&lt;br /&gt;
       client.print(postStr.length());&lt;br /&gt;
       client.print(&amp;quot;\n\n&amp;quot;);&lt;br /&gt;
       client.print(postStr);     &lt;br /&gt;
    }&lt;br /&gt;
    delay(1000);&lt;br /&gt;
    Serial.println(&amp;quot;Store response...&amp;quot;);&lt;br /&gt;
    String request = &amp;quot;&amp;quot;;&lt;br /&gt;
    while (client.available()) {&lt;br /&gt;
      char c = client.read();&lt;br /&gt;
      request +=c;&lt;br /&gt;
    }&lt;br /&gt;
  if (request!= NULL)&lt;br /&gt;
  {&lt;br /&gt;
    int index1 = request.indexOf(&amp;quot;:{&amp;quot;);&lt;br /&gt;
    int index2 = request.indexOf(&amp;quot;},&amp;quot;);&lt;br /&gt;
    String param = request.substring(index1, index2 + 1);&lt;br /&gt;
    Serial.print(&amp;quot;The param is &amp;quot;);&lt;br /&gt;
    Serial.println(param);&lt;br /&gt;
&lt;br /&gt;
    if(param.indexOf(&amp;quot;off&amp;quot;)&amp;gt;0){&lt;br /&gt;
        digitalWrite(12, LOW);    &lt;br /&gt;
        Serial.println(&amp;quot;OFF&amp;quot;);&lt;br /&gt;
    } else if(param.indexOf(&amp;quot;on&amp;quot;)&amp;gt;0){&lt;br /&gt;
        digitalWrite(12, HIGH);    &lt;br /&gt;
        Serial.println(&amp;quot;ON&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  client.stop();&lt;br /&gt;
  Serial.println(&amp;quot;Waiting...&amp;quot;);    &lt;br /&gt;
  delay(2000);  &lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
e. Configure to accece WiFi AP&lt;br /&gt;
&lt;br /&gt;
*Take the step above to upload the program, the LinkNode R8 will create a AP called LinkNodeAP&lt;br /&gt;
*Use your mobile phone to connect this AP&lt;br /&gt;
*Open a browser and enter the ip address 10.0.1.1 and you will see the following website:&lt;br /&gt;
&lt;br /&gt;
[[File:1-258.jpg| 640px]]&lt;br /&gt;
&lt;br /&gt;
*Click the button configure WiFi&lt;br /&gt;
*Select your WiFi AP which you want to connect and enter your wifi password.&lt;br /&gt;
*If connecting failed, you can go to the same website to configure it again.&lt;br /&gt;
*Also, you can use Serial Monitor in Arduino IDE to check the status.&lt;br /&gt;
*After that, LinkNode R8 will connect to Linksprite IO via the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
f. Test&lt;br /&gt;
&lt;br /&gt;
*Open the serial monitor to check the status&lt;br /&gt;
&lt;br /&gt;
[[File:1-259.png]]&lt;br /&gt;
&lt;br /&gt;
*Open your light device which is create on linksprite.io&lt;br /&gt;
*Click the button ON and OFF&lt;br /&gt;
*Check the status of relay on LinkNode R8, is it following your control?&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=LinkNode_R8:_Arduino-compatible_WiFi_relay_controller&amp;diff=8460</id>
		<title>LinkNode R8: Arduino-compatible WiFi relay controller</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=LinkNode_R8:_Arduino-compatible_WiFi_relay_controller&amp;diff=8460"/>
		<updated>2016-04-29T02:35:34Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Features */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
LinkNode R8 is a WiFi relay controller and it is powered by ESP-12f ESP8266 WiFi module which is comptiable with Arduino programming. There are 8 relay channels and each channel allows you to control high-power devices (up to 10 A) via the on-board relay. LinkNode R8 can be used to remotely turn lights, fans and other devices on/off. The WiFi interface will allow you to associate the board with your existing WiFi network and send the commands over the network.&lt;br /&gt;
&lt;br /&gt;
[[File:1-260.jpg| 640px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
*ESP-12f ESP8266 WiFi module&lt;br /&gt;
*8 Channel relays，supporting:&lt;br /&gt;
**277V AC， 10A&lt;br /&gt;
**125V AC， 12A&lt;br /&gt;
*7-28V DC power&lt;br /&gt;
*Two work modes:&lt;br /&gt;
**Program via UART&lt;br /&gt;
**Boot from flash&lt;br /&gt;
*8 indiator LEDs&lt;br /&gt;
&lt;br /&gt;
== LinkNode R8 Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-261.png]]&lt;br /&gt;
&lt;br /&gt;
== Control logic ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-262.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Get started in Arduino programming ===&lt;br /&gt;
&lt;br /&gt;
a. Requirements&lt;br /&gt;
&lt;br /&gt;
Software&lt;br /&gt;
&lt;br /&gt;
*[https://www.arduino.cc/en/Main/Software Arduino IDE], (the latest version is 1.6.8 )&lt;br /&gt;
*The [https://github.com/esp8266/Arduino Arduino core] for LinkNode R8&lt;br /&gt;
 ** Hardware**&lt;br /&gt;
&lt;br /&gt;
*12V/1A-15V/1A DC power is recommanded.&lt;br /&gt;
*USB TTL UART cable&lt;br /&gt;
&lt;br /&gt;
b. Install Arduino core for ESP8266&lt;br /&gt;
&lt;br /&gt;
*Install Arduino 1.6.8 from the [http://www.arduino.cc/en/main/software Arduino website].&lt;br /&gt;
*Start Arduino and go to File --&amp;gt; Preferences .&lt;br /&gt;
*Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.&lt;br /&gt;
&lt;br /&gt;
[[File:1-249.png]]&lt;br /&gt;
&lt;br /&gt;
*Open Boards Manager from Tools --&amp;gt; Board menu --&amp;gt; Boards Manager. &lt;br /&gt;
&lt;br /&gt;
[[File:1-250.png]]&lt;br /&gt;
&lt;br /&gt;
*Search and install esp8266 platform (and don't forget to select your ESP8266 board from Tools --&amp;gt; Board menu after installation). &lt;br /&gt;
&lt;br /&gt;
[[File:1-251.png]]&lt;br /&gt;
&lt;br /&gt;
c. Check the configuration of Board&lt;br /&gt;
&lt;br /&gt;
Because the LinkNode R8 has not been added into the offcial ESP8266 Arduino core repository yet, so you can't find this board on the boards list, but you can use the Generic ESP8266 Module, and select Flash Mode as QIO. &lt;br /&gt;
&lt;br /&gt;
[[File:1-252.png]]&lt;br /&gt;
&lt;br /&gt;
d. Create a Arduino Project&lt;br /&gt;
&lt;br /&gt;
*Enter the following source code and compile&lt;br /&gt;
&lt;br /&gt;
  /*Turn on and off the S3 relay in every second */&lt;br /&gt;
  void setup()&lt;br /&gt;
  {&lt;br /&gt;
    pinMode(12,OUTPUT); &lt;br /&gt;
    Serial.begin(9600); &lt;br /&gt;
  }&lt;br /&gt;
  void loop()&lt;br /&gt;
  {&lt;br /&gt;
    digitalWrite(12,HIGH);&lt;br /&gt;
    Serial.println(&amp;quot;Relay ON\n&amp;quot;);&lt;br /&gt;
    delay(1000);&lt;br /&gt;
    digitalWrite(12,LOW);&lt;br /&gt;
    Serial.println(&amp;quot;Relay OFF\n&amp;quot;);&lt;br /&gt;
    delay(1000);  &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
e. Test&lt;br /&gt;
&lt;br /&gt;
[[File:1-253.png]]&lt;br /&gt;
&lt;br /&gt;
*Jump out the S5 on LinkNode R8 and select program via UART&lt;br /&gt;
*Connect DC power to LinkNode R8&lt;br /&gt;
*Connect USB TTL UART cable to UART port of LinkNode R8&lt;br /&gt;
*Connnect the other side to PC&lt;br /&gt;
*Check your serial port which your PC recognize&lt;br /&gt;
*Click the **Upload* on Arduino IDE&lt;br /&gt;
*After finished, jump out the S5 on LinkNode R8 and select boot from flash&lt;br /&gt;
&lt;br /&gt;
=== 2. Remotely control LinkNode R8 with LinkSprite.IO platform ===&lt;br /&gt;
&lt;br /&gt;
[https://github.com/YaoQ/pcduino-doc/blob/master/LinkNodeR4/www.linksprite.io LinkSprite IO] is an IoT platform which supports RESTful API and WebSocket. These make the mobile APP, website application or device connect it very easily. The following I will introduce is about how to use LinkNode D1 to communicate with LinkSprite IO platform.&lt;br /&gt;
&lt;br /&gt;
a. Create a new account and device on LinkSprite.io&lt;br /&gt;
&lt;br /&gt;
Go to [http://www.linksprite.io/ www.linksprite.io] and sign up&lt;br /&gt;
Enter your Email and password to create a new account&lt;br /&gt;
Go to My Account to get your own API Key. The API Key is fatal because only add the Key in your codes, can the data sync to your IoTgo account.&lt;br /&gt;
&lt;br /&gt;
[[File:1-254.png]]&lt;br /&gt;
&lt;br /&gt;
*Click My Device, and choose Create DIY Device.&lt;br /&gt;
&lt;br /&gt;
[[File:1-255.png]]&lt;br /&gt;
&lt;br /&gt;
*Click the created device icon and get the DeviceID.&lt;br /&gt;
&lt;br /&gt;
[[File:1-256.png]]&lt;br /&gt;
&lt;br /&gt;
b. Query the source code using your own apikey and device ID&lt;br /&gt;
&lt;br /&gt;
Device API which the LinkSprite IO support is JSON-based, which means all request and response data is enclosed in JSON format. Currently it supports 3 kind of request.&lt;br /&gt;
&lt;br /&gt;
*Update: Update device status to LinkSprite IO&lt;br /&gt;
*Query: Get device status from LinkSprite IO&lt;br /&gt;
&lt;br /&gt;
This demo will send http POST request to query the param--light on linksprite.io, if the light is on, then turn one relay on, if off, then turn off the relay.&lt;br /&gt;
&lt;br /&gt;
c. Install WiFi Manager library&lt;br /&gt;
&lt;br /&gt;
To make it more convinent, we add WiFi manager library in this demo.&lt;br /&gt;
&lt;br /&gt;
The ESP8266 WiFi Connection manager with web captive portal, this Arduino library can make configure AP's SSID and password via web page when you want LinkNode D1 to connect to AP.&lt;br /&gt;
&lt;br /&gt;
*Open Arduino IDE and go to Sketch --&amp;gt; Include Library --&amp;gt; Manage Libraries&lt;br /&gt;
*Search the wifimanager and install it&lt;br /&gt;
&lt;br /&gt;
[[File:1-257.png]]&lt;br /&gt;
&lt;br /&gt;
d. Develope source code&lt;br /&gt;
&lt;br /&gt;
*Enter the following source code&lt;br /&gt;
*Configure your apikey and deviceID in the source code&lt;br /&gt;
&lt;br /&gt;
    #include &amp;lt;ESP8266WiFi.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;WString.h&amp;gt;&lt;br /&gt;
    //the library are needed for autoconfig WiFi&lt;br /&gt;
    #include &amp;lt;DNSServer.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;ESP8266WebServer.h&amp;gt;&lt;br /&gt;
    #include &amp;lt;WiFiManager.h&amp;gt;       &lt;br /&gt;
    // replace with your own API key and device ID,&lt;br /&gt;
    String apikey = &amp;quot;xxxxxxxxxxxxxxxxxxxxxxxxxxxx&amp;quot;;&lt;br /&gt;
    const char* deviceID=&amp;quot;xxxxxxxxxxxxx&amp;quot;;&lt;br /&gt;
   const char* server = &amp;quot;www.linksprite.io&amp;quot;;&lt;br /&gt;
  WiFiClient client;&lt;br /&gt;
  void setup() {                &lt;br /&gt;
    Serial.begin(115200);&lt;br /&gt;
    pinMode(12, OUTPUT);&lt;br /&gt;
    WiFiManager wifiManager;&lt;br /&gt;
    wifiManager.setAPStaticIPConfig(IPAddress(10,0,1,1), IPAddress(10,0,1,1), IPAddress(255,255,255,0));&lt;br /&gt;
    wifiManager.autoConnect(&amp;quot;LinkNodeAP&amp;quot;);&lt;br /&gt;
    Serial.print(&amp;quot;WiFi Connected ...\n&amp;quot;);&lt;br /&gt;
    Serial.println(&amp;quot;WiFi connected&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  void loop() {&lt;br /&gt;
    if (client.connect(server,80)) {  &lt;br /&gt;
    String  postStr =&amp;quot;{&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;action\&amp;quot;:\&amp;quot;query\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;apikey\&amp;quot;:\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr += apikey;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;deviceid\&amp;quot;:\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr += deviceID;&lt;br /&gt;
            postStr +=&amp;quot;\&amp;quot;,&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;\&amp;quot;params\&amp;quot;:&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;[&amp;quot;;&lt;br /&gt;
            postStr += &amp;quot;\&amp;quot;light\&amp;quot;&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;]&amp;quot;;&lt;br /&gt;
            postStr +=&amp;quot;}&amp;quot;;&lt;br /&gt;
       client.print(&amp;quot;POST /api/http HTTP/1.1\n&amp;quot;);&lt;br /&gt;
       client.print(&amp;quot;Host: &amp;quot;);&lt;br /&gt;
       client.print(server);&lt;br /&gt;
       client.print(&amp;quot;\nContent-Type: application/json\n&amp;quot;);&lt;br /&gt;
       client.print(&amp;quot;Content-Length: &amp;quot;);&lt;br /&gt;
       client.print(postStr.length());&lt;br /&gt;
       client.print(&amp;quot;\n\n&amp;quot;);&lt;br /&gt;
       client.print(postStr);     &lt;br /&gt;
    }&lt;br /&gt;
    delay(1000);&lt;br /&gt;
    Serial.println(&amp;quot;Store response...&amp;quot;);&lt;br /&gt;
    String request = &amp;quot;&amp;quot;;&lt;br /&gt;
    while (client.available()) {&lt;br /&gt;
      char c = client.read();&lt;br /&gt;
      request +=c;&lt;br /&gt;
    }&lt;br /&gt;
  if (request!= NULL)&lt;br /&gt;
  {&lt;br /&gt;
    int index1 = request.indexOf(&amp;quot;:{&amp;quot;);&lt;br /&gt;
    int index2 = request.indexOf(&amp;quot;},&amp;quot;);&lt;br /&gt;
    String param = request.substring(index1, index2 + 1);&lt;br /&gt;
    Serial.print(&amp;quot;The param is &amp;quot;);&lt;br /&gt;
    Serial.println(param);&lt;br /&gt;
&lt;br /&gt;
    if(param.indexOf(&amp;quot;off&amp;quot;)&amp;gt;0){&lt;br /&gt;
        digitalWrite(12, LOW);    &lt;br /&gt;
        Serial.println(&amp;quot;OFF&amp;quot;);&lt;br /&gt;
    } else if(param.indexOf(&amp;quot;on&amp;quot;)&amp;gt;0){&lt;br /&gt;
        digitalWrite(12, HIGH);    &lt;br /&gt;
        Serial.println(&amp;quot;ON&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  client.stop();&lt;br /&gt;
  Serial.println(&amp;quot;Waiting...&amp;quot;);    &lt;br /&gt;
  delay(2000);  &lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
e. Configure to accece WiFi AP&lt;br /&gt;
&lt;br /&gt;
*Take the step above to upload the program, the LinkNode R8 will create a AP called LinkNodeAP&lt;br /&gt;
*Use your mobile phone to connect this AP&lt;br /&gt;
*Open a browser and enter the ip address 10.0.1.1 and you will see the following website:&lt;br /&gt;
&lt;br /&gt;
[[File:1-258.jpg| 640px]]&lt;br /&gt;
&lt;br /&gt;
*Click the button configure WiFi&lt;br /&gt;
*Select your WiFi AP which you want to connect and enter your wifi password.&lt;br /&gt;
*If connecting failed, you can go to the same website to configure it again.&lt;br /&gt;
*Also, you can use Serial Monitor in Arduino IDE to check the status.&lt;br /&gt;
*After that, LinkNode R8 will connect to Linksprite IO via the internet.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
f. Test&lt;br /&gt;
&lt;br /&gt;
*Open the serial monitor to check the status&lt;br /&gt;
&lt;br /&gt;
[[File:1-259.png]]&lt;br /&gt;
&lt;br /&gt;
*Open your light device which is create on linksprite.io&lt;br /&gt;
*Click the button ON and OFF&lt;br /&gt;
*Check the status of relay on LinkNode R8, is it following your control?&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ADC_breakout_board_for_pcDuino8_UNO&amp;diff=8051</id>
		<title>ADC breakout board for pcDuino8 UNO</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ADC_breakout_board_for_pcDuino8_UNO&amp;diff=8051"/>
		<updated>2016-02-19T06:21:07Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Quick test */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-97.png]]&lt;br /&gt;
&lt;br /&gt;
This ADC breakout board is specially designed for pcDuino8 Uno which has no on-board ADC module. It expands 6 ADC channels using ADI AD7997 12-bit ADC module which provides a I2C-compatible interface.&lt;br /&gt;
&lt;br /&gt;
== Feature ==&lt;br /&gt;
&lt;br /&gt;
* ADI AD7997 12-bit ADC chip&lt;br /&gt;
* 10- and 12-bit ADC&lt;br /&gt;
* 8 single-ended analog input channels (Only use 6 channels)&lt;br /&gt;
* I2C-compatible serial interface&lt;br /&gt;
* 3.3V power supply&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
=== Connect to pcDuino8 Uno ===&lt;br /&gt;
&lt;br /&gt;
* Solder 90° 10-pins headers on J10 of pcDuino8 Uno&lt;br /&gt;
* Plug the ADC breakout board into J10 (as shown in the following picture).&lt;br /&gt;
&lt;br /&gt;
[[File:1-98.png]]&lt;br /&gt;
&lt;br /&gt;
=== Quick test ===&lt;br /&gt;
&lt;br /&gt;
* Install additional package(s) before use '''pcduino8_uno_lib''' on pcDuino8 Uno &lt;br /&gt;
   sudo apt-get install libi2c-dev i2c-tools&lt;br /&gt;
&lt;br /&gt;
* Fetch the Arduino lib for pcDuino8 Uno&lt;br /&gt;
&lt;br /&gt;
   git clone https://github.com/pcduino/pcduino8_uno_lib&lt;br /&gt;
&lt;br /&gt;
* Clean and Compile the lib:&lt;br /&gt;
  cd pcduino8_uno_lib &lt;br /&gt;
  make clean &lt;br /&gt;
  make &lt;br /&gt;
  sudo ./output/adc_test&lt;br /&gt;
&lt;br /&gt;
* Input an analog signal on ADC0 channel&lt;br /&gt;
&lt;br /&gt;
[[File:1-99.png]]&lt;br /&gt;
&lt;br /&gt;
* The adc_test program will print the value of analog signal on ADC0 channel as default.&lt;br /&gt;
&lt;br /&gt;
=== Create your own source code for ADC ===&lt;br /&gt;
&lt;br /&gt;
Create new .c files in samples folder and modify Makefile to compile it. For example I want to create helloADC.c to read the values from all six ADC channels.&lt;br /&gt;
&lt;br /&gt;
* Create helloADC.c source file&lt;br /&gt;
&lt;br /&gt;
  vim samples/helloADC.c&lt;br /&gt;
&lt;br /&gt;
  #include &amp;lt;core.h&amp;gt;&lt;br /&gt;
  int adc_id = 0;&lt;br /&gt;
  void setup()&lt;br /&gt;
  {&lt;br /&gt;
  }&lt;br /&gt;
  void loop()&lt;br /&gt;
  {&lt;br /&gt;
     for(adc_id=0; adc_id&amp;lt;6; adc_id++)&lt;br /&gt;
     {&lt;br /&gt;
          int value = analogRead(adc_id); // get adc value&lt;br /&gt;
        printf(&amp;quot;ADC%d value is %d\n&amp;quot;,adc_id, value);&lt;br /&gt;
         delay(1000); // wait for one sec&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
* Update Makefile&lt;br /&gt;
&lt;br /&gt;
  vim samples/makefile&lt;br /&gt;
&lt;br /&gt;
* Add a line after OBJS=… and add the name of your program (without suffix ‘.c’).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  OBJS = i2c_rtc_test spi_nfc_test adc_test led_test&lt;br /&gt;
  OBJS += uart_test&lt;br /&gt;
  OBJS += helloADC&lt;br /&gt;
&lt;br /&gt;
* Compile and run:&lt;br /&gt;
&lt;br /&gt;
  make&lt;br /&gt;
  sudo output/helloADC&lt;br /&gt;
&lt;br /&gt;
Note: If you have not used the latest system image for pcDuino8 Uno, you have to use add sudo to access adc , the following content will tell you how to add permission for user linaro.&lt;br /&gt;
&lt;br /&gt;
  sudo echo &amp;quot;SUBSYSTEM==&amp;quot;i2cdev&amp;quot;, GROUP=&amp;quot;i2c&amp;quot;&amp;quot; &amp;gt; /etc/udev/rules.d/90-i2c.rules&lt;br /&gt;
  sudo useradd linaro i2c&lt;br /&gt;
  sudo reboot&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8034</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8034"/>
		<updated>2016-02-02T06:45:36Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Project Generation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| boot.bin&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin]&lt;br /&gt;
|-&lt;br /&gt;
| devicetree&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb]&lt;br /&gt;
|-&lt;br /&gt;
| kernel&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| rootfs (EXT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/rootfs/rootfs_ext4.tar.gz rootfs/rootfs_ext4.tar.gz]&lt;br /&gt;
|-&lt;br /&gt;
| sw-lib&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/tree/master/lib lib/*]&lt;br /&gt;
|-&lt;br /&gt;
| sw-app&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/tree/master/ofs-sw ofs-sw/*]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| system.bit&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/res/onetswitch_top.bit ready-to-download/res/onetswitch_top.bit]&lt;br /&gt;
|-&lt;br /&gt;
| fsbl&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/fsbl/fsbl-ons30.elf fsbl/fsbl-ons30.elf]&lt;br /&gt;
|-&lt;br /&gt;
| u-boot (FAT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ram.elf u-boot/u-boot-ons30-ram.elf]&lt;br /&gt;
|-&lt;br /&gt;
| u-boot (EXT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ext.elf u-boot/u-boot-ons30-ext.elf]&lt;br /&gt;
|-&lt;br /&gt;
| rootfs (FAT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/rootfs/uramdisk.image.gz rootfs/uramdisk.image.gz]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;fdisk -l /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fdisk /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &lt;br /&gt;
&amp;lt;blockquote&amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now configure the sectors, heads and cylinders of the SD card.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r &amp;lt;br /&amp;gt; &lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now, set the bootable flag and partition IDs &lt;br /&gt;
&amp;lt;blockquote&amp;gt; Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
mkfs.vfat -F 32 -n boot /dev/sdX1 &lt;br /&gt;
mkfs.ext4 -L root /dev/sdX2&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
Copy the boot.bin or contents of the release archive to the SD card, e.g. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open your putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the '''PATH''' environment variable has to be extended to find the newly installed tools. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; &lt;br /&gt;
source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
cd ROOT &lt;br /&gt;
source myproj.tcl&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8033</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8033"/>
		<updated>2016-02-02T06:45:04Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Project Generation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| boot.bin&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin]&lt;br /&gt;
|-&lt;br /&gt;
| devicetree&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb]&lt;br /&gt;
|-&lt;br /&gt;
| kernel&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| rootfs (EXT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/rootfs/rootfs_ext4.tar.gz rootfs/rootfs_ext4.tar.gz]&lt;br /&gt;
|-&lt;br /&gt;
| sw-lib&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/tree/master/lib lib/*]&lt;br /&gt;
|-&lt;br /&gt;
| sw-app&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/tree/master/ofs-sw ofs-sw/*]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| system.bit&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/res/onetswitch_top.bit ready-to-download/res/onetswitch_top.bit]&lt;br /&gt;
|-&lt;br /&gt;
| fsbl&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/fsbl/fsbl-ons30.elf fsbl/fsbl-ons30.elf]&lt;br /&gt;
|-&lt;br /&gt;
| u-boot (FAT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ram.elf u-boot/u-boot-ons30-ram.elf]&lt;br /&gt;
|-&lt;br /&gt;
| u-boot (EXT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ext.elf u-boot/u-boot-ons30-ext.elf]&lt;br /&gt;
|-&lt;br /&gt;
| rootfs (FAT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/rootfs/uramdisk.image.gz rootfs/uramdisk.image.gz]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;fdisk -l /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fdisk /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &lt;br /&gt;
&amp;lt;blockquote&amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now configure the sectors, heads and cylinders of the SD card.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r &amp;lt;br /&amp;gt; &lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now, set the bootable flag and partition IDs &lt;br /&gt;
&amp;lt;blockquote&amp;gt; Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
mkfs.vfat -F 32 -n boot /dev/sdX1 &lt;br /&gt;
mkfs.ext4 -L root /dev/sdX2&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
Copy the boot.bin or contents of the release archive to the SD card, e.g. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open your putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the '''PATH''' environment variable has to be extended to find the newly installed tools. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; &lt;br /&gt;
source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; cd ROOT source myproj.tcl&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8031</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8031"/>
		<updated>2016-02-02T06:43:32Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| boot.bin&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin]&lt;br /&gt;
|-&lt;br /&gt;
| devicetree&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb]&lt;br /&gt;
|-&lt;br /&gt;
| kernel&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| rootfs (EXT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/rootfs/rootfs_ext4.tar.gz rootfs/rootfs_ext4.tar.gz]&lt;br /&gt;
|-&lt;br /&gt;
| sw-lib&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/tree/master/lib lib/*]&lt;br /&gt;
|-&lt;br /&gt;
| sw-app&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/tree/master/ofs-sw ofs-sw/*]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| system.bit&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/res/onetswitch_top.bit ready-to-download/res/onetswitch_top.bit]&lt;br /&gt;
|-&lt;br /&gt;
| fsbl&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/fsbl/fsbl-ons30.elf fsbl/fsbl-ons30.elf]&lt;br /&gt;
|-&lt;br /&gt;
| u-boot (FAT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ram.elf u-boot/u-boot-ons30-ram.elf]&lt;br /&gt;
|-&lt;br /&gt;
| u-boot (EXT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ext.elf u-boot/u-boot-ons30-ext.elf]&lt;br /&gt;
|-&lt;br /&gt;
| rootfs (FAT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/rootfs/uramdisk.image.gz rootfs/uramdisk.image.gz]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;fdisk -l /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fdisk /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &lt;br /&gt;
&amp;lt;blockquote&amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now configure the sectors, heads and cylinders of the SD card.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r &amp;lt;br /&amp;gt; &lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now, set the bootable flag and partition IDs &lt;br /&gt;
&amp;lt;blockquote&amp;gt; Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
mkfs.vfat -F 32 -n boot /dev/sdX1 &lt;br /&gt;
mkfs.ext4 -L root /dev/sdX2&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
Copy the boot.bin or contents of the release archive to the SD card, e.g. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open your putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the '''PATH''' environment variable has to be extended to find the newly installed tools. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; &lt;br /&gt;
source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;bash cd ROOT source myproj.tcl&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8030</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8030"/>
		<updated>2016-02-02T06:42:23Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Task Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| boot.bin&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin]&lt;br /&gt;
|-&lt;br /&gt;
| devicetree&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb]&lt;br /&gt;
|-&lt;br /&gt;
| kernel&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| rootfs (EXT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/rootfs/rootfs_ext4.tar.gz rootfs/rootfs_ext4.tar.gz]&lt;br /&gt;
|-&lt;br /&gt;
| sw-lib&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/tree/master/lib lib/*]&lt;br /&gt;
|-&lt;br /&gt;
| sw-app&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/tree/master/ofs-sw ofs-sw/*]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| system.bit&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/res/onetswitch_top.bit ready-to-download/res/onetswitch_top.bit]&lt;br /&gt;
|-&lt;br /&gt;
| fsbl&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/fsbl/fsbl-ons30.elf fsbl/fsbl-ons30.elf]&lt;br /&gt;
|-&lt;br /&gt;
| u-boot (FAT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ram.elf u-boot/u-boot-ons30-ram.elf]&lt;br /&gt;
|-&lt;br /&gt;
| u-boot (EXT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ext.elf u-boot/u-boot-ons30-ext.elf]&lt;br /&gt;
|-&lt;br /&gt;
| rootfs (FAT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/rootfs/uramdisk.image.gz rootfs/uramdisk.image.gz]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;fdisk -l /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fdisk /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &lt;br /&gt;
&amp;lt;blockquote&amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now configure the sectors, heads and cylinders of the SD card.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r &amp;lt;br /&amp;gt; &lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now, set the bootable flag and partition IDs &lt;br /&gt;
&amp;lt;blockquote&amp;gt; Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
mkfs.vfat -F 32 -n boot /dev/sdX1 &lt;br /&gt;
mkfs.ext4 -L root /dev/sdX2&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
Copy the boot.bin or contents of the release archive to the SD card, e.g. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open your putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the '''PATH''' environment variable has to be extended to find the newly installed tools. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; &lt;br /&gt;
source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;bash cd ROOT source myproj.tcl&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8029</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8029"/>
		<updated>2016-02-02T06:41:15Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Task Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| boot.bin&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin]&lt;br /&gt;
|-&lt;br /&gt;
| devicetree&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb]&lt;br /&gt;
|-&lt;br /&gt;
| kernel&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| rootfs (EXT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/rootfs/rootfs_ext4.tar.gz rootfs/rootfs_ext4.tar.gz]&lt;br /&gt;
|-&lt;br /&gt;
| sw-lib&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/tree/master/lib lib/*]&lt;br /&gt;
|-&lt;br /&gt;
| sw-app&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/tree/master/ofs-sw ofs-sw/*]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| system.bit&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/res/onetswitch_top.bit ready-to-download/res/onetswitch_top.bit]&lt;br /&gt;
|-&lt;br /&gt;
| fsbl&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/fsbl/fsbl-ons30.elf fsbl/fsbl-ons30.elf]&lt;br /&gt;
|-&lt;br /&gt;
| u-boot (FAT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ram.elf u-boot/u-boot-ons30-ram.elf]&lt;br /&gt;
|-&lt;br /&gt;
| u-boot (EXT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ext.elf u-boot/u-boot-ons30-ext.elf]&lt;br /&gt;
|-&lt;br /&gt;
| rootfs (FAT)&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/rootfs/uramdisk.image.gz rootfs/uramdisk.image.gz]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;fdisk -l /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fdisk /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &lt;br /&gt;
&amp;lt;blockquote&amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now configure the sectors, heads and cylinders of the SD card.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r &amp;lt;br /&amp;gt; }}&lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now, set the bootable flag and partition IDs &lt;br /&gt;
&amp;lt;blockquote&amp;gt; Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered! &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
mkfs.vfat -F 32 -n boot /dev/sdX1 &lt;br /&gt;
mkfs.ext4 -L root /dev/sdX2&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
Copy the boot.bin or contents of the release archive to the SD card, e.g. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open your putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the '''PATH''' environment variable has to be extended to find the newly installed tools. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; &lt;br /&gt;
source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;bash cd ROOT source myproj.tcl&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8027</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8027"/>
		<updated>2016-02-02T06:33:35Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Task Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| boot.bin&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin]&lt;br /&gt;
| devicetree&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb]&lt;br /&gt;
| kernel&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
[[File:1-95.jpg]]&lt;br /&gt;
&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
[[File:1-96.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;fdisk -l /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this&lt;br /&gt;
{{Cquote|Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000 &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&amp;lt;br /&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fdisk /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &lt;br /&gt;
{{Cquote|Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.}}&lt;br /&gt;
&lt;br /&gt;
{{Cquote|Now configure the sectors, heads and cylinders of the SD card.&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r &amp;lt;br /&amp;gt; }}&lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&lt;br /&gt;
Now, set the bootable flag and partition IDs &amp;gt;Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered!&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
mkfs.vfat -F 32 -n boot /dev/sdX1 &lt;br /&gt;
mkfs.ext4 -L root /dev/sdX2&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
Copy the boot.bin or contents of the release archive to the SD card, e.g. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open your putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the '''PATH''' environment variable has to be extended to find the newly installed tools. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; &lt;br /&gt;
source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;bash cd ROOT source myproj.tcl&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8026</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8026"/>
		<updated>2016-02-02T06:27:50Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Task Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| boot.bin&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin]&lt;br /&gt;
| devicetree&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb]&lt;br /&gt;
| kernel&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
[[File:1-95.jpg]]&lt;br /&gt;
&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
[[File:1-96.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;fdisk -l /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this &amp;gt; Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fdisk /dev/sdX&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Now configure the sectors, heads and cylinders of the SD card.&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&lt;br /&gt;
Now, set the bootable flag and partition IDs &amp;gt;Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered!&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt; &lt;br /&gt;
mkfs.vfat -F 32 -n boot /dev/sdX1 &lt;br /&gt;
mkfs.ext4 -L root /dev/sdX2&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
Copy the boot.bin or contents of the release archive to the SD card, e.g. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
umount /mnt/boot&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open your putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the '''PATH''' environment variable has to be extended to find the newly installed tools. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; &lt;br /&gt;
source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;bash cd ROOT source myproj.tcl&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8025</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8025"/>
		<updated>2016-02-02T06:24:31Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Configuring Putty (Windows) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| boot.bin&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin]&lt;br /&gt;
| devicetree&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb]&lt;br /&gt;
| kernel&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
[[File:1-95.jpg]]&lt;br /&gt;
&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
[[File:1-96.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &amp;lt;tt&amp;gt;dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &amp;lt;tt&amp;gt;fdisk -l /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this &amp;gt; Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fdisk /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Now configure the sectors, heads and cylinders of the SD card.&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&lt;br /&gt;
Now, set the bootable flag and partition IDs &amp;gt;Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered!&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &amp;lt;tt&amp;gt;mkfs.vfat -F 32 -n boot /dev/sdX1 mkfs.ext4 -L root /dev/sdX2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &amp;lt;tt&amp;gt;mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/tt&amp;gt; Copy the boot.bin or contents of the release archive to the SD card, e.g. &amp;lt;tt&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &amp;lt;tt&amp;gt;umount /mnt/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open your putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the '''PATH''' environment variable has to be extended to find the newly installed tools. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; &lt;br /&gt;
source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;bash cd ROOT source myproj.tcl&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8024</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8024"/>
		<updated>2016-02-02T06:23:41Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Setting Up the Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| boot.bin&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin]&lt;br /&gt;
| devicetree&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb]&lt;br /&gt;
| kernel&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
[[File:1-95.jpg]]&lt;br /&gt;
&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
[[File:1-96.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &amp;lt;tt&amp;gt;dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &amp;lt;tt&amp;gt;fdisk -l /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this &amp;gt; Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fdisk /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Now configure the sectors, heads and cylinders of the SD card.&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&lt;br /&gt;
Now, set the bootable flag and partition IDs &amp;gt;Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered!&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &amp;lt;tt&amp;gt;mkfs.vfat -F 32 -n boot /dev/sdX1 mkfs.ext4 -L root /dev/sdX2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &amp;lt;tt&amp;gt;mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/tt&amp;gt; Copy the boot.bin or contents of the release archive to the SD card, e.g. &amp;lt;tt&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &amp;lt;tt&amp;gt;umount /mnt/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open you putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the '''PATH''' environment variable has to be extended to find the newly installed tools. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; &lt;br /&gt;
source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;bash cd ROOT source myproj.tcl&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8023</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8023"/>
		<updated>2016-02-02T06:23:02Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Setting Up the Tools */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; border=&amp;quot;2&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |File&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Repo&lt;br /&gt;
| style=&amp;quot;width:400px&amp;quot; |Link&lt;br /&gt;
|-&lt;br /&gt;
| boot.bin&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin]&lt;br /&gt;
| devicetree&lt;br /&gt;
| onetswitch30&lt;br /&gt;
| [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb]&lt;br /&gt;
| kernel&lt;br /&gt;
| common-bin&lt;br /&gt;
| [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
[[File:1-95.jpg]]&lt;br /&gt;
&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
[[File:1-96.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &amp;lt;tt&amp;gt;dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &amp;lt;tt&amp;gt;fdisk -l /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this &amp;gt; Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fdisk /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Now configure the sectors, heads and cylinders of the SD card.&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&lt;br /&gt;
Now, set the bootable flag and partition IDs &amp;gt;Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered!&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &amp;lt;tt&amp;gt;mkfs.vfat -F 32 -n boot /dev/sdX1 mkfs.ext4 -L root /dev/sdX2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &amp;lt;tt&amp;gt;mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/tt&amp;gt; Copy the boot.bin or contents of the release archive to the SD card, e.g. &amp;lt;tt&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &amp;lt;tt&amp;gt;umount /mnt/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open you putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the &amp;lt;math&amp;gt;PATH environment variable has to be extended to find the newly installed tools. &lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; &lt;br /&gt;
source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;bash cd ROOT source myproj.tcl&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8021</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8021"/>
		<updated>2016-02-02T06:20:00Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Downloading and installing USB to UART drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
[[File:1-94.jpg]]&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
[[File:1-95.jpg]]&lt;br /&gt;
&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
[[File:1-96.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &amp;lt;tt&amp;gt;dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &amp;lt;tt&amp;gt;fdisk -l /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this &amp;gt; Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fdisk /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Now configure the sectors, heads and cylinders of the SD card.&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&lt;br /&gt;
Now, set the bootable flag and partition IDs &amp;gt;Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered!&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &amp;lt;tt&amp;gt;mkfs.vfat -F 32 -n boot /dev/sdX1 mkfs.ext4 -L root /dev/sdX2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &amp;lt;tt&amp;gt;mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/tt&amp;gt; Copy the boot.bin or contents of the release archive to the SD card, e.g. &amp;lt;tt&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &amp;lt;tt&amp;gt;umount /mnt/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open you putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the &amp;lt;math&amp;gt;PATH environment variable has to be extended to find the newly installed tools. ```bash bash&amp;lt;/math&amp;gt; export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; bash$ source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems ``` The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;bash cd ROOT source myproj.tcl&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8020</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8020"/>
		<updated>2016-02-02T06:19:32Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Downloading and installing USB to UART drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
[[File:1-94.jpg]]&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
[[File:1-95.jpg]]&lt;br /&gt;
&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
[[File:1-96.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &amp;lt;tt&amp;gt;dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &amp;lt;tt&amp;gt;fdisk -l /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this &amp;gt; Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fdisk /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Now configure the sectors, heads and cylinders of the SD card.&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&lt;br /&gt;
Now, set the bootable flag and partition IDs &amp;gt;Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered!&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &amp;lt;tt&amp;gt;mkfs.vfat -F 32 -n boot /dev/sdX1 mkfs.ext4 -L root /dev/sdX2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &amp;lt;tt&amp;gt;mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/tt&amp;gt; Copy the boot.bin or contents of the release archive to the SD card, e.g. &amp;lt;tt&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &amp;lt;tt&amp;gt;umount /mnt/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
&amp;lt;ol start=&amp;quot;1&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;1. Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; 2. Select the appropriate driver for your machine (VCP driver Kit)&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open you putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the &amp;lt;math&amp;gt;PATH environment variable has to be extended to find the newly installed tools. ```bash bash&amp;lt;/math&amp;gt; export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; bash$ source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems ``` The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;bash cd ROOT source myproj.tcl&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8019</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=8019"/>
		<updated>2016-02-02T06:17:43Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Downloading and installing USB to UART drivers */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png|500px]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png|500px]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png|800px]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
[[File:1-94.jpg]]&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
[[File:1-95.jpg]]&lt;br /&gt;
&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
[[File:1-96.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &amp;lt;tt&amp;gt;dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &amp;lt;tt&amp;gt;fdisk -l /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this &amp;gt; Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fdisk /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Now configure the sectors, heads and cylinders of the SD card.&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&lt;br /&gt;
Now, set the bootable flag and partition IDs &amp;gt;Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered!&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &amp;lt;tt&amp;gt;mkfs.vfat -F 32 -n boot /dev/sdX1 mkfs.ext4 -L root /dev/sdX2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &amp;lt;tt&amp;gt;mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/tt&amp;gt; Copy the boot.bin or contents of the release archive to the SD card, e.g. &amp;lt;tt&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &amp;lt;tt&amp;gt;umount /mnt/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Setup a Serial Console =&lt;br /&gt;
&lt;br /&gt;
This guide will explain where and how to install the USB drivers and how to install and configure a terminal emulator which allows talking to the board.&lt;br /&gt;
&lt;br /&gt;
== Downloading and installing USB to UART drivers ==&lt;br /&gt;
&lt;br /&gt;
When using a Xilinx Development Board with a USB UART port use your mini-B USB cable to connect the USB UART port on the board to a PC. If the driver for this CP210x USB to UART bridge is recognized by your PC you may go to the next section, suggested HyperTerminal. If your USB to UART is not automatically recognized, the diver can be found and downloaded from the Silicon Labs website linked below.&lt;br /&gt;
&lt;br /&gt;
Silicon Labs Website and installation process: &lt;br /&gt;
1. Go to: [http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx Silicon Laboratories] 2. Select the appropriate driver for your machine (VCP driver Kit)&lt;br /&gt;
&lt;br /&gt;
[[File:1-89.jpg]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot; style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip CP210x_VCP_Windows to a directory&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double click on CP210xVCPInstaller_x64 (or X86 depending on the machine)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Agree to the license agreement and select finish when complete.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Terminal Emulators ==&lt;br /&gt;
&lt;br /&gt;
Common terminal emulators are: * [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty] : Select under Windows on Intel X86 &amp;quot;putty.exe&amp;quot; (the very first link) * [http://www.ayera.com/teraterm/ TeraTerm] * [http://alioth.debian.org/projects/minicom minicom]&lt;br /&gt;
&lt;br /&gt;
But there are plenty more. Just choose the one that fits you.&lt;br /&gt;
&lt;br /&gt;
== Connection Settings ==&lt;br /&gt;
&lt;br /&gt;
The settings for the serial connection may differ from board to board, but a good guess (and they work for [http://www.wiki.xilinx.com/Zynq+AP+SoC zynq]) are these settings: * baud rate = 115200 * data bits = 8 * stop bits = 1 * flow control = none * parity = none&lt;br /&gt;
&lt;br /&gt;
The serial device depends on your operating system and cable connection. On Windows the serial devices are usually called comN (N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
On Linux you'll find the serial devices in the /dev directory. Real serial devices are usually ttySN, UART via USB may be called ttyUSBN (again N = 1, 2, 3, ...).&lt;br /&gt;
&lt;br /&gt;
== Configuring Putty (Windows) ==&lt;br /&gt;
&lt;br /&gt;
# Open you putty&lt;br /&gt;
# Once open, select the option of '''Serial''' connection&amp;lt;br /&amp;gt;&lt;br /&gt;
[[File:1-90.png]]&lt;br /&gt;
# Then select '''Select''' Serial in the Category section. inlkbuthgrxfthcygukgyftrgetrxychtgyjhbkblknm;l.png&lt;br /&gt;
# To set the &amp;quot;Serial line to connect to&amp;quot; you must open the device manager to see which COM your board is connected. To open you device manager go to '''Start -&amp;gt;''' (type in search) '''Device Manager''' Go to the &amp;quot;Ports (COM &amp;amp; LPT)&amp;quot; section and look what COM your Silicon Labs USB to UART bridge is connected to&lt;br /&gt;
# Write in the correct COM that your board is connected to.&lt;br /&gt;
# Baud, section specific to the board, thus check the Getting started guide for the board that you have to get the correct baud rate.&lt;br /&gt;
&lt;br /&gt;
== Configuring minicom (Linux) ==&lt;br /&gt;
&lt;br /&gt;
Minicom should be started with the -D &amp;lt;serial device&amp;gt; command line switch e.g. &amp;lt;tt&amp;gt;minicom -D /dev/ttyUSB0&amp;lt;/tt&amp;gt; In minicom hit ctrl+a z, to get the help up. Navigate to options-&amp;gt;serial port setup and configure the line according to your target platform. &lt;br /&gt;
&lt;br /&gt;
[[File:1-91.png]]&lt;br /&gt;
&lt;br /&gt;
== Ref ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Setup+a+Serial+Consol&lt;br /&gt;
&lt;br /&gt;
= Install Xilinx Tools =&lt;br /&gt;
&lt;br /&gt;
The Xilinx tools provide all required tool chains to compile and link applications for Xilinx supported platforms, create and configure hardware designs and creating bitstreams.&lt;br /&gt;
&lt;br /&gt;
== Xilinx Vivado Tools ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.xilinx.com/support/download/index.htm Download] the Xilinx Vivado tools suite.&lt;br /&gt;
&lt;br /&gt;
Output Files Produced * Installation of Xilinx tools on user's local computer&lt;br /&gt;
&lt;br /&gt;
=== Task Description ===&lt;br /&gt;
&lt;br /&gt;
The complete hardware/software work flow for Xilinx devices relies on a number of Xilinx-provided tools. These tools are available as download for Linux and Windows based systems. Please, follow the installer to install the tools on your system. Note that the Xilinx SDK tools must also be installed for embedded linux applications.&lt;br /&gt;
&lt;br /&gt;
=== Platform specific hints &amp;amp; tips ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 users may run into issues related to missing dependencies when installing the Xilinx tools. This release of Ubuntu lacks some needed 32-bit libraries which need to be installed. This can be done by executing: &amp;lt;tt&amp;gt;bash$ sudo apt-get install ia32-libs&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Setting Up the Tools ===&lt;br /&gt;
&lt;br /&gt;
Many software items, such as Linux, use the environment variable CROSS_COMPILE, to invoke the cross compiler that is used to build it (SDK must be installed). Also the &amp;lt;math&amp;gt;PATH environment variable has to be extended to find the newly installed tools. ```bash bash&amp;lt;/math&amp;gt; export CROSS_COMPILE=&amp;lt;x-tool prefix&amp;gt; bash$ source &amp;lt;Xilinx Tools installation directory&amp;gt;/ISE_DS/settings64.sh # use settings32.sh on 32-bit operating systems ``` The Xilinx tools provide the following cross toolchains:&lt;br /&gt;
&lt;br /&gt;
[[File:1-92.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Install+Xilinx+Tools&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-88.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Reference Design =&lt;br /&gt;
&lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch dedicates to networking applications, as what the product name implies. The 'All-Programmable' allows the users to get any of their inspiration realized by customizing the gateware and/or the software.&amp;lt;br /&amp;gt;&lt;br /&gt;
Reference designs here would help you * to comprehend the usage of board components in different cases&amp;lt;br /&amp;gt;&lt;br /&gt;
* to avoid developing from scratch, especially for beginners * to share your mind and contribute to our community&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;''The letter 'O' in the product name stands for 'Open'.''&amp;lt;br /&amp;gt;&lt;br /&gt;
''We invite you to share when in such complicated network development.''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-NIC NIC]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A host running Linux with all Ethernet ports as its NICs.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-Switch Switch]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A traditional Layer 2 switch, running without Linux.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-SWFT OpenFlowSwitch(SW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A vSwitch running OpenFlow, simply on a host with NIC.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/REF-OpenFlowSwitch-HWFT OpenFlowSwitch(HW)]&amp;lt;br /&amp;gt;&lt;br /&gt;
''A hardware accelerated OFS, with both HW and SW flow tables.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Hardware Design =&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
The design for ONetSwitch hardware, i.e. the FPGA part as Programmable Logic, commonly follows a Xilinx Vivado flow.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here we provide a reference tcl script and folder structure, which show a guideline to manage the project generation and organization in Vivado, with IP package and block design integration.&amp;lt;br /&amp;gt;&lt;br /&gt;
All of our Getting-Started projects and reference designs are organized in this way.&lt;br /&gt;
&lt;br /&gt;
== Tcl Script ==&lt;br /&gt;
&lt;br /&gt;
=== Project Root ===&lt;br /&gt;
&lt;br /&gt;
The folder is assigned as the ''ROOT'', when it originally contains following * ''myproj'' (folder) stores all the design sources and tcl.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
=== IP Designs ===&lt;br /&gt;
&lt;br /&gt;
All the design sources of user IPs are listed in the folder ''ROOT/myproj/ip''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The IPs should be managed in each subfolder, e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
''ROOT/myproj/ip/my_ip_0, ROOT/myproj/ip/my_ip_1, ... ROOT/myproj/ip/my_ip_n''&lt;br /&gt;
&lt;br /&gt;
In each IP folder, e.g., ''ROOT/myproj/ip/my_ip_n'', contains typically&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''src'' (folder) contains all design sources - hdl, netlist..&amp;lt;br /&amp;gt;&lt;br /&gt;
* ''my_ip_n.tcl'' (script) to package single IP to a zip for an IP-repository.&lt;br /&gt;
&lt;br /&gt;
To generate or modify ''my_ip_n.tcl'', please follow the Vivado IP flow.&lt;br /&gt;
&lt;br /&gt;
=== IP Repository ===&lt;br /&gt;
&lt;br /&gt;
The script ''myproj.tcl'' fetches the ''ip_list'' and then sources all the ''my_ip_n.tcl'', storing the zip in a newly created folder ''ip-repo'' in the ''ROOT''.&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''ip-repo'' is a runtime folder for IP generation and package.&lt;br /&gt;
&lt;br /&gt;
Modify the ''ip_list'' variable in &amp;quot;myproj.tcl&amp;quot; to add IPs to your block design.&lt;br /&gt;
&lt;br /&gt;
=== Block Design ===&lt;br /&gt;
&lt;br /&gt;
Only one block design can be supported in this tcl script.&amp;lt;br /&amp;gt;&lt;br /&gt;
The system block design can be created by sourcing ''ROOT/myproj/bd/myproj_bd.tcl''&amp;lt;br /&amp;gt;&lt;br /&gt;
The ''myproj.tcl'' automatically generates the wrapper for the block design.&lt;br /&gt;
&lt;br /&gt;
The ''myproj_bd.tcl'' can be generated by running ''write_bd_tcl'' after a complete block design in Vivado. Please follow Vivado tcl scripting guide for details.&lt;br /&gt;
&lt;br /&gt;
=== Sources and Constraints ===&lt;br /&gt;
&lt;br /&gt;
Common hdl, netlist and constraint files can be stored and organized in ''ROOT/myproj/sources'' and ''ROOT/myproj/constrs''&amp;lt;br /&amp;gt;&lt;br /&gt;
Hierarchical folder structure is allowed.&lt;br /&gt;
&lt;br /&gt;
Simply modify the ''source_files'' and ''constr_files'' variables in ''myproj.tcl'' to add these sources to your design.&lt;br /&gt;
&lt;br /&gt;
=== Project Generation ===&lt;br /&gt;
&lt;br /&gt;
In the Vivado tcl shell, change directory to the ''ROOT'' and simply source the tcl. e.g.,&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;bash cd ROOT source myproj.tcl&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tcl collects all IPs, blockdesign(s), common hdl/netlist/constraints and then generates the project.&amp;lt;br /&amp;gt;&lt;br /&gt;
Synthesis and implementation flows can be added after that.&lt;br /&gt;
&lt;br /&gt;
=== Project Cleanup ===&lt;br /&gt;
&lt;br /&gt;
Manually (and carefully) delete all files and folders '''except''' following * ''myproj'' (folder) stores all the design sources and tcl. * ''myproj.tcl'' (script) to generate the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Build FSBL ==&lt;br /&gt;
&lt;br /&gt;
An FSBL can be generated within the template in SDK, based on the exported hardware description from Vivado system design.&amp;lt;br /&amp;gt;&lt;br /&gt;
We have done some patches to the template (for ONS30), and added functions to program the clock generator during the boot stage (for ONS30 and ONS45). So it is recommended to make use of the pre-built FSBLs directly instead of regenerating, unless the following PS clock settings doesn't meet your design. Below is a typical settings for PS Clocks configured during FSBL stage.&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the pre-built FSBL images for different boards [https://github.com/MeshSr/common-bin/tree/master/fsbl/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of FSBL changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
[[File:1-93.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Build SSBL (u-boot) ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/u-boot-meshsr Download] our official u-boot repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+U-Boot Build U-Boot] for u-boot image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build u-boot for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/u-boot-meshsr&lt;br /&gt;
cd u-boot-meshsr&lt;br /&gt;
&lt;br /&gt;
make zynq_ons20_config # OR&lt;br /&gt;
make zynq_ons30_config # OR&lt;br /&gt;
make zynq_ons45_config&lt;br /&gt;
&lt;br /&gt;
make ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
Notice that the generated file 'u-boot' should be renamed with .elf extension. And pay attention to the usage of ''mkimage''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;cp -rp ./tools/﻿mkimage &amp;lt;somewhere-in-$PATH&amp;gt;&lt;br /&gt;
mv u-boot u-boot-&amp;lt;any suffix&amp;gt;.elf&amp;lt;/source&amp;gt;&lt;br /&gt;
The official u-boot for ONetSwitch is derived from [https://github.com/Xilinx/u-boot-xlnx Xilinx u-boot].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of u-boot changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Bootloader here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built u-boot images for different boards and types of rootfs [https://github.com/MeshSr/common-bin/tree/master/u-boot/ here].&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that we prefer ''u-boot-ons*-ext.elf'' in our reference designs.&lt;br /&gt;
&lt;br /&gt;
== Build and Modify Rootfs ==&lt;br /&gt;
&lt;br /&gt;
Please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Build+and+Modify+a+Rootfs Build and Modify a Rootfs].&amp;lt;br /&amp;gt;&lt;br /&gt;
You can [https://github.com/MeshSr/common-bin/tree/master/rootfs download] a pre-built one directly from our repo.&lt;br /&gt;
&lt;br /&gt;
For ''uramdisk.image.gz'', you have to put it directly in the FAT partition and use it together with ''u-boot-ons*-ram.elf''.&amp;lt;br /&amp;gt;&lt;br /&gt;
For ''rootfs_ext4.tar.gz'', you need to extract and copy to the EXT partition with sudoer privilege, use with ''u-boot-ons*-ext.elf''.&lt;br /&gt;
&lt;br /&gt;
== Build Device Tree Blob ==&lt;br /&gt;
&lt;br /&gt;
The Xilinx Wiki [http://www.wiki.xilinx.com/Build+Device+Tree+Blob Build Device Tree Blob] provides two ways to create an original .dts.&amp;lt;br /&amp;gt;&lt;br /&gt;
Changes has been done on the original tcl-generated .dts when the ONetSwitch and certain applications require more device/driver supporting. The recommended way is to take ours as the baseline, use or make changes on our modified .dts, and finally generate the .dtb using the Linux device tree complier.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&amp;lt;path-to-kernel-src&amp;gt;/script/dtc/dtc -I dts -O dtb -o devicetree.dtb devicetree.dts&amp;lt;/source&amp;gt;&lt;br /&gt;
The modification on the devicetree is closely related to the board hardware and the driver support. Please refer to the .dts in each ready-to-download folder for more details.&lt;br /&gt;
&lt;br /&gt;
== Build Linux Kernel ==&lt;br /&gt;
&lt;br /&gt;
'''This step must be done in a Linux environment.'''&amp;lt;br /&amp;gt;&lt;br /&gt;
[https://github.com/MeshSr/linux-meshsr Download] our official Linux repo, and refer to the Xilinx Wiki [http://www.wiki.xilinx.com/Build+Kernel Build Kernel] for kernel image generation.&amp;lt;br /&amp;gt;&lt;br /&gt;
To build kernel for ONetSwitch execute&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;git clone https://github.com/MeshSr/linux-meshsr&lt;br /&gt;
cd linux-meshsr&lt;br /&gt;
&lt;br /&gt;
cp -p arch/arm/configs/meshsr_ons_defconfig .config&lt;br /&gt;
make uImage UIMAGE_LOADADDR=0x8000 ARCH=arm CROSS_COMPILE=arm-xilinx-linux-gnueabi-&amp;lt;/source&amp;gt;&lt;br /&gt;
The official Linux kernel for ONetSwitch is derived from [https://github.com/Xilinx/linux-xlnx Xilinx Linux].&amp;lt;br /&amp;gt;&lt;br /&gt;
Find the details of kernel changes comparing to the official version [https://github.com/MeshSr/wiki/wiki/Topic-Linux here].&lt;br /&gt;
&lt;br /&gt;
Find the pre-built kernel image [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage here].&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
== ONetSwitch repositories ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/onetswitch30 Getting-Started projects and reference designs for ONetSwitch30]&lt;br /&gt;
* [https://github.com/MeshSr/wiki ONetSwitch series wiki]&lt;br /&gt;
* [https://github.com/MeshSr/linux-meshsr The official Linux kernel for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common binaries for quick getting-started]&lt;br /&gt;
* [https://github.com/MeshSr/u-boot-meshsr The official u-boot for MeshSr ONetSwitch]&lt;br /&gt;
* [https://github.com/MeshSr/of-ctrl OpenFlow controller and application references]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-hw OpenFlow switch software supporting ONetSwitch hardware flow tables.]&lt;br /&gt;
* [https://github.com/MeshSr/ofs-sw OpenFlow switch software running software flow tables ONLY.]&lt;br /&gt;
&lt;br /&gt;
''By 2014 Q4, all the versions are from Vivado 2013.4''&lt;br /&gt;
&lt;br /&gt;
== Xilinx Data Sheets and User Guides ==&lt;br /&gt;
&lt;br /&gt;
* Zynq Product Table [http://www.xilinx.com/support/documentation/selection-guides/zynq7000-product-table.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Overview &amp;lt;tt&amp;gt;DS190&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds190-Zynq-7000-Overview.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7010 ~ Z-7020): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS187&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds187-XC7Z010-XC7Z020-Data-Sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq (Z-7030 ~ Z-7100): DC and AC Switching Characteristics &amp;lt;tt&amp;gt;DS191&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/data_sheets/ds191-XC7Z030-XC7Z045-data-sheet.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* Zynq Technical Reference Manual &amp;lt;tt&amp;gt;UG585&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Software Developers Guide &amp;lt;tt&amp;gt;UG821&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug821-zynq-7000-swdev.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq Packaging and Pinout &amp;lt;tt&amp;gt;UG865&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug865-Zynq-7000-Pkg-Pinout.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq PCB Design and Pin Planning Guide &amp;lt;tt&amp;gt;UG933&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/user_guides/ug933-Zynq-7000-PCB.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
* OS and Libraries Document Collection &amp;lt;tt&amp;gt;UG643&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* AXI Reference Guide &amp;lt;tt&amp;gt;UG761&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.3&amp;lt;/tt&amp;gt; [http://www.xilinx.com/support/documentation/ip_documentation/axi_ref_guide/latest/ug761_axi_reference_guide.pdf &amp;lt;tt&amp;gt;Download&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== Xilinx Intellectual Properties ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Communications&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI Ethernet''' &amp;lt;tt&amp;gt;PG138&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v6.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Ethernet 1000Base-X PCS/PMA or SGMII &amp;lt;tt&amp;gt;PG047&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v14.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Tri-Mode Ethernet MAC &amp;lt;tt&amp;gt;PG051&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI 10-Gigabit Ethernet''' &amp;lt;tt&amp;gt;PG157&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet PCS/PMA &amp;lt;tt&amp;gt;PG068&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 10-Gigabit Ethernet MAC &amp;lt;tt&amp;gt;PG072&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v13.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP XAUI &amp;lt;tt&amp;gt;PG053&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v12.1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Memory and Controllers&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP AXI DMA''' &amp;lt;tt&amp;gt;PG021&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v7.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Zynq-7000 SoC and 7 Series Devices Memory Interface Solutions &amp;lt;tt&amp;gt;UG586&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Block RAM (BRAM) Controller &amp;lt;tt&amp;gt;PG078&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI External Memory Controller (EMC) &amp;lt;tt&amp;gt;PG100&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP FIFO Generator &amp;lt;tt&amp;gt;PG057&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v11.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Block Memory Generator &amp;lt;tt&amp;gt;PG058&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Distributed Memory Generator &amp;lt;tt&amp;gt;PG063&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v8.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Interface and Interconnect&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP AXI Interconnect &amp;lt;tt&amp;gt;PG059&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream Interconnect &amp;lt;tt&amp;gt;PG035&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v1.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''LogiCORE IP AXI Bridge for PCI Express''' &amp;lt;tt&amp;gt;PG055&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* 7 Series FPGAs Integrated Block for PCI Express &amp;lt;tt&amp;gt;PG054&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP 7 Series FPGAs Transceivers Wizard &amp;lt;tt&amp;gt;PG168&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Stream FIFO &amp;lt;tt&amp;gt;PG080&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v4.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI GPIO &amp;lt;tt&amp;gt;PG144&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Embedded&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* '''LogiCORE IP Processing System 7''' &amp;lt;tt&amp;gt;PG082&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.3&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP Processor System Reset Module &amp;lt;tt&amp;gt;PG164&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI4-Lite IP Interface (IPIF) &amp;lt;tt&amp;gt;PG155&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI Ethernet Lite MAC &amp;lt;tt&amp;gt;PG135&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP AXI IIC Bus Interface &amp;lt;tt&amp;gt;PG090&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v2.0&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Misc.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
* LogiCORE IP Clocking Wizard &amp;lt;tt&amp;gt;PG065&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v5.1&amp;lt;/tt&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* LogiCORE IP IBERT for 7 Series GTX Transceivers &amp;lt;tt&amp;gt;PG132&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;v3.0&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=7998</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=7998"/>
		<updated>2016-02-02T05:03:01Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|600px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg|600px]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
| File | Repo | Link | | ---- | ---- | ---- | | boot.bin | onetswitch30 | [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin] |&amp;lt;br /&amp;gt;&lt;br /&gt;
| devicetree | onetswitch30 | [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb] |&amp;lt;br /&amp;gt;&lt;br /&gt;
| kernel | common-bin | [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage] |&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
| File | Repo | Link | | ---- | ---- | ---- | | rootfs (EXT) | common-bin | [https://github.com/MeshSr/common-bin/blob/master/rootfs/rootfs_ext4.tar.gz rootfs/rootfs_ext4.tar.gz] | | sw-lib | common-bin | [https://github.com/MeshSr/common-bin/tree/master/lib lib/*]| | sw-app | common-bin | [https://github.com/MeshSr/common-bin/tree/master/ofs-sw ofs-sw/*] |&lt;br /&gt;
&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
| File | Repo | Link | | ---- | ---- | ---- | | system.bit | onetswitch30 | [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/res/onetswitch_top.bit ready-to-download/res/onetswitch_top.bit] | | fsbl | common-bin | [https://github.com/MeshSr/common-bin/blob/master/fsbl/fsbl-ons30.elf fsbl/fsbl-ons30.elf] | | u-boot (FAT) | common-bin | [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ram.elf u-boot/u-boot-ons30-ram.elf] | | u-boot (EXT) | common-bin | [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ext.elf u-boot/u-boot-ons30-ext.elf] | | rootfs (FAT) | common-bin | [https://github.com/MeshSr/common-bin/blob/master/rootfs/uramdisk.image.gz rootfs/uramdisk.image.gz] |&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &amp;lt;tt&amp;gt;dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &amp;lt;tt&amp;gt;fdisk -l /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this &amp;gt; Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fdisk /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Now configure the sectors, heads and cylinders of the SD card.&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&lt;br /&gt;
Now, set the bootable flag and partition IDs &amp;gt;Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered!&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &amp;lt;tt&amp;gt;mkfs.vfat -F 32 -n boot /dev/sdX1 mkfs.ext4 -L root /dev/sdX2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &amp;lt;tt&amp;gt;mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/tt&amp;gt; Copy the boot.bin or contents of the release archive to the SD card, e.g. &amp;lt;tt&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &amp;lt;tt&amp;gt;umount /mnt/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.jpg]]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=7997</id>
		<title>ONetSwitch30</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=ONetSwitch30&amp;diff=7997"/>
		<updated>2016-02-02T05:02:34Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ONetSwitch30 =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-85.jpg|500px]] &lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is an All Programmable open networking innovation platform.&lt;br /&gt;
&lt;br /&gt;
'''ONetSwitch30''' is based on the Xilinx Zynq-7000 SoC, and mainly adopts the Gigabit ports. It can achieve a comprehensive experiment platform integrating calculations, storage, networks and interconnection by extension. Both its software and hardware can realize custom programming. Its reference designs are abundant and flexible, can be used to various researches on the evolution of network prototypes, and the development of customized network products. Especially, the features of the miniaturization and low power are adapted to the multi-node network tests and deployments.&lt;br /&gt;
&lt;br /&gt;
[[File:1-86.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
* General&lt;br /&gt;
* Main Silicon ''XC7Z030-2SBG485''&lt;br /&gt;
* Power Supply ''DC 12V''&lt;br /&gt;
* Primary Config. ''TF card''&lt;br /&gt;
* Auxiliary Config. ''QSPI flash/JTAG''&lt;br /&gt;
* Processing System&lt;br /&gt;
* Processor _Dual ARM Cortex-A9@800MHz_&lt;br /&gt;
* Cache ''(L1)32KB Inst. + 32KB Data per core; (L2)512KB; (OCM)256KB''&lt;br /&gt;
* DRAM ''DDR3 1GBytes''&lt;br /&gt;
* Flash ''Quad SPI flash 256Mb''&lt;br /&gt;
* DMA ''8 channel (4 for Programmable Logic)''&lt;br /&gt;
* Ethernet ''1x GE RJ45''&lt;br /&gt;
* Peripherals ''USB / USB-UART / USB JTAG / TF card''&lt;br /&gt;
* Programmable Logic&lt;br /&gt;
* FPGA Logic ''125K LCs, Kintex-7, ~1.9M ASIC gates''&lt;br /&gt;
* Host I/F ''AMBA AXI4 interconnect, max 100Gbps between PS-PL''&lt;br /&gt;
* DRAM ''DDR3 2GBytes''&lt;br /&gt;
* Ethernet ''4x GE RJ45''&lt;br /&gt;
* Peripherals ''2x PMOD''&lt;br /&gt;
* User IO ''user LEDs/push buttons/DIP switch''&lt;br /&gt;
* Extension ''mini PCIe for wireless NIC or SSD''&lt;br /&gt;
&lt;br /&gt;
== Block Diagram ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-82.png]]&lt;br /&gt;
&lt;br /&gt;
== Board Layout ==&lt;br /&gt;
&lt;br /&gt;
[[File:1-83.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-84.png]]&lt;br /&gt;
&lt;br /&gt;
== Specification ==&lt;br /&gt;
&lt;br /&gt;
For details of the board hardware, please download the [https://github.com/MeshSr/wiki/blob/master/doc/msr-ons30-hwug.pdf ONetSwitch30 Hardware User Guide].&lt;br /&gt;
&lt;br /&gt;
= workflow =&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
A bottom-up approach is recommended when developing on the Xilinx Zynq SoC-based ONetSwitch.&amp;lt;br /&amp;gt;&lt;br /&gt;
The figure below from [http://www.wiki.xilinx.com/ Xilinx Wiki] shows a high level block diagram of the Xilinx design flow for Zynq AP SoC.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.png]&lt;br /&gt;
&lt;br /&gt;
For any layer or component in this hierarchy, you can either download the pre-built images for quick use, or modify then generate it by yourself in the way described below.&lt;br /&gt;
&lt;br /&gt;
== Get Prepared ==&lt;br /&gt;
&lt;br /&gt;
* Prepare the Boot Medium&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Zynq SoC offers different types for system booting, on your demand.&amp;lt;br /&amp;gt;&lt;br /&gt;
Here in the GitHub for an ONetSwitch, '''the SD boot is chosen as default'''. An FAT partition in the size of 512MB is used for storing the boot and kernel images, while an EXT partition typically larger than 1GB is for the root file system and the applications(e.g. OpenFlow switch software).&amp;lt;br /&amp;gt;&lt;br /&gt;
For the detailed how-to, please refer to Xilinx Wiki [http://www.wiki.xilinx.com/Prepare+Boot+Medium Prepare Boot Medium].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Setup a Serial Console&amp;lt;br /&amp;gt;&lt;br /&gt;
It is a must to use the USB-UART when running an interactive program on the platform or debugging. Here's a helpful link on Xilinx Wiki [http://www.wiki.xilinx.com/Setup+a+Serial+Console Setup a Serial Console].&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Get a Linux Environment&amp;lt;br /&amp;gt;&lt;br /&gt;
Software development on ONetSwitch requires a Linux environment for easy cross compilation.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 12.04 LTS x86_64 may lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;ia32-libs&amp;lt;/tt&amp;gt;.&amp;lt;br /&amp;gt;&lt;br /&gt;
Ubuntu 14.04 LTS x86_64 may also lack some needed 32-bit libraries. This can be fixed by installing &amp;lt;tt&amp;gt;libc6-i386&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* Install Xilinx Tools&amp;lt;br /&amp;gt;&lt;br /&gt;
Xilinx Vivado and SDK must be installed for ONetSwitch development. [http://www.xilinx.com/support/download.html Download]&amp;lt;br /&amp;gt;&lt;br /&gt;
Notice that, by 2014 Q4, all our projects are developed with Vivado 2013.4.&amp;lt;br /&amp;gt;&lt;br /&gt;
When working in a Linux environment, especially for software developers, remember to setup the environment variables for cross compiler and the Vivado/SDK tools.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;export CROSS_COMPILE=arm-xilinx-linux-gnueabi-&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings32.sh # OR&lt;br /&gt;
source &amp;lt;path-to-installation&amp;gt;/Vivado/&amp;lt;version&amp;gt;/settings64.sh&amp;lt;/source&amp;gt;&lt;br /&gt;
== Use Pre-Built Images ==&lt;br /&gt;
&lt;br /&gt;
The pre-built images can be fetched mainly from&amp;lt;br /&amp;gt;&lt;br /&gt;
* [https://github.com/MeshSr/common-bin common-bin]&amp;lt;br /&amp;gt;&lt;br /&gt;
This repo stores the common FSBL, SSBL(u-boot), Linux kernel(uImage) and root file system(rootfs), as well as the SDN/OpenFlow executables. It is easy to find them in the repo according to the folder and file names.&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot loaders are board-dedicated, while the kernel image and the rootfs are applicable to all ONetSwitch boards.&amp;lt;br /&amp;gt;&lt;br /&gt;
* ready-to-download&amp;lt;br /&amp;gt;&lt;br /&gt;
This is a sub-folder associated with each project, usually contains the FPGA image(system.bit) and the project-specific devicetree blob(devicetree.dtb).&amp;lt;br /&amp;gt;&lt;br /&gt;
The boot.bin, which is created by Xilinx SDK, always consists of the common FSBL and u-boot from common-bin above, and the project-specific system.bit.&lt;br /&gt;
&lt;br /&gt;
An example here to prepare for an OpenFlow software switch (ofs-sw) on ONetSwitch30 using pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
You need to collect following items and make copies of them to the FAT partition.&lt;br /&gt;
&lt;br /&gt;
| File | Repo | Link | | ---- | ---- | ---- | | boot.bin | onetswitch30 | [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/boot.bin ready-to-download/boot.bin] |&amp;lt;br /&amp;gt;&lt;br /&gt;
| devicetree | onetswitch30 | [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/devicetree.dtb ready-to-download/devicetree.dtb] |&amp;lt;br /&amp;gt;&lt;br /&gt;
| kernel | common-bin | [https://github.com/MeshSr/common-bin/blob/master/kernel/uImage kernel/uImage] |&lt;br /&gt;
&lt;br /&gt;
You need also to extract the compressed rootfs to the EXT partition and then put the application images to somewhere in the extracted folder structure.&amp;lt;br /&amp;gt;&lt;br /&gt;
In this example, some runtime libs are required so the sw-lib is copied as well.&lt;br /&gt;
&lt;br /&gt;
| File | Repo | Link | | ---- | ---- | ---- | | rootfs (EXT) | common-bin | [https://github.com/MeshSr/common-bin/blob/master/rootfs/rootfs_ext4.tar.gz rootfs/rootfs_ext4.tar.gz] | | sw-lib | common-bin | [https://github.com/MeshSr/common-bin/tree/master/lib lib/*]| | sw-app | common-bin | [https://github.com/MeshSr/common-bin/tree/master/ofs-sw ofs-sw/*] |&lt;br /&gt;
&lt;br /&gt;
Notice that, all the boot.bin are prepared to start the kernel in the EXT partition, using the pre-built u-boot with suffix -ext.elf in its file name. If you want to simply run all in an FAT partition, rootfs as uramdisk and the u-boot with suffix -ram.elf. The FPGA image should be used in the boot.bin regeneration.&lt;br /&gt;
&lt;br /&gt;
| File | Repo | Link | | ---- | ---- | ---- | | system.bit | onetswitch30 | [https://github.com/MeshSr/onetswitch30/blob/master/ons30-app51-ref_ofssw/ready-to-download/res/onetswitch_top.bit ready-to-download/res/onetswitch_top.bit] | | fsbl | common-bin | [https://github.com/MeshSr/common-bin/blob/master/fsbl/fsbl-ons30.elf fsbl/fsbl-ons30.elf] | | u-boot (FAT) | common-bin | [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ram.elf u-boot/u-boot-ons30-ram.elf] | | u-boot (EXT) | common-bin | [https://github.com/MeshSr/common-bin/blob/master/u-boot/u-boot-ons30-ext.elf u-boot/u-boot-ons30-ext.elf] | | rootfs (FAT) | common-bin | [https://github.com/MeshSr/common-bin/blob/master/rootfs/uramdisk.image.gz rootfs/uramdisk.image.gz] |&lt;br /&gt;
&lt;br /&gt;
== Build the System ==&lt;br /&gt;
&lt;br /&gt;
=== Zynq Hardware Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq hardware design generates the system.bit, defining the ARM CPU settings in Zynq PS and the FPGA bitstream in Zynq PL.&amp;lt;br /&amp;gt;&lt;br /&gt;
* Create IP cores and hardware design * Configure the processor * Add and integrate IP cores * Generate the bitstream * Export the hardware design to SDK&lt;br /&gt;
&lt;br /&gt;
The entire process is implemented in Xilinx Vivado tool. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Hardware-Design Hardware Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Zynq Software Design ===&lt;br /&gt;
&lt;br /&gt;
The Zynq software design introduces several steps to build up an entire embedded system, from boot loader to Linux kernel, including * First stage boot loader, FSBL * Second stage boot loader, SSBL, using u-boot * Root file system, rootfs * Device tree * Linux kernel&lt;br /&gt;
&lt;br /&gt;
The process needs Xilinx SDK, and working environment in Linux with cross compiler installed. See more information in our [https://github.com/MeshSr/wiki/wiki/Guide-Software-Design Software Design Guide].&lt;br /&gt;
&lt;br /&gt;
=== Application Design ===&lt;br /&gt;
&lt;br /&gt;
The applications, often the final target what we want, run on top of the OS (Linux as we mentioned above, or any others from 'bare-metal' to Android.)&amp;lt;br /&amp;gt;&lt;br /&gt;
For SDN/OpenFlow application, we have done following and hope to get more from you.&amp;lt;br /&amp;gt;&lt;br /&gt;
* A vSwitch running a CPqD ofsoftswitch13 ported to ARM [https://github.com/MeshSr/ofs-sw &amp;lt;tt&amp;gt;ofs-sw&amp;lt;/tt&amp;gt;]&amp;lt;br /&amp;gt;&lt;br /&gt;
* An FPGA accelerated OFS, with both HW and SW flow tables [https://github.com/MeshSr/ofs-hw &amp;lt;tt&amp;gt;ofs-hw&amp;lt;/tt&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
== Integrate and Test ==&lt;br /&gt;
&lt;br /&gt;
=== Prepare the Boot Image ===&lt;br /&gt;
&lt;br /&gt;
The boot image, boot.bin, is created in Xilinx SDK, by assembling the FSBL, the FPGA image, and the SSBL in sequence.&amp;lt;br /&amp;gt;&lt;br /&gt;
1. Select 'Xilinx Tools' from the SDK menu&amp;lt;br /&amp;gt;&lt;br /&gt;
2. Choose 'Create Zynq Boot Image', a pop-up appears&amp;lt;br /&amp;gt;&lt;br /&gt;
3. Add ''fsbl.elf'', ''system.bit'', ''u-boot.elf'' sequentially&amp;lt;br /&amp;gt;&lt;br /&gt;
4. Click 'Create Image' and wait for the generation&amp;lt;br /&amp;gt;&lt;br /&gt;
5. Rename the output binary to ''boot.bin''&lt;br /&gt;
&lt;br /&gt;
=== Use the Test Sequence ===&lt;br /&gt;
&lt;br /&gt;
Project-specific test sequence is provided as a demo. It mainly shows the usage of the board and the features of the application.&amp;lt;br /&amp;gt;&lt;br /&gt;
Try the test sequence and check the results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Prepare Boot Medium =&lt;br /&gt;
&lt;br /&gt;
== Input Files Required ==&lt;br /&gt;
&lt;br /&gt;
# [https://raw.githubusercontent.com/MeshSr/onetswitch30/master/ons30-app11-ref_nic/ready-to-download/boot.bin Precompiled boot.bin for Reference NIC demo]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/kernel Precompiled uImage]&lt;br /&gt;
# [https://github.com/MeshSr/common-bin/tree/master/rootfs rootfs]&lt;br /&gt;
&lt;br /&gt;
== Output Files Produced ==&lt;br /&gt;
&lt;br /&gt;
# bootable SD card&lt;br /&gt;
&lt;br /&gt;
== Task Description ==&lt;br /&gt;
&lt;br /&gt;
The following instructions are taken from the OMAPPedia wiki.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume a Linux system. Furthermore, most commands require root permissions. After completing this steps the SD card holds two partitions which can be read/written under Linux. Windows can - if at all - only access the FAT partition; but even this seems to depend on the card reader/driver used.&lt;br /&gt;
&lt;br /&gt;
Insert SD card and figure out the corresponding device. The last lines of the dmesg output should tell you under which device file the inserted SD card is available in the system. dmesg&lt;br /&gt;
&lt;br /&gt;
Warning: The following commands will use '/dev/sdX' to refer to the SD card device. Replace this with the actual device on your system. Executing the following commands on the wrong device may corrupt your data on other file systems. Also, all data on your SD card will be destroyed.&lt;br /&gt;
&lt;br /&gt;
The fdisk utility does not seem to erase the first few bytes of the first sector in the card when the partition table is saved. Use dd to erase the first sector. &amp;lt;tt&amp;gt;dd if=/dev/zero of=/dev/sdX bs=1024 count=1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Calculate the new_cylinders value &amp;lt;tt&amp;gt;fdisk -l /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output should look similar to this &amp;gt; Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn't contain a valid partition table&lt;br /&gt;
&lt;br /&gt;
Look for the size of the device in bytes and calculate the new number of cylinders using the following formula, dropping all fractions: &amp;gt; new_cylinders = &amp;lt;size&amp;gt; / 8225280&lt;br /&gt;
&lt;br /&gt;
For the example output given above, we would write down '''new_cylinders = 8068792320 / 8225280 = 980'''.&lt;br /&gt;
&lt;br /&gt;
Partition the SD card. We will create two partitions on the SD card. One 200 MB sized boot partition. And a second partition taking the remaining space on the SD card.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;fdisk /dev/sdX&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The dd command should have wiped all existing partition tables, if this is not the case, delete all existing partitions on the SD card. &amp;gt;Command (m for help):&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Repeat this for all valid partitions numbers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;Now configure the sectors, heads and cylinders of the SD card.&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): x&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): h&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of heads (1-256, default 30): 255&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): s&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of sectors (1-63, default 29): 63&amp;lt;br /&amp;gt;&lt;br /&gt;
Expert command (m for help): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Number of cylinders (1-1048576, default 2286): &amp;lt;new_cylinders calculated from above&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Command (m for help): r&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
Now the actual partitions can be created&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;gt;Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (0 primary, 0 extended, 4 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 1): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (2048-15759359, default 2048):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 2048&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (2048-15759359, default 15759359): +200M&lt;br /&gt;
&lt;br /&gt;
Command (m for help): n&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition type:&amp;lt;br /&amp;gt;&lt;br /&gt;
 p primary (1 primary, 0 extended, 3 free)&amp;lt;br /&amp;gt;&lt;br /&gt;
 e extended&amp;lt;br /&amp;gt;&lt;br /&gt;
Select (default p): p&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4, default 2): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
First sector (411648-15759359, default 411648):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 411648&amp;lt;br /&amp;gt;&lt;br /&gt;
Last sector, +sectors or +size{K,M,G} (411648-15759359, default 15759359):&amp;lt;br /&amp;gt;&lt;br /&gt;
Using default value 15759359&lt;br /&gt;
&lt;br /&gt;
Now, set the bootable flag and partition IDs &amp;gt;Command (m for help): a&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 1&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): c&amp;lt;br /&amp;gt;&lt;br /&gt;
Changed system type of partition 1 to c (W95 FAT32 (LBA))&lt;br /&gt;
&lt;br /&gt;
Command (m for help): t&amp;lt;br /&amp;gt;&lt;br /&gt;
Partition number (1-4): 2&amp;lt;br /&amp;gt;&lt;br /&gt;
Hex code (type L to list codes): 83&lt;br /&gt;
&lt;br /&gt;
Check the new partition table and write the changes &amp;gt;Command (m for help): p&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb: 8068 MB, 8068792320 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
249 heads, 62 sectors/track, 1020 cylinders, total 15759360 sectors&amp;lt;br /&amp;gt;&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&amp;lt;br /&amp;gt;&lt;br /&gt;
Disk identifier: 0x920c958b&lt;br /&gt;
&lt;br /&gt;
Device Boot Start End Blocks Id System&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb1 * 2048 411647 204800 c W95 FAT32 (LBA)&amp;lt;br /&amp;gt;&lt;br /&gt;
/dev/sdb2 411648 15759359 7673856 83 Linux&lt;br /&gt;
&lt;br /&gt;
Command (m for help): w&amp;lt;br /&amp;gt;&lt;br /&gt;
The partition table has been altered!&lt;br /&gt;
&lt;br /&gt;
Calling ioctl() to re-read partition table.&lt;br /&gt;
&lt;br /&gt;
WARNING: If you have created or modified any DOS 6.x&amp;lt;br /&amp;gt;&lt;br /&gt;
partitions, please see the fdisk manual page for additional&amp;lt;br /&amp;gt;&lt;br /&gt;
information.&amp;lt;br /&amp;gt;&lt;br /&gt;
Syncing disks.&lt;br /&gt;
&lt;br /&gt;
Create file systems on the new partitions &amp;lt;tt&amp;gt;mkfs.vfat -F 32 -n boot /dev/sdX1 mkfs.ext4 -L root /dev/sdX2&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the boot partition &amp;lt;tt&amp;gt;mkdir -p /mnt/boot mount /dev/sdX1 /mnt/boot&amp;lt;/tt&amp;gt; Copy the boot.bin or contents of the release archive to the SD card, e.g. &amp;lt;tt&amp;gt;cp boot.bin /mnt/boot/&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unmount the SD card &amp;lt;tt&amp;gt;umount /mnt/boot&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The SD card can now be removed and transferred over to the target platform.&lt;br /&gt;
&lt;br /&gt;
== Ref: ==&lt;br /&gt;
&lt;br /&gt;
# http://www.wiki.xilinx.com/Prepare+Boot+Medium&lt;br /&gt;
&lt;br /&gt;
= Quick Start =&lt;br /&gt;
                   &lt;br /&gt;
=== Intro ===&lt;br /&gt;
&lt;br /&gt;
An ONetSwitch enables users in different development roles to build a complete networking system in a single node. Users can build the embedded system either from scratch, or based on some pre-built images.&amp;lt;br /&amp;gt;&lt;br /&gt;
In either way, getting-started projects would help you * to get acquainted with the board and its components&amp;lt;br /&amp;gt;&lt;br /&gt;
* to make quick hardware tests on the main silicon and its peripherals&amp;lt;br /&amp;gt;&lt;br /&gt;
* to understand the usage and be ready for next-stage development&lt;br /&gt;
&lt;br /&gt;
=== Project List ===&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-ZynqPSTest Zynq PS Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the clocks, resets, memories, etc at the ARM CPU side.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-IBERT IBERT]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the rate and SI of the transceivers using PRBS generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-MACLoopBack MAC Loopback]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the PHYs and the MACs on each of the Ethernet ports.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-PCIeRootEnum PCIe Enumeration]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the Mini PCIe and the configuration of PCIe Root Complex.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-QDRIIMemTest QDRII+ Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration of PL QDRII+ SRAM, with traffic generator.''&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/MeshSr/wiki/wiki/GSG-DDR3MemTest DDR3 Memory Test]&amp;lt;br /&amp;gt;&lt;br /&gt;
''Project to verify the calibration and read/write operations on PL DDR3 SDRAM.''&lt;br /&gt;
&lt;br /&gt;
The table below shows the applicability.&lt;br /&gt;
&lt;br /&gt;
[[File:1-87.jpg]]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7977</id>
		<title>Mbed BLE Sensors Tag</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7977"/>
		<updated>2016-01-25T02:24:46Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Blink */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Mbed BLE Sensors tag is a bluetooth 4.0 BLE sensor development board that is powered by Mbed. It integrates powerful devices, such as NRF51822, LIS3DH ,BMP180, buzzer, and dual-color LED.  It also embeds an mbed compatible programmer to make program and download application very convenient. &lt;br /&gt;
&lt;br /&gt;
The mbed BLE sensors tag is consisted of two modules:  one is a bluetooth 4.0 BLE sensors tag powered by NRF51822 which is a Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC. This mbed BLE sensor tag is mbed-enabled device which simplifies and speeds up the creation and deployment of bluetooth devices based on ARM micro-controllers. There is an mbed library supporting BLE sensors tag which provides the C/C++ software platform and libraries, and can speed up your BLE application development.&lt;br /&gt;
&lt;br /&gt;
The other one works as a programmer like Jlink, but it is compatible with ARM’s mbed. It greatly simplifies the programming process. You just copy the compiled hex file to an emulated disk, which is recognized by PC when you plug this programmer into the PC and the programmer will automatically download the program into BLE SENSORS TAG without any other setting.&lt;br /&gt;
&lt;br /&gt;
[[File:1-42.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-43.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
*NRF51822 Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC&lt;br /&gt;
*LIS3DH ultra low-power high performance three axes linear accelerometer &lt;br /&gt;
*BMP180 Bosch temperature and pressure sensor&lt;br /&gt;
*1 x mbed programmer powered by ATSAM3U2CA-AU ARM-based flash MCU&lt;br /&gt;
*8 x GPIO pins&lt;br /&gt;
*1 x UART port&lt;br /&gt;
*1 x Dual-color LED&lt;br /&gt;
*2 x User buttons&lt;br /&gt;
*1 x Buzzer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Blink ===&lt;br /&gt;
&lt;br /&gt;
There are dual-color LED with common anode mounted on the BLE SENSORS TAG, and the colors are green and red. LED_R is connected to P0.20 pin, and LED_G is connected to P0.19 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.png]]&lt;br /&gt;
&lt;br /&gt;
We use mbed online compiler as our development tool and the website address is :&lt;br /&gt;
https://developer.mbed.org/compiler&lt;br /&gt;
&lt;br /&gt;
You need to register an account for free, then go to compiler. You will get a website like the followings:&lt;br /&gt;
&lt;br /&gt;
[[File:1-45.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add Platform&lt;br /&gt;
&lt;br /&gt;
Click No device selected button to add a new platform.&lt;br /&gt;
&lt;br /&gt;
Click Add Platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-46.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select Nordic Semiconductor ASA on the left side bar. On the right side, you will get '''Nordic nRF51822''' platform and click it.&lt;br /&gt;
&lt;br /&gt;
[[File:Type.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Click Add to your mbed Compiler. This will add '''Nordic nRF51822''' platform to your mbed compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Board.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Then click Open mbed compiler button to go to the online compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new program&lt;br /&gt;
&lt;br /&gt;
Create new program and add source code &lt;br /&gt;
&lt;br /&gt;
[[File:NRF51822.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Import the mbed libraries.&lt;br /&gt;
&lt;br /&gt;
[[File:1-50.png]]&lt;br /&gt;
&lt;br /&gt;
Search the mbed libraries and choose mbed, then import it.&lt;br /&gt;
&lt;br /&gt;
[[File:1-51.png]]&lt;br /&gt;
&lt;br /&gt;
Create main.cpp file and add the source code.&lt;br /&gt;
&lt;br /&gt;
[[File:1-52.png]]&lt;br /&gt;
&lt;br /&gt;
Click Compile button and you will get the hex file downloaded from this website, the name is edmbed_blinky_NRF51822.hex.&lt;br /&gt;
&lt;br /&gt;
[[File:1-53.png]]&lt;br /&gt;
&lt;br /&gt;
Compile and run&lt;br /&gt;
&lt;br /&gt;
*Connect the BLE sensor TAG to PC with Micro-USB cable, the PC will recognized a new disk whose nane is jlink. &lt;br /&gt;
*Copy or move your downloaded hex file to this disk.&lt;br /&gt;
*After several seconds, programming BLE sensor TAG will be finished. &lt;br /&gt;
*Please check the LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-54.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          LED_R=1;&lt;br /&gt;
          LED_G=1;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
          LED_R=0;&lt;br /&gt;
          LED_G=0;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
More information&lt;br /&gt;
If you want to get more materials about online mbed compiler, please check the following website:&lt;br /&gt;
1.https://developer.mbed.org/handbook/mbed-Compiler&lt;br /&gt;
2.https://developer.mbed.org/cookbook/Homepage&lt;br /&gt;
&lt;br /&gt;
=== Button Control ===&lt;br /&gt;
There are dual-button with common cathode mounted on the BLE SENSORS TAG which are key1 and key2. The key1 is connected to P0.28 pin, and key2 is connected to P0.29 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-55.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compile&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-56.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code, you will get hex file.&lt;br /&gt;
Move it to jink disk and program the BLE SENSORS TAG.&lt;br /&gt;
Press and release the key1 and key2 to check the status of LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-57.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-58.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
  DigitalIn key1(P0_28);&lt;br /&gt;
  DigitalIn key2(P0_29);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          if(!key1)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key1)&lt;br /&gt;
                  LED_G=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_G=1;&lt;br /&gt;
        &lt;br /&gt;
          if(!key2)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key2)&lt;br /&gt;
                  LED_R=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_R=1;&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Buzzer ===&lt;br /&gt;
BLE SENSORS TAG board provides a passive buzzer, and its frequency is about 1KHz. The buzzer is drove by 2N7002 MOS transistor. The control port is connected to P0.22 pin .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-59.png]]&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compiler.&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-60.png]]&lt;br /&gt;
&lt;br /&gt;
Move the downloaded hex file to jlink disk and program the BLE SENSORTS TAG.&lt;br /&gt;
Listen the sound from the Buzzer.&lt;br /&gt;
&lt;br /&gt;
'''Note：because the buzzer is drive by a MOS  transistor,  if you don't use it, you'd better set the P0.22 to low level, this can reduce the power consumption.'''&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
  DigitalOut buzzer(P0_22);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
              buzzer=!buzzer;&lt;br /&gt;
              wait_ms(1);    &lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
=== Send data via BLE ===&lt;br /&gt;
&lt;br /&gt;
Introduction of nRF51 BLE&lt;br /&gt;
nRF51822 supports Bluetooth® Smart protocol stacks as well as 2.4GHz protocol stacks, including Gazell, both available as downloads. nRF51822 requires a single power supply and gives the user the option of using on chip linear regulators giving a supply range of 1.8-3.6V, a direct 1.8V mode and a on chip DC-DC buck converter giving a supply range of 2.1-3.6V. The use of the DC-DC converter can be dynamically controlled during run time and enables nRF51822 to operate at radio peak currents below 10 mA @ 3V supply (TX @ 0 dBm &amp;amp; RX).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-62.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will tell you how to send data via BLE between BLE SENSORS TAG and iPhone.&lt;br /&gt;
Pre-requisites&lt;br /&gt;
iPhone（IOS 4.0 or newer） x1&lt;br /&gt;
BLE SENSORS TAGS x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
BLE SENSORS TAG side&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE keyword and you will find BLE_HeartRate Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-63.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below. &lt;br /&gt;
&lt;br /&gt;
[[File:1-64.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
iPhone side&lt;br /&gt;
&lt;br /&gt;
Install LightBlue APP to your iPhone.&lt;br /&gt;
&lt;br /&gt;
[[File:1-65.png]]&lt;br /&gt;
&lt;br /&gt;
Put all together to test&lt;br /&gt;
&lt;br /&gt;
In the program, one button is used to make a variable plus 1, another button is used to make the variable minus 1. Then the program will send this variable to iPhone.&lt;br /&gt;
Open LightBlue on iPhone, and search LinkSprite device which is defined in the program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-66.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click this device and connect it.&lt;br /&gt;
Click Heart Rate Measurement-&amp;gt;Listen for...&lt;br /&gt;
&lt;br /&gt;
[[File:1-67.png]]&lt;br /&gt;
&lt;br /&gt;
If you press the buttons and the data received on iPhone will change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-68.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-69.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/BLE.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/HeartRateService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/BatteryService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/DeviceInformationService.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut led1(P0_19);&lt;br /&gt;
  DigitalOut led2(P0_20);&lt;br /&gt;
  DigitalIn key_p(P0_28);&lt;br /&gt;
  DigitalIn key_d(P0_29);&lt;br /&gt;
&lt;br /&gt;
  const static char     DEVICE_NAME[]        = &amp;quot;LinkSprite&amp;quot;;&lt;br /&gt;
  static const uint16_t uuid16_list[]     = {GattService::UUID_HEART_RATE_SERVICE,                                              GattService::UUID_DEVICE_INFORMATION_SERVICE};&lt;br /&gt;
  static volatile bool  triggerSensorPolling = false;&lt;br /&gt;
&lt;br /&gt;
  uint8_t hrmCounter = 100; // init HRM to 100bps&lt;br /&gt;
&lt;br /&gt;
  HeartRateService         *hrService;&lt;br /&gt;
  DeviceInformationService *deviceInfo;&lt;br /&gt;
&lt;br /&gt;
  void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE::Instance(BLE::DEFAULT_INSTANCE).gap().startAdvertising(); // restart advertising&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void periodicCallback(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */&lt;br /&gt;
      led2 = !led2;&lt;br /&gt;
      /* Note that the periodicCallback() executes in interrupt context, so it is safer to do&lt;br /&gt;
       * heavy-weight sensor polling from the main thread. */&lt;br /&gt;
      triggerSensorPolling = true;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void bleInitComplete(BLE::InitializationCompleteCallbackContext *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE &amp;amp;ble          = params-&amp;gt;ble;&lt;br /&gt;
      ble_error_t error = params-&amp;gt;error;&lt;br /&gt;
&lt;br /&gt;
      if (error != BLE_ERROR_NONE) {&lt;br /&gt;
          return;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      ble.gap().onDisconnection(disconnectionCallback);&lt;br /&gt;
&lt;br /&gt;
      /* Setup primary service. */&lt;br /&gt;
      hrService = new HeartRateService(ble, hrmCounter, HeartRateService::LOCATION_FINGER);&lt;br /&gt;
&lt;br /&gt;
      /* Setup auxiliary service. */&lt;br /&gt;
      deviceInfo = new DeviceInformationService(ble, &amp;quot;ARM&amp;quot;, &amp;quot;Model1&amp;quot;, &amp;quot;SN1&amp;quot;, &amp;quot;hw-rev1&amp;quot;, &amp;quot;fw-rev1&amp;quot;, &amp;quot;soft-rev1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
      /* Setup advertising. */&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, (uint8_t *)uuid16_list, sizeof(uuid16_list));&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::GENERIC_HEART_RATE_SENSOR);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME));&lt;br /&gt;
      ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);&lt;br /&gt;
      ble.gap().setAdvertisingInterval(100); /* 1000ms */&lt;br /&gt;
      ble.gap().startAdvertising();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = 1;&lt;br /&gt;
      led2 = 0;&lt;br /&gt;
      Ticker ticker;&lt;br /&gt;
      ticker.attach(periodicCallback, 1); // blink LED every second&lt;br /&gt;
&lt;br /&gt;
      BLE&amp;amp; ble = BLE::Instance(BLE::DEFAULT_INSTANCE);&lt;br /&gt;
      ble.init(bleInitComplete);&lt;br /&gt;
&lt;br /&gt;
      /* SpinWait for initialization to complete. This is necessary because the&lt;br /&gt;
       * BLE object is used in the main loop below. */&lt;br /&gt;
      while (ble.hasInitialized()  == false) { /* spin loop */ }&lt;br /&gt;
  &lt;br /&gt;
      // infinite loop&lt;br /&gt;
      while (1) &lt;br /&gt;
      {&lt;br /&gt;
          if(!key_p)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_p) &lt;br /&gt;
                  hrmCounter++;&lt;br /&gt;
              while(!key_p);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          if(!key_d)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_d) &lt;br /&gt;
                  hrmCounter--;&lt;br /&gt;
              while(!key_d);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          hrService-&amp;gt;updateHeartRate(hrmCounter);&lt;br /&gt;
          ble.waitForEvent(); // low power wait for event &lt;br /&gt;
  }}&lt;br /&gt;
&lt;br /&gt;
=== LIS3DH accelerometer ===&lt;br /&gt;
Introduction of LIS3DH&lt;br /&gt;
The LIS3DH is an ultra low-power high performance three axes linear accelerometer belonging to the “nano” family, with digital I2C/SPI serial interface standard output. The device features ultra low-power operational modes that allow advanced power saving and smart embedded functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-70.png]]&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG integrates LIS3DH accelerometer which used as SPI communication mode, as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-71.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to get the data from the LIS3DH on BLE SENSORS TAG using mbed IDE.&lt;br /&gt;
&lt;br /&gt;
Pre-requisites&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE_basic keyword and you will find BLE_basic Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-72.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below.&lt;br /&gt;
&lt;br /&gt;
[[File:1-73.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and download the hex file.&lt;br /&gt;
Connect BLE SENSORS TAG to your PC using Micro USB.&lt;br /&gt;
Move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
Run and Test&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-74.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-75png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
Baud rate: 9600&lt;br /&gt;
Data : 8 bit&lt;br /&gt;
Stop: 1bit&lt;br /&gt;
&lt;br /&gt;
[[File:1-76.png]]&lt;br /&gt;
&lt;br /&gt;
If you move BLE SENSORS TAG, the values of Dx, Dy and Dz shown on the Serial window will change. &lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  uint16_t x_a,y_a,z_a;&lt;br /&gt;
  bool flag = 0;&lt;br /&gt;
  SPI spi_master(P0_6,P0_5,P0_7); //mosi miso sclk &lt;br /&gt;
  DigitalOut cs(P0_4);&lt;br /&gt;
  Serial pc(P0_23,P0_25);&lt;br /&gt;
  uint8_t LIS3DH_SPI_RD(uint8_t addr)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t  temp;&lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);      &lt;br /&gt;
      temp=spi_master.write(0xff);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
      return temp;&lt;br /&gt;
  }&lt;br /&gt;
  void LIS3DH_SPI_WR(uint8_t addr,uint8_t wrdata)&lt;br /&gt;
  {  &lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);&lt;br /&gt;
      spi_master.write(wrdata);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
  }&lt;br /&gt;
  void SPI_LIS3DH_Init()&lt;br /&gt;
  {&lt;br /&gt;
     spi_master.format(8,3);&lt;br /&gt;
     spi_master.frequency(100000);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x24,0x80);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x20,0x17);&lt;br /&gt;
     LIS3DH_SPI_WR(0x23,0x80);&lt;br /&gt;
  }&lt;br /&gt;
  void get_val(void)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t Dx_L=1,Dy_L=1,Dz_L=1;&lt;br /&gt;
      uint8_t Dx_H=1,Dy_H=1,Dz_H=1;&lt;br /&gt;
      if(LIS3DH_SPI_RD(0x0f|0x80)==0x33)&lt;br /&gt;
      {&lt;br /&gt;
           printf(&amp;quot;check device ok!\r\n&amp;quot;);&lt;br /&gt;
           flag=1;&lt;br /&gt;
           Dx_H=LIS3DH_SPI_RD(0x29|0x80);   &lt;br /&gt;
           Dx_L=LIS3DH_SPI_RD(0x28|0x80);&lt;br /&gt;
           Dy_H=LIS3DH_SPI_RD(0x2b|0x80);&lt;br /&gt;
           Dy_L=LIS3DH_SPI_RD(0x2A|0x80);&lt;br /&gt;
           Dz_H=LIS3DH_SPI_RD(0x2d|0x80);&lt;br /&gt;
           Dz_L=LIS3DH_SPI_RD(0x2C|0x80);  &lt;br /&gt;
      }&lt;br /&gt;
      else printf(&amp;quot;check device err!\r\n&amp;quot;);&lt;br /&gt;
      x_a=Dx_H&amp;lt;&amp;lt;8|Dx_L/16;&lt;br /&gt;
      y_a=Dy_H&amp;lt;&amp;lt;8|Dy_L/16;&lt;br /&gt;
      z_a=Dz_H&amp;lt;&amp;lt;8|Dz_L/16;&lt;br /&gt;
  }&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
    SPI_LIS3DH_Init();&lt;br /&gt;
    while(1)&lt;br /&gt;
    {  &lt;br /&gt;
       get_val();&lt;br /&gt;
       if(flag)&lt;br /&gt;
       {&lt;br /&gt;
           printf(&amp;quot;Dx=:%d\r\n&amp;quot;,x_a);&lt;br /&gt;
           printf(&amp;quot;Dy=:%d\r\n&amp;quot;,y_a);&lt;br /&gt;
           printf(&amp;quot;Dz=:%d\r\n&amp;quot;,z_a);&lt;br /&gt;
           flag=0;&lt;br /&gt;
           wait(1);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BMP180 barometric pressure sensor ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resistive technology for high accuracy, ruggedness and long term stability. The chip only accepts 1.8V to 3.6V input voltage.&lt;br /&gt;
&lt;br /&gt;
[[File:1-77.png]]&lt;br /&gt;
&lt;br /&gt;
NRF51822 communicates with BMP180 using I2C port. The SCL port is connected to P0.18 and SDA port is connected to P0.17.&lt;br /&gt;
&lt;br /&gt;
[[File:1-79.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to use BMP180 to get barometric pressure and temperature data and print these data to serial port.&lt;br /&gt;
&lt;br /&gt;
=== Pre-requisites ===&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x 1&lt;br /&gt;
Micro USB cable x 1&lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using bmp180 keyword and you will find BMP180_example program.&lt;br /&gt;
Import a mbed libraries into BMP180_example.&lt;br /&gt;
&lt;br /&gt;
[[File:1-78.png]]&lt;br /&gt;
&lt;br /&gt;
Update the source code using the given source code below.&lt;br /&gt;
Compile it, you will get hex file.&lt;br /&gt;
Move it to jlink disk and program the BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
=== Run and Test ===&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-80.png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
*Baud rate: 9600&lt;br /&gt;
*Data : 8 bit&lt;br /&gt;
*Stop: 1 bit&lt;br /&gt;
&lt;br /&gt;
There will be data printed on the serial window.&lt;br /&gt;
&lt;br /&gt;
[[File:1-81.png]]&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
#include &amp;quot;BMP180.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Serial pc(P0_23,P0_25);&lt;br /&gt;
DigitalOut led(P0_20);&lt;br /&gt;
I2C i2c(P0_17, P0_18);&lt;br /&gt;
BMP180 bmp180(&amp;amp;i2c);&lt;br /&gt;
&lt;br /&gt;
int main(void) &lt;br /&gt;
 {&lt;br /&gt;
    led=0;&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        if (bmp180.init() != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error communicating with BMP180\n&amp;quot;);&lt;br /&gt;
        } &lt;br /&gt;
        else &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Initialized BMP180\n&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        bmp180.startTemperature();&lt;br /&gt;
        wait_ms(5);     // Wait for conversion to complete&lt;br /&gt;
        float temp;&lt;br /&gt;
        if(bmp180.getTemperature(&amp;amp;temp) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting temperature\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
        bmp180.startPressure(BMP180::ULTRA_LOW_POWER);&lt;br /&gt;
        wait_ms(10);    // Wait for conversion to complete&lt;br /&gt;
        int pressure;&lt;br /&gt;
        if(bmp180.getPressure(&amp;amp;pressure) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting pressure\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Pressure = %d Pa Temperature = %f C\n&amp;quot;, pressure, temp);&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Schematic ==&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmbed_interface_mcu.PDF lsmbed_interface_mcu]&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmed_sensor_tag.PDF lsmed_sensor_tag]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=File:NRF51822.png&amp;diff=7976</id>
		<title>File:NRF51822.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=File:NRF51822.png&amp;diff=7976"/>
		<updated>2016-01-25T02:23:32Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7975</id>
		<title>Mbed BLE Sensors Tag</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7975"/>
		<updated>2016-01-25T02:13:27Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Mbed BLE Sensors tag is a bluetooth 4.0 BLE sensor development board that is powered by Mbed. It integrates powerful devices, such as NRF51822, LIS3DH ,BMP180, buzzer, and dual-color LED.  It also embeds an mbed compatible programmer to make program and download application very convenient. &lt;br /&gt;
&lt;br /&gt;
The mbed BLE sensors tag is consisted of two modules:  one is a bluetooth 4.0 BLE sensors tag powered by NRF51822 which is a Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC. This mbed BLE sensor tag is mbed-enabled device which simplifies and speeds up the creation and deployment of bluetooth devices based on ARM micro-controllers. There is an mbed library supporting BLE sensors tag which provides the C/C++ software platform and libraries, and can speed up your BLE application development.&lt;br /&gt;
&lt;br /&gt;
The other one works as a programmer like Jlink, but it is compatible with ARM’s mbed. It greatly simplifies the programming process. You just copy the compiled hex file to an emulated disk, which is recognized by PC when you plug this programmer into the PC and the programmer will automatically download the program into BLE SENSORS TAG without any other setting.&lt;br /&gt;
&lt;br /&gt;
[[File:1-42.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-43.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
*NRF51822 Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC&lt;br /&gt;
*LIS3DH ultra low-power high performance three axes linear accelerometer &lt;br /&gt;
*BMP180 Bosch temperature and pressure sensor&lt;br /&gt;
*1 x mbed programmer powered by ATSAM3U2CA-AU ARM-based flash MCU&lt;br /&gt;
*8 x GPIO pins&lt;br /&gt;
*1 x UART port&lt;br /&gt;
*1 x Dual-color LED&lt;br /&gt;
*2 x User buttons&lt;br /&gt;
*1 x Buzzer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Blink ===&lt;br /&gt;
&lt;br /&gt;
There are dual-color LED with common anode mounted on the BLE SENSORS TAG, and the colors are green and red. LED_R is connected to P0.20 pin, and LED_G is connected to P0.19 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.png]]&lt;br /&gt;
&lt;br /&gt;
We use mbed online compiler as our development tool and the website address is :&lt;br /&gt;
https://developer.mbed.org/compiler&lt;br /&gt;
&lt;br /&gt;
You need to register an account for free, then go to compiler. You will get a website like the followings:&lt;br /&gt;
&lt;br /&gt;
[[File:1-45.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add Platform&lt;br /&gt;
&lt;br /&gt;
Click No device selected button to add a new platform.&lt;br /&gt;
&lt;br /&gt;
Click Add Platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-46.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select Nordic Semiconductor ASA on the left side bar. On the right side, you will get '''Nordic nRF51822''' platform and click it.&lt;br /&gt;
&lt;br /&gt;
[[File:Type.png|400px]]&lt;br /&gt;
&lt;br /&gt;
Click Add to your mbed Compiler. This will add '''Nordic nRF51822''' platform to your mbed compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Board.png|700px]]&lt;br /&gt;
&lt;br /&gt;
Then click Open mbed compiler button to go to the online compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new program&lt;br /&gt;
&lt;br /&gt;
Create new program and add source code &lt;br /&gt;
&lt;br /&gt;
[[File:1-49.png]]&lt;br /&gt;
&lt;br /&gt;
Import the mbed libraries.&lt;br /&gt;
&lt;br /&gt;
[[File:1-50.png]]&lt;br /&gt;
&lt;br /&gt;
Search the mbed libraries and choose mbed, then import it.&lt;br /&gt;
&lt;br /&gt;
[[File:1-51.png]]&lt;br /&gt;
&lt;br /&gt;
Create main.cpp file and add the source code.&lt;br /&gt;
&lt;br /&gt;
[[File:1-52.png]]&lt;br /&gt;
&lt;br /&gt;
Click Compile button and you will get the hex file downloaded from this website, the name is edmbed_blinky_NRF51822.hex.&lt;br /&gt;
&lt;br /&gt;
[[File:1-53.png]]&lt;br /&gt;
&lt;br /&gt;
Compile and run&lt;br /&gt;
&lt;br /&gt;
*Connect the BLE sensor TAG to PC with Micro-USB cable, the PC will recognized a new disk whose nane is jlink. &lt;br /&gt;
*Copy or move your downloaded hex file to this disk.&lt;br /&gt;
*After several seconds, programming BLE sensor TAG will be finished. &lt;br /&gt;
*Please check the LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-54.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          LED_R=1;&lt;br /&gt;
          LED_G=1;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
          LED_R=0;&lt;br /&gt;
          LED_G=0;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
More information&lt;br /&gt;
If you want to get more materials about online mbed compiler, please check the following website:&lt;br /&gt;
1.https://developer.mbed.org/handbook/mbed-Compiler&lt;br /&gt;
2.https://developer.mbed.org/cookbook/Homepage&lt;br /&gt;
&lt;br /&gt;
=== Button Control ===&lt;br /&gt;
There are dual-button with common cathode mounted on the BLE SENSORS TAG which are key1 and key2. The key1 is connected to P0.28 pin, and key2 is connected to P0.29 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-55.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compile&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-56.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code, you will get hex file.&lt;br /&gt;
Move it to jink disk and program the BLE SENSORS TAG.&lt;br /&gt;
Press and release the key1 and key2 to check the status of LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-57.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-58.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
  DigitalIn key1(P0_28);&lt;br /&gt;
  DigitalIn key2(P0_29);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          if(!key1)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key1)&lt;br /&gt;
                  LED_G=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_G=1;&lt;br /&gt;
        &lt;br /&gt;
          if(!key2)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key2)&lt;br /&gt;
                  LED_R=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_R=1;&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Buzzer ===&lt;br /&gt;
BLE SENSORS TAG board provides a passive buzzer, and its frequency is about 1KHz. The buzzer is drove by 2N7002 MOS transistor. The control port is connected to P0.22 pin .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-59.png]]&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compiler.&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-60.png]]&lt;br /&gt;
&lt;br /&gt;
Move the downloaded hex file to jlink disk and program the BLE SENSORTS TAG.&lt;br /&gt;
Listen the sound from the Buzzer.&lt;br /&gt;
&lt;br /&gt;
'''Note：because the buzzer is drive by a MOS  transistor,  if you don't use it, you'd better set the P0.22 to low level, this can reduce the power consumption.'''&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
  DigitalOut buzzer(P0_22);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
              buzzer=!buzzer;&lt;br /&gt;
              wait_ms(1);    &lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
=== Send data via BLE ===&lt;br /&gt;
&lt;br /&gt;
Introduction of nRF51 BLE&lt;br /&gt;
nRF51822 supports Bluetooth® Smart protocol stacks as well as 2.4GHz protocol stacks, including Gazell, both available as downloads. nRF51822 requires a single power supply and gives the user the option of using on chip linear regulators giving a supply range of 1.8-3.6V, a direct 1.8V mode and a on chip DC-DC buck converter giving a supply range of 2.1-3.6V. The use of the DC-DC converter can be dynamically controlled during run time and enables nRF51822 to operate at radio peak currents below 10 mA @ 3V supply (TX @ 0 dBm &amp;amp; RX).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-62.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will tell you how to send data via BLE between BLE SENSORS TAG and iPhone.&lt;br /&gt;
Pre-requisites&lt;br /&gt;
iPhone（IOS 4.0 or newer） x1&lt;br /&gt;
BLE SENSORS TAGS x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
BLE SENSORS TAG side&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE keyword and you will find BLE_HeartRate Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-63.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below. &lt;br /&gt;
&lt;br /&gt;
[[File:1-64.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
iPhone side&lt;br /&gt;
&lt;br /&gt;
Install LightBlue APP to your iPhone.&lt;br /&gt;
&lt;br /&gt;
[[File:1-65.png]]&lt;br /&gt;
&lt;br /&gt;
Put all together to test&lt;br /&gt;
&lt;br /&gt;
In the program, one button is used to make a variable plus 1, another button is used to make the variable minus 1. Then the program will send this variable to iPhone.&lt;br /&gt;
Open LightBlue on iPhone, and search LinkSprite device which is defined in the program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-66.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click this device and connect it.&lt;br /&gt;
Click Heart Rate Measurement-&amp;gt;Listen for...&lt;br /&gt;
&lt;br /&gt;
[[File:1-67.png]]&lt;br /&gt;
&lt;br /&gt;
If you press the buttons and the data received on iPhone will change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-68.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-69.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/BLE.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/HeartRateService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/BatteryService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/DeviceInformationService.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut led1(P0_19);&lt;br /&gt;
  DigitalOut led2(P0_20);&lt;br /&gt;
  DigitalIn key_p(P0_28);&lt;br /&gt;
  DigitalIn key_d(P0_29);&lt;br /&gt;
&lt;br /&gt;
  const static char     DEVICE_NAME[]        = &amp;quot;LinkSprite&amp;quot;;&lt;br /&gt;
  static const uint16_t uuid16_list[]     = {GattService::UUID_HEART_RATE_SERVICE,                                              GattService::UUID_DEVICE_INFORMATION_SERVICE};&lt;br /&gt;
  static volatile bool  triggerSensorPolling = false;&lt;br /&gt;
&lt;br /&gt;
  uint8_t hrmCounter = 100; // init HRM to 100bps&lt;br /&gt;
&lt;br /&gt;
  HeartRateService         *hrService;&lt;br /&gt;
  DeviceInformationService *deviceInfo;&lt;br /&gt;
&lt;br /&gt;
  void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE::Instance(BLE::DEFAULT_INSTANCE).gap().startAdvertising(); // restart advertising&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void periodicCallback(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */&lt;br /&gt;
      led2 = !led2;&lt;br /&gt;
      /* Note that the periodicCallback() executes in interrupt context, so it is safer to do&lt;br /&gt;
       * heavy-weight sensor polling from the main thread. */&lt;br /&gt;
      triggerSensorPolling = true;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void bleInitComplete(BLE::InitializationCompleteCallbackContext *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE &amp;amp;ble          = params-&amp;gt;ble;&lt;br /&gt;
      ble_error_t error = params-&amp;gt;error;&lt;br /&gt;
&lt;br /&gt;
      if (error != BLE_ERROR_NONE) {&lt;br /&gt;
          return;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      ble.gap().onDisconnection(disconnectionCallback);&lt;br /&gt;
&lt;br /&gt;
      /* Setup primary service. */&lt;br /&gt;
      hrService = new HeartRateService(ble, hrmCounter, HeartRateService::LOCATION_FINGER);&lt;br /&gt;
&lt;br /&gt;
      /* Setup auxiliary service. */&lt;br /&gt;
      deviceInfo = new DeviceInformationService(ble, &amp;quot;ARM&amp;quot;, &amp;quot;Model1&amp;quot;, &amp;quot;SN1&amp;quot;, &amp;quot;hw-rev1&amp;quot;, &amp;quot;fw-rev1&amp;quot;, &amp;quot;soft-rev1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
      /* Setup advertising. */&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, (uint8_t *)uuid16_list, sizeof(uuid16_list));&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::GENERIC_HEART_RATE_SENSOR);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME));&lt;br /&gt;
      ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);&lt;br /&gt;
      ble.gap().setAdvertisingInterval(100); /* 1000ms */&lt;br /&gt;
      ble.gap().startAdvertising();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = 1;&lt;br /&gt;
      led2 = 0;&lt;br /&gt;
      Ticker ticker;&lt;br /&gt;
      ticker.attach(periodicCallback, 1); // blink LED every second&lt;br /&gt;
&lt;br /&gt;
      BLE&amp;amp; ble = BLE::Instance(BLE::DEFAULT_INSTANCE);&lt;br /&gt;
      ble.init(bleInitComplete);&lt;br /&gt;
&lt;br /&gt;
      /* SpinWait for initialization to complete. This is necessary because the&lt;br /&gt;
       * BLE object is used in the main loop below. */&lt;br /&gt;
      while (ble.hasInitialized()  == false) { /* spin loop */ }&lt;br /&gt;
  &lt;br /&gt;
      // infinite loop&lt;br /&gt;
      while (1) &lt;br /&gt;
      {&lt;br /&gt;
          if(!key_p)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_p) &lt;br /&gt;
                  hrmCounter++;&lt;br /&gt;
              while(!key_p);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          if(!key_d)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_d) &lt;br /&gt;
                  hrmCounter--;&lt;br /&gt;
              while(!key_d);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          hrService-&amp;gt;updateHeartRate(hrmCounter);&lt;br /&gt;
          ble.waitForEvent(); // low power wait for event &lt;br /&gt;
  }}&lt;br /&gt;
&lt;br /&gt;
=== LIS3DH accelerometer ===&lt;br /&gt;
Introduction of LIS3DH&lt;br /&gt;
The LIS3DH is an ultra low-power high performance three axes linear accelerometer belonging to the “nano” family, with digital I2C/SPI serial interface standard output. The device features ultra low-power operational modes that allow advanced power saving and smart embedded functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-70.png]]&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG integrates LIS3DH accelerometer which used as SPI communication mode, as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-71.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to get the data from the LIS3DH on BLE SENSORS TAG using mbed IDE.&lt;br /&gt;
&lt;br /&gt;
Pre-requisites&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE_basic keyword and you will find BLE_basic Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-72.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below.&lt;br /&gt;
&lt;br /&gt;
[[File:1-73.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and download the hex file.&lt;br /&gt;
Connect BLE SENSORS TAG to your PC using Micro USB.&lt;br /&gt;
Move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
Run and Test&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-74.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-75png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
Baud rate: 9600&lt;br /&gt;
Data : 8 bit&lt;br /&gt;
Stop: 1bit&lt;br /&gt;
&lt;br /&gt;
[[File:1-76.png]]&lt;br /&gt;
&lt;br /&gt;
If you move BLE SENSORS TAG, the values of Dx, Dy and Dz shown on the Serial window will change. &lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  uint16_t x_a,y_a,z_a;&lt;br /&gt;
  bool flag = 0;&lt;br /&gt;
  SPI spi_master(P0_6,P0_5,P0_7); //mosi miso sclk &lt;br /&gt;
  DigitalOut cs(P0_4);&lt;br /&gt;
  Serial pc(P0_23,P0_25);&lt;br /&gt;
  uint8_t LIS3DH_SPI_RD(uint8_t addr)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t  temp;&lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);      &lt;br /&gt;
      temp=spi_master.write(0xff);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
      return temp;&lt;br /&gt;
  }&lt;br /&gt;
  void LIS3DH_SPI_WR(uint8_t addr,uint8_t wrdata)&lt;br /&gt;
  {  &lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);&lt;br /&gt;
      spi_master.write(wrdata);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
  }&lt;br /&gt;
  void SPI_LIS3DH_Init()&lt;br /&gt;
  {&lt;br /&gt;
     spi_master.format(8,3);&lt;br /&gt;
     spi_master.frequency(100000);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x24,0x80);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x20,0x17);&lt;br /&gt;
     LIS3DH_SPI_WR(0x23,0x80);&lt;br /&gt;
  }&lt;br /&gt;
  void get_val(void)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t Dx_L=1,Dy_L=1,Dz_L=1;&lt;br /&gt;
      uint8_t Dx_H=1,Dy_H=1,Dz_H=1;&lt;br /&gt;
      if(LIS3DH_SPI_RD(0x0f|0x80)==0x33)&lt;br /&gt;
      {&lt;br /&gt;
           printf(&amp;quot;check device ok!\r\n&amp;quot;);&lt;br /&gt;
           flag=1;&lt;br /&gt;
           Dx_H=LIS3DH_SPI_RD(0x29|0x80);   &lt;br /&gt;
           Dx_L=LIS3DH_SPI_RD(0x28|0x80);&lt;br /&gt;
           Dy_H=LIS3DH_SPI_RD(0x2b|0x80);&lt;br /&gt;
           Dy_L=LIS3DH_SPI_RD(0x2A|0x80);&lt;br /&gt;
           Dz_H=LIS3DH_SPI_RD(0x2d|0x80);&lt;br /&gt;
           Dz_L=LIS3DH_SPI_RD(0x2C|0x80);  &lt;br /&gt;
      }&lt;br /&gt;
      else printf(&amp;quot;check device err!\r\n&amp;quot;);&lt;br /&gt;
      x_a=Dx_H&amp;lt;&amp;lt;8|Dx_L/16;&lt;br /&gt;
      y_a=Dy_H&amp;lt;&amp;lt;8|Dy_L/16;&lt;br /&gt;
      z_a=Dz_H&amp;lt;&amp;lt;8|Dz_L/16;&lt;br /&gt;
  }&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
    SPI_LIS3DH_Init();&lt;br /&gt;
    while(1)&lt;br /&gt;
    {  &lt;br /&gt;
       get_val();&lt;br /&gt;
       if(flag)&lt;br /&gt;
       {&lt;br /&gt;
           printf(&amp;quot;Dx=:%d\r\n&amp;quot;,x_a);&lt;br /&gt;
           printf(&amp;quot;Dy=:%d\r\n&amp;quot;,y_a);&lt;br /&gt;
           printf(&amp;quot;Dz=:%d\r\n&amp;quot;,z_a);&lt;br /&gt;
           flag=0;&lt;br /&gt;
           wait(1);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BMP180 barometric pressure sensor ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resistive technology for high accuracy, ruggedness and long term stability. The chip only accepts 1.8V to 3.6V input voltage.&lt;br /&gt;
&lt;br /&gt;
[[File:1-77.png]]&lt;br /&gt;
&lt;br /&gt;
NRF51822 communicates with BMP180 using I2C port. The SCL port is connected to P0.18 and SDA port is connected to P0.17.&lt;br /&gt;
&lt;br /&gt;
[[File:1-79.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to use BMP180 to get barometric pressure and temperature data and print these data to serial port.&lt;br /&gt;
&lt;br /&gt;
=== Pre-requisites ===&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x 1&lt;br /&gt;
Micro USB cable x 1&lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using bmp180 keyword and you will find BMP180_example program.&lt;br /&gt;
Import a mbed libraries into BMP180_example.&lt;br /&gt;
&lt;br /&gt;
[[File:1-78.png]]&lt;br /&gt;
&lt;br /&gt;
Update the source code using the given source code below.&lt;br /&gt;
Compile it, you will get hex file.&lt;br /&gt;
Move it to jlink disk and program the BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
=== Run and Test ===&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-80.png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
*Baud rate: 9600&lt;br /&gt;
*Data : 8 bit&lt;br /&gt;
*Stop: 1 bit&lt;br /&gt;
&lt;br /&gt;
There will be data printed on the serial window.&lt;br /&gt;
&lt;br /&gt;
[[File:1-81.png]]&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
#include &amp;quot;BMP180.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Serial pc(P0_23,P0_25);&lt;br /&gt;
DigitalOut led(P0_20);&lt;br /&gt;
I2C i2c(P0_17, P0_18);&lt;br /&gt;
BMP180 bmp180(&amp;amp;i2c);&lt;br /&gt;
&lt;br /&gt;
int main(void) &lt;br /&gt;
 {&lt;br /&gt;
    led=0;&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        if (bmp180.init() != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error communicating with BMP180\n&amp;quot;);&lt;br /&gt;
        } &lt;br /&gt;
        else &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Initialized BMP180\n&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        bmp180.startTemperature();&lt;br /&gt;
        wait_ms(5);     // Wait for conversion to complete&lt;br /&gt;
        float temp;&lt;br /&gt;
        if(bmp180.getTemperature(&amp;amp;temp) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting temperature\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
        bmp180.startPressure(BMP180::ULTRA_LOW_POWER);&lt;br /&gt;
        wait_ms(10);    // Wait for conversion to complete&lt;br /&gt;
        int pressure;&lt;br /&gt;
        if(bmp180.getPressure(&amp;amp;pressure) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting pressure\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Pressure = %d Pa Temperature = %f C\n&amp;quot;, pressure, temp);&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Schematic ==&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmbed_interface_mcu.PDF lsmbed_interface_mcu]&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmed_sensor_tag.PDF lsmed_sensor_tag]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7974</id>
		<title>Mbed BLE Sensors Tag</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7974"/>
		<updated>2016-01-25T02:12:24Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Blink */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Mbed BLE Sensors tag is a bluetooth 4.0 BLE sensor development board that is powered by Mbed. It integrates powerful devices, such as NRF51822, LIS3DH ,BMP180, buzzer, and dual-color LED.  It also embeds an mbed compatible programmer to make program and download application very convenient. &lt;br /&gt;
&lt;br /&gt;
The mbed BLE sensors tag is consisted of two modules:  one is a bluetooth 4.0 BLE sensors tag powered by NRF51822 which is a Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC. This mbed BLE sensor tag is mbed-enabled device which simplifies and speeds up the creation and deployment of bluetooth devices based on ARM micro-controllers. There is an mbed library supporting BLE sensors tag which provides the C/C++ software platform and libraries, and can speed up your BLE application development.&lt;br /&gt;
&lt;br /&gt;
The other one works as a programmer like Jlink, but it is compatible with ARM’s mbed. It greatly simplifies the programming process. You just copy the compiled hex file to an emulated disk, which is recognized by PC when you plug this programmer into the PC and the programmer will automatically download the program into BLE SENSORS TAG without any other setting.&lt;br /&gt;
&lt;br /&gt;
[[File:1-42.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-43.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
*NRF51822 Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC&lt;br /&gt;
*LIS3DH ultra low-power high performance three axes linear accelerometer &lt;br /&gt;
*BMP180 Bosch temperature and pressure sensor&lt;br /&gt;
*1 x mbed programmer powered by ATSAM3U2CA-AU ARM-based flash MCU&lt;br /&gt;
*8 x GPIO pins&lt;br /&gt;
*1 x UART port&lt;br /&gt;
*1 x Dual-color LED&lt;br /&gt;
*2 x User buttons&lt;br /&gt;
*1 x Buzzer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Blink ===&lt;br /&gt;
&lt;br /&gt;
There are dual-color LED with common anode mounted on the BLE SENSORS TAG, and the colors are green and red. LED_R is connected to P0.20 pin, and LED_G is connected to P0.19 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.png]]&lt;br /&gt;
&lt;br /&gt;
We use mbed online compiler as our development tool and the website address is :&lt;br /&gt;
https://developer.mbed.org/compiler&lt;br /&gt;
&lt;br /&gt;
You need to register an account for free, then go to compiler. You will get a website like the followings:&lt;br /&gt;
&lt;br /&gt;
[[File:1-45.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add Platform&lt;br /&gt;
&lt;br /&gt;
Click No device selected button to add a new platform.&lt;br /&gt;
&lt;br /&gt;
Click Add Platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-46.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select Nordic Semiconductor ASA on the left side bar. On the right side, you will get '''Nordic nRF51822''' platform and click it.&lt;br /&gt;
&lt;br /&gt;
[[File:Type.png|100px]]&lt;br /&gt;
&lt;br /&gt;
Click Add to your mbed Compiler. This will add '''Nordic nRF51822''' platform to your mbed compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Board.png|200px]]&lt;br /&gt;
&lt;br /&gt;
Then click Open mbed compiler button to go to the online compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new program&lt;br /&gt;
&lt;br /&gt;
Create new program and add source code &lt;br /&gt;
&lt;br /&gt;
[[File:1-49.png]]&lt;br /&gt;
&lt;br /&gt;
Import the mbed libraries.&lt;br /&gt;
&lt;br /&gt;
[[File:1-50.png]]&lt;br /&gt;
&lt;br /&gt;
Search the mbed libraries and choose mbed, then import it.&lt;br /&gt;
&lt;br /&gt;
[[File:1-51.png]]&lt;br /&gt;
&lt;br /&gt;
Create main.cpp file and add the source code.&lt;br /&gt;
&lt;br /&gt;
[[File:1-52.png]]&lt;br /&gt;
&lt;br /&gt;
Click Compile button and you will get the hex file downloaded from this website, the name is edmbed_blinky_NRF51822.hex.&lt;br /&gt;
&lt;br /&gt;
[[File:1-53.png]]&lt;br /&gt;
&lt;br /&gt;
Compile and run&lt;br /&gt;
&lt;br /&gt;
*Connect the BLE sensor TAG to PC with Micro-USB cable, the PC will recognized a new disk whose nane is jlink. &lt;br /&gt;
*Copy or move your downloaded hex file to this disk.&lt;br /&gt;
*After several seconds, programming BLE sensor TAG will be finished. &lt;br /&gt;
*Please check the LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-54.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          LED_R=1;&lt;br /&gt;
          LED_G=1;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
          LED_R=0;&lt;br /&gt;
          LED_G=0;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
More information&lt;br /&gt;
If you want to get more materials about online mbed compiler, please check the following website:&lt;br /&gt;
1.https://developer.mbed.org/handbook/mbed-Compiler&lt;br /&gt;
2.https://developer.mbed.org/cookbook/Homepage&lt;br /&gt;
&lt;br /&gt;
=== Button Control ===&lt;br /&gt;
There are dual-button with common cathode mounted on the BLE SENSORS TAG which are key1 and key2. The key1 is connected to P0.28 pin, and key2 is connected to P0.29 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-55.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compile&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-56.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code, you will get hex file.&lt;br /&gt;
Move it to jink disk and program the BLE SENSORS TAG.&lt;br /&gt;
Press and release the key1 and key2 to check the status of LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-57.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-58.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
  DigitalIn key1(P0_28);&lt;br /&gt;
  DigitalIn key2(P0_29);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          if(!key1)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key1)&lt;br /&gt;
                  LED_G=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_G=1;&lt;br /&gt;
        &lt;br /&gt;
          if(!key2)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key2)&lt;br /&gt;
                  LED_R=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_R=1;&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Buzzer ===&lt;br /&gt;
BLE SENSORS TAG board provides a passive buzzer, and its frequency is about 1KHz. The buzzer is drove by 2N7002 MOS transistor. The control port is connected to P0.22 pin .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-59.png]]&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compiler.&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-60.png]]&lt;br /&gt;
&lt;br /&gt;
Move the downloaded hex file to jlink disk and program the BLE SENSORTS TAG.&lt;br /&gt;
Listen the sound from the Buzzer.&lt;br /&gt;
&lt;br /&gt;
'''Note：because the buzzer is drive by a MOS  transistor,  if you don't use it, you'd better set the P0.22 to low level, this can reduce the power consumption.'''&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
  DigitalOut buzzer(P0_22);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
              buzzer=!buzzer;&lt;br /&gt;
              wait_ms(1);    &lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
=== Send data via BLE ===&lt;br /&gt;
&lt;br /&gt;
Introduction of nRF51 BLE&lt;br /&gt;
nRF51822 supports Bluetooth® Smart protocol stacks as well as 2.4GHz protocol stacks, including Gazell, both available as downloads. nRF51822 requires a single power supply and gives the user the option of using on chip linear regulators giving a supply range of 1.8-3.6V, a direct 1.8V mode and a on chip DC-DC buck converter giving a supply range of 2.1-3.6V. The use of the DC-DC converter can be dynamically controlled during run time and enables nRF51822 to operate at radio peak currents below 10 mA @ 3V supply (TX @ 0 dBm &amp;amp; RX).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-62.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will tell you how to send data via BLE between BLE SENSORS TAG and iPhone.&lt;br /&gt;
Pre-requisites&lt;br /&gt;
iPhone（IOS 4.0 or newer） x1&lt;br /&gt;
BLE SENSORS TAGS x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
BLE SENSORS TAG side&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE keyword and you will find BLE_HeartRate Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-63.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below. &lt;br /&gt;
&lt;br /&gt;
[[File:1-64.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
iPhone side&lt;br /&gt;
&lt;br /&gt;
Install LightBlue APP to your iPhone.&lt;br /&gt;
&lt;br /&gt;
[[File:1-65.png]]&lt;br /&gt;
&lt;br /&gt;
Put all together to test&lt;br /&gt;
&lt;br /&gt;
In the program, one button is used to make a variable plus 1, another button is used to make the variable minus 1. Then the program will send this variable to iPhone.&lt;br /&gt;
Open LightBlue on iPhone, and search LinkSprite device which is defined in the program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-66.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click this device and connect it.&lt;br /&gt;
Click Heart Rate Measurement-&amp;gt;Listen for...&lt;br /&gt;
&lt;br /&gt;
[[File:1-67.png]]&lt;br /&gt;
&lt;br /&gt;
If you press the buttons and the data received on iPhone will change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-68.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-69.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/BLE.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/HeartRateService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/BatteryService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/DeviceInformationService.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut led1(P0_19);&lt;br /&gt;
  DigitalOut led2(P0_20);&lt;br /&gt;
  DigitalIn key_p(P0_28);&lt;br /&gt;
  DigitalIn key_d(P0_29);&lt;br /&gt;
&lt;br /&gt;
  const static char     DEVICE_NAME[]        = &amp;quot;LinkSprite&amp;quot;;&lt;br /&gt;
  static const uint16_t uuid16_list[]     = {GattService::UUID_HEART_RATE_SERVICE,                                              GattService::UUID_DEVICE_INFORMATION_SERVICE};&lt;br /&gt;
  static volatile bool  triggerSensorPolling = false;&lt;br /&gt;
&lt;br /&gt;
  uint8_t hrmCounter = 100; // init HRM to 100bps&lt;br /&gt;
&lt;br /&gt;
  HeartRateService         *hrService;&lt;br /&gt;
  DeviceInformationService *deviceInfo;&lt;br /&gt;
&lt;br /&gt;
  void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE::Instance(BLE::DEFAULT_INSTANCE).gap().startAdvertising(); // restart advertising&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void periodicCallback(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */&lt;br /&gt;
      led2 = !led2;&lt;br /&gt;
      /* Note that the periodicCallback() executes in interrupt context, so it is safer to do&lt;br /&gt;
       * heavy-weight sensor polling from the main thread. */&lt;br /&gt;
      triggerSensorPolling = true;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void bleInitComplete(BLE::InitializationCompleteCallbackContext *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE &amp;amp;ble          = params-&amp;gt;ble;&lt;br /&gt;
      ble_error_t error = params-&amp;gt;error;&lt;br /&gt;
&lt;br /&gt;
      if (error != BLE_ERROR_NONE) {&lt;br /&gt;
          return;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      ble.gap().onDisconnection(disconnectionCallback);&lt;br /&gt;
&lt;br /&gt;
      /* Setup primary service. */&lt;br /&gt;
      hrService = new HeartRateService(ble, hrmCounter, HeartRateService::LOCATION_FINGER);&lt;br /&gt;
&lt;br /&gt;
      /* Setup auxiliary service. */&lt;br /&gt;
      deviceInfo = new DeviceInformationService(ble, &amp;quot;ARM&amp;quot;, &amp;quot;Model1&amp;quot;, &amp;quot;SN1&amp;quot;, &amp;quot;hw-rev1&amp;quot;, &amp;quot;fw-rev1&amp;quot;, &amp;quot;soft-rev1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
      /* Setup advertising. */&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, (uint8_t *)uuid16_list, sizeof(uuid16_list));&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::GENERIC_HEART_RATE_SENSOR);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME));&lt;br /&gt;
      ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);&lt;br /&gt;
      ble.gap().setAdvertisingInterval(100); /* 1000ms */&lt;br /&gt;
      ble.gap().startAdvertising();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = 1;&lt;br /&gt;
      led2 = 0;&lt;br /&gt;
      Ticker ticker;&lt;br /&gt;
      ticker.attach(periodicCallback, 1); // blink LED every second&lt;br /&gt;
&lt;br /&gt;
      BLE&amp;amp; ble = BLE::Instance(BLE::DEFAULT_INSTANCE);&lt;br /&gt;
      ble.init(bleInitComplete);&lt;br /&gt;
&lt;br /&gt;
      /* SpinWait for initialization to complete. This is necessary because the&lt;br /&gt;
       * BLE object is used in the main loop below. */&lt;br /&gt;
      while (ble.hasInitialized()  == false) { /* spin loop */ }&lt;br /&gt;
  &lt;br /&gt;
      // infinite loop&lt;br /&gt;
      while (1) &lt;br /&gt;
      {&lt;br /&gt;
          if(!key_p)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_p) &lt;br /&gt;
                  hrmCounter++;&lt;br /&gt;
              while(!key_p);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          if(!key_d)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_d) &lt;br /&gt;
                  hrmCounter--;&lt;br /&gt;
              while(!key_d);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          hrService-&amp;gt;updateHeartRate(hrmCounter);&lt;br /&gt;
          ble.waitForEvent(); // low power wait for event &lt;br /&gt;
  }}&lt;br /&gt;
&lt;br /&gt;
=== LIS3DH accelerometer ===&lt;br /&gt;
Introduction of LIS3DH&lt;br /&gt;
The LIS3DH is an ultra low-power high performance three axes linear accelerometer belonging to the “nano” family, with digital I2C/SPI serial interface standard output. The device features ultra low-power operational modes that allow advanced power saving and smart embedded functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-70.png]]&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG integrates LIS3DH accelerometer which used as SPI communication mode, as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-71.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to get the data from the LIS3DH on BLE SENSORS TAG using mbed IDE.&lt;br /&gt;
&lt;br /&gt;
Pre-requisites&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE_basic keyword and you will find BLE_basic Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-72.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below.&lt;br /&gt;
&lt;br /&gt;
[[File:1-73.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and download the hex file.&lt;br /&gt;
Connect BLE SENSORS TAG to your PC using Micro USB.&lt;br /&gt;
Move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
Run and Test&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-74.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-75png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
Baud rate: 9600&lt;br /&gt;
Data : 8 bit&lt;br /&gt;
Stop: 1bit&lt;br /&gt;
&lt;br /&gt;
[[File:1-76.png]]&lt;br /&gt;
&lt;br /&gt;
If you move BLE SENSORS TAG, the values of Dx, Dy and Dz shown on the Serial window will change. &lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  uint16_t x_a,y_a,z_a;&lt;br /&gt;
  bool flag = 0;&lt;br /&gt;
  SPI spi_master(P0_6,P0_5,P0_7); //mosi miso sclk &lt;br /&gt;
  DigitalOut cs(P0_4);&lt;br /&gt;
  Serial pc(P0_23,P0_25);&lt;br /&gt;
  uint8_t LIS3DH_SPI_RD(uint8_t addr)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t  temp;&lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);      &lt;br /&gt;
      temp=spi_master.write(0xff);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
      return temp;&lt;br /&gt;
  }&lt;br /&gt;
  void LIS3DH_SPI_WR(uint8_t addr,uint8_t wrdata)&lt;br /&gt;
  {  &lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);&lt;br /&gt;
      spi_master.write(wrdata);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
  }&lt;br /&gt;
  void SPI_LIS3DH_Init()&lt;br /&gt;
  {&lt;br /&gt;
     spi_master.format(8,3);&lt;br /&gt;
     spi_master.frequency(100000);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x24,0x80);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x20,0x17);&lt;br /&gt;
     LIS3DH_SPI_WR(0x23,0x80);&lt;br /&gt;
  }&lt;br /&gt;
  void get_val(void)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t Dx_L=1,Dy_L=1,Dz_L=1;&lt;br /&gt;
      uint8_t Dx_H=1,Dy_H=1,Dz_H=1;&lt;br /&gt;
      if(LIS3DH_SPI_RD(0x0f|0x80)==0x33)&lt;br /&gt;
      {&lt;br /&gt;
           printf(&amp;quot;check device ok!\r\n&amp;quot;);&lt;br /&gt;
           flag=1;&lt;br /&gt;
           Dx_H=LIS3DH_SPI_RD(0x29|0x80);   &lt;br /&gt;
           Dx_L=LIS3DH_SPI_RD(0x28|0x80);&lt;br /&gt;
           Dy_H=LIS3DH_SPI_RD(0x2b|0x80);&lt;br /&gt;
           Dy_L=LIS3DH_SPI_RD(0x2A|0x80);&lt;br /&gt;
           Dz_H=LIS3DH_SPI_RD(0x2d|0x80);&lt;br /&gt;
           Dz_L=LIS3DH_SPI_RD(0x2C|0x80);  &lt;br /&gt;
      }&lt;br /&gt;
      else printf(&amp;quot;check device err!\r\n&amp;quot;);&lt;br /&gt;
      x_a=Dx_H&amp;lt;&amp;lt;8|Dx_L/16;&lt;br /&gt;
      y_a=Dy_H&amp;lt;&amp;lt;8|Dy_L/16;&lt;br /&gt;
      z_a=Dz_H&amp;lt;&amp;lt;8|Dz_L/16;&lt;br /&gt;
  }&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
    SPI_LIS3DH_Init();&lt;br /&gt;
    while(1)&lt;br /&gt;
    {  &lt;br /&gt;
       get_val();&lt;br /&gt;
       if(flag)&lt;br /&gt;
       {&lt;br /&gt;
           printf(&amp;quot;Dx=:%d\r\n&amp;quot;,x_a);&lt;br /&gt;
           printf(&amp;quot;Dy=:%d\r\n&amp;quot;,y_a);&lt;br /&gt;
           printf(&amp;quot;Dz=:%d\r\n&amp;quot;,z_a);&lt;br /&gt;
           flag=0;&lt;br /&gt;
           wait(1);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BMP180 barometric pressure sensor ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resistive technology for high accuracy, ruggedness and long term stability. The chip only accepts 1.8V to 3.6V input voltage.&lt;br /&gt;
&lt;br /&gt;
[[File:1-77.png]]&lt;br /&gt;
&lt;br /&gt;
NRF51822 communicates with BMP180 using I2C port. The SCL port is connected to P0.18 and SDA port is connected to P0.17.&lt;br /&gt;
&lt;br /&gt;
[[File:1-79.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to use BMP180 to get barometric pressure and temperature data and print these data to serial port.&lt;br /&gt;
&lt;br /&gt;
=== Pre-requisites ===&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x 1&lt;br /&gt;
Micro USB cable x 1&lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using bmp180 keyword and you will find BMP180_example program.&lt;br /&gt;
Import a mbed libraries into BMP180_example.&lt;br /&gt;
&lt;br /&gt;
[[File:1-78.png]]&lt;br /&gt;
&lt;br /&gt;
Update the source code using the given source code below.&lt;br /&gt;
Compile it, you will get hex file.&lt;br /&gt;
Move it to jlink disk and program the BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
=== Run and Test ===&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-80.png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
*Baud rate: 9600&lt;br /&gt;
*Data : 8 bit&lt;br /&gt;
*Stop: 1 bit&lt;br /&gt;
&lt;br /&gt;
There will be data printed on the serial window.&lt;br /&gt;
&lt;br /&gt;
[[File:1-81.png]]&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
#include &amp;quot;BMP180.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Serial pc(P0_23,P0_25);&lt;br /&gt;
DigitalOut led(P0_20);&lt;br /&gt;
I2C i2c(P0_17, P0_18);&lt;br /&gt;
BMP180 bmp180(&amp;amp;i2c);&lt;br /&gt;
&lt;br /&gt;
int main(void) &lt;br /&gt;
 {&lt;br /&gt;
    led=0;&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        if (bmp180.init() != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error communicating with BMP180\n&amp;quot;);&lt;br /&gt;
        } &lt;br /&gt;
        else &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Initialized BMP180\n&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        bmp180.startTemperature();&lt;br /&gt;
        wait_ms(5);     // Wait for conversion to complete&lt;br /&gt;
        float temp;&lt;br /&gt;
        if(bmp180.getTemperature(&amp;amp;temp) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting temperature\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
        bmp180.startPressure(BMP180::ULTRA_LOW_POWER);&lt;br /&gt;
        wait_ms(10);    // Wait for conversion to complete&lt;br /&gt;
        int pressure;&lt;br /&gt;
        if(bmp180.getPressure(&amp;amp;pressure) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting pressure\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Pressure = %d Pa Temperature = %f C\n&amp;quot;, pressure, temp);&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Schematic ==&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmbed_interface_mcu.PDF lsmbed_interface_mcu]&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmed_sensor_tag.PDF lsmed_sensor_tag]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=File:1-49.png&amp;diff=7973</id>
		<title>File:1-49.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=File:1-49.png&amp;diff=7973"/>
		<updated>2016-01-25T02:03:53Z</updated>

		<summary type="html">&lt;p&gt;Youkee: Youkee uploaded a new version of File:1-49.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=File:1-49.png&amp;diff=7972</id>
		<title>File:1-49.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=File:1-49.png&amp;diff=7972"/>
		<updated>2016-01-25T02:01:06Z</updated>

		<summary type="html">&lt;p&gt;Youkee: Youkee uploaded a new version of File:1-49.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=File:1-49.png&amp;diff=7971</id>
		<title>File:1-49.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=File:1-49.png&amp;diff=7971"/>
		<updated>2016-01-25T01:59:41Z</updated>

		<summary type="html">&lt;p&gt;Youkee: Youkee uploaded a new version of File:1-49.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7970</id>
		<title>Mbed BLE Sensors Tag</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7970"/>
		<updated>2016-01-25T01:54:41Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Mbed BLE Sensors tag is a bluetooth 4.0 BLE sensor development board that is powered by Mbed. It integrates powerful devices, such as NRF51822, LIS3DH ,BMP180, buzzer, and dual-color LED.  It also embeds an mbed compatible programmer to make program and download application very convenient. &lt;br /&gt;
&lt;br /&gt;
The mbed BLE sensors tag is consisted of two modules:  one is a bluetooth 4.0 BLE sensors tag powered by NRF51822 which is a Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC. This mbed BLE sensor tag is mbed-enabled device which simplifies and speeds up the creation and deployment of bluetooth devices based on ARM micro-controllers. There is an mbed library supporting BLE sensors tag which provides the C/C++ software platform and libraries, and can speed up your BLE application development.&lt;br /&gt;
&lt;br /&gt;
The other one works as a programmer like Jlink, but it is compatible with ARM’s mbed. It greatly simplifies the programming process. You just copy the compiled hex file to an emulated disk, which is recognized by PC when you plug this programmer into the PC and the programmer will automatically download the program into BLE SENSORS TAG without any other setting.&lt;br /&gt;
&lt;br /&gt;
[[File:1-42.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-43.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
*NRF51822 Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC&lt;br /&gt;
*LIS3DH ultra low-power high performance three axes linear accelerometer &lt;br /&gt;
*BMP180 Bosch temperature and pressure sensor&lt;br /&gt;
*1 x mbed programmer powered by ATSAM3U2CA-AU ARM-based flash MCU&lt;br /&gt;
*8 x GPIO pins&lt;br /&gt;
*1 x UART port&lt;br /&gt;
*1 x Dual-color LED&lt;br /&gt;
*2 x User buttons&lt;br /&gt;
*1 x Buzzer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Blink ===&lt;br /&gt;
&lt;br /&gt;
There are dual-color LED with common anode mounted on the BLE SENSORS TAG, and the colors are green and red. LED_R is connected to P0.20 pin, and LED_G is connected to P0.19 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.png]]&lt;br /&gt;
&lt;br /&gt;
We use mbed online compiler as our development tool and the website address is :&lt;br /&gt;
https://developer.mbed.org/compiler&lt;br /&gt;
&lt;br /&gt;
You need to register an account for free, then go to compiler. You will get a website like the followings:&lt;br /&gt;
&lt;br /&gt;
[[File:1-45.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add Platform&lt;br /&gt;
&lt;br /&gt;
Click No device selected button to add a new platform.&lt;br /&gt;
&lt;br /&gt;
Click Add Platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-46.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select Nordic Semiconductor ASA on the left side bar. On the right side, you will get '''Nordic nRF51822''' platform and click it.&lt;br /&gt;
&lt;br /&gt;
[[File:Type.png]]&lt;br /&gt;
&lt;br /&gt;
Click Add to your mbed Compiler. This will add '''Nordic nRF51822''' platform to your mbed compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Board.png|200pixel]]&lt;br /&gt;
&lt;br /&gt;
Then click Open mbed compiler button to go to the online compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new program&lt;br /&gt;
&lt;br /&gt;
Create new program and add source code &lt;br /&gt;
&lt;br /&gt;
[[File:1-49.png]]&lt;br /&gt;
&lt;br /&gt;
Import the mbed libraries.&lt;br /&gt;
&lt;br /&gt;
[[File:1-50.png]]&lt;br /&gt;
&lt;br /&gt;
Search the mbed libraries and choose mbed, then import it.&lt;br /&gt;
&lt;br /&gt;
[[File:1-51.png]]&lt;br /&gt;
&lt;br /&gt;
Create main.cpp file and add the source code.&lt;br /&gt;
&lt;br /&gt;
[[File:1-52.png]]&lt;br /&gt;
&lt;br /&gt;
Click Compile button and you will get the hex file downloaded from this website, the name is edmbed_blinky_NRF51822.hex.&lt;br /&gt;
&lt;br /&gt;
[[File:1-53.png]]&lt;br /&gt;
&lt;br /&gt;
Compile and run&lt;br /&gt;
&lt;br /&gt;
*Connect the BLE sensor TAG to PC with Micro-USB cable, the PC will recognized a new disk whose nane is jlink. &lt;br /&gt;
*Copy or move your downloaded hex file to this disk.&lt;br /&gt;
*After several seconds, programming BLE sensor TAG will be finished. &lt;br /&gt;
*Please check the LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-54.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          LED_R=1;&lt;br /&gt;
          LED_G=1;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
          LED_R=0;&lt;br /&gt;
          LED_G=0;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
More information&lt;br /&gt;
If you want to get more materials about online mbed compiler, please check the following website:&lt;br /&gt;
1.https://developer.mbed.org/handbook/mbed-Compiler&lt;br /&gt;
2.https://developer.mbed.org/cookbook/Homepage &lt;br /&gt;
&lt;br /&gt;
=== Button Control ===&lt;br /&gt;
There are dual-button with common cathode mounted on the BLE SENSORS TAG which are key1 and key2. The key1 is connected to P0.28 pin, and key2 is connected to P0.29 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-55.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compile&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-56.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code, you will get hex file.&lt;br /&gt;
Move it to jink disk and program the BLE SENSORS TAG.&lt;br /&gt;
Press and release the key1 and key2 to check the status of LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-57.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-58.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
  DigitalIn key1(P0_28);&lt;br /&gt;
  DigitalIn key2(P0_29);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          if(!key1)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key1)&lt;br /&gt;
                  LED_G=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_G=1;&lt;br /&gt;
        &lt;br /&gt;
          if(!key2)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key2)&lt;br /&gt;
                  LED_R=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_R=1;&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Buzzer ===&lt;br /&gt;
BLE SENSORS TAG board provides a passive buzzer, and its frequency is about 1KHz. The buzzer is drove by 2N7002 MOS transistor. The control port is connected to P0.22 pin .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-59.png]]&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compiler.&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-60.png]]&lt;br /&gt;
&lt;br /&gt;
Move the downloaded hex file to jlink disk and program the BLE SENSORTS TAG.&lt;br /&gt;
Listen the sound from the Buzzer.&lt;br /&gt;
&lt;br /&gt;
'''Note：because the buzzer is drive by a MOS  transistor,  if you don't use it, you'd better set the P0.22 to low level, this can reduce the power consumption.'''&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
  DigitalOut buzzer(P0_22);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
              buzzer=!buzzer;&lt;br /&gt;
              wait_ms(1);    &lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
=== Send data via BLE ===&lt;br /&gt;
&lt;br /&gt;
Introduction of nRF51 BLE&lt;br /&gt;
nRF51822 supports Bluetooth® Smart protocol stacks as well as 2.4GHz protocol stacks, including Gazell, both available as downloads. nRF51822 requires a single power supply and gives the user the option of using on chip linear regulators giving a supply range of 1.8-3.6V, a direct 1.8V mode and a on chip DC-DC buck converter giving a supply range of 2.1-3.6V. The use of the DC-DC converter can be dynamically controlled during run time and enables nRF51822 to operate at radio peak currents below 10 mA @ 3V supply (TX @ 0 dBm &amp;amp; RX).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-62.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will tell you how to send data via BLE between BLE SENSORS TAG and iPhone.&lt;br /&gt;
Pre-requisites&lt;br /&gt;
iPhone（IOS 4.0 or newer） x1&lt;br /&gt;
BLE SENSORS TAGS x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
BLE SENSORS TAG side&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE keyword and you will find BLE_HeartRate Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-63.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below. &lt;br /&gt;
&lt;br /&gt;
[[File:1-64.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
iPhone side&lt;br /&gt;
&lt;br /&gt;
Install LightBlue APP to your iPhone.&lt;br /&gt;
&lt;br /&gt;
[[File:1-65.png]]&lt;br /&gt;
&lt;br /&gt;
Put all together to test&lt;br /&gt;
&lt;br /&gt;
In the program, one button is used to make a variable plus 1, another button is used to make the variable minus 1. Then the program will send this variable to iPhone.&lt;br /&gt;
Open LightBlue on iPhone, and search LinkSprite device which is defined in the program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-66.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click this device and connect it.&lt;br /&gt;
Click Heart Rate Measurement-&amp;gt;Listen for...&lt;br /&gt;
&lt;br /&gt;
[[File:1-67.png]]&lt;br /&gt;
&lt;br /&gt;
If you press the buttons and the data received on iPhone will change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-68.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-69.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/BLE.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/HeartRateService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/BatteryService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/DeviceInformationService.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut led1(P0_19);&lt;br /&gt;
  DigitalOut led2(P0_20);&lt;br /&gt;
  DigitalIn key_p(P0_28);&lt;br /&gt;
  DigitalIn key_d(P0_29);&lt;br /&gt;
&lt;br /&gt;
  const static char     DEVICE_NAME[]        = &amp;quot;LinkSprite&amp;quot;;&lt;br /&gt;
  static const uint16_t uuid16_list[]     = {GattService::UUID_HEART_RATE_SERVICE,                                              GattService::UUID_DEVICE_INFORMATION_SERVICE};&lt;br /&gt;
  static volatile bool  triggerSensorPolling = false;&lt;br /&gt;
&lt;br /&gt;
  uint8_t hrmCounter = 100; // init HRM to 100bps&lt;br /&gt;
&lt;br /&gt;
  HeartRateService         *hrService;&lt;br /&gt;
  DeviceInformationService *deviceInfo;&lt;br /&gt;
&lt;br /&gt;
  void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE::Instance(BLE::DEFAULT_INSTANCE).gap().startAdvertising(); // restart advertising&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void periodicCallback(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */&lt;br /&gt;
      led2 = !led2;&lt;br /&gt;
      /* Note that the periodicCallback() executes in interrupt context, so it is safer to do&lt;br /&gt;
       * heavy-weight sensor polling from the main thread. */&lt;br /&gt;
      triggerSensorPolling = true;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void bleInitComplete(BLE::InitializationCompleteCallbackContext *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE &amp;amp;ble          = params-&amp;gt;ble;&lt;br /&gt;
      ble_error_t error = params-&amp;gt;error;&lt;br /&gt;
&lt;br /&gt;
      if (error != BLE_ERROR_NONE) {&lt;br /&gt;
          return;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      ble.gap().onDisconnection(disconnectionCallback);&lt;br /&gt;
&lt;br /&gt;
      /* Setup primary service. */&lt;br /&gt;
      hrService = new HeartRateService(ble, hrmCounter, HeartRateService::LOCATION_FINGER);&lt;br /&gt;
&lt;br /&gt;
      /* Setup auxiliary service. */&lt;br /&gt;
      deviceInfo = new DeviceInformationService(ble, &amp;quot;ARM&amp;quot;, &amp;quot;Model1&amp;quot;, &amp;quot;SN1&amp;quot;, &amp;quot;hw-rev1&amp;quot;, &amp;quot;fw-rev1&amp;quot;, &amp;quot;soft-rev1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
      /* Setup advertising. */&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, (uint8_t *)uuid16_list, sizeof(uuid16_list));&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::GENERIC_HEART_RATE_SENSOR);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME));&lt;br /&gt;
      ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);&lt;br /&gt;
      ble.gap().setAdvertisingInterval(100); /* 1000ms */&lt;br /&gt;
      ble.gap().startAdvertising();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = 1;&lt;br /&gt;
      led2 = 0;&lt;br /&gt;
      Ticker ticker;&lt;br /&gt;
      ticker.attach(periodicCallback, 1); // blink LED every second&lt;br /&gt;
&lt;br /&gt;
      BLE&amp;amp; ble = BLE::Instance(BLE::DEFAULT_INSTANCE);&lt;br /&gt;
      ble.init(bleInitComplete);&lt;br /&gt;
&lt;br /&gt;
      /* SpinWait for initialization to complete. This is necessary because the&lt;br /&gt;
       * BLE object is used in the main loop below. */&lt;br /&gt;
      while (ble.hasInitialized()  == false) { /* spin loop */ }&lt;br /&gt;
  &lt;br /&gt;
      // infinite loop&lt;br /&gt;
      while (1) &lt;br /&gt;
      {&lt;br /&gt;
          if(!key_p)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_p) &lt;br /&gt;
                  hrmCounter++;&lt;br /&gt;
              while(!key_p);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          if(!key_d)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_d) &lt;br /&gt;
                  hrmCounter--;&lt;br /&gt;
              while(!key_d);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          hrService-&amp;gt;updateHeartRate(hrmCounter);&lt;br /&gt;
          ble.waitForEvent(); // low power wait for event &lt;br /&gt;
  }}&lt;br /&gt;
&lt;br /&gt;
=== LIS3DH accelerometer ===&lt;br /&gt;
Introduction of LIS3DH&lt;br /&gt;
The LIS3DH is an ultra low-power high performance three axes linear accelerometer belonging to the “nano” family, with digital I2C/SPI serial interface standard output. The device features ultra low-power operational modes that allow advanced power saving and smart embedded functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-70.png]]&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG integrates LIS3DH accelerometer which used as SPI communication mode, as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-71.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to get the data from the LIS3DH on BLE SENSORS TAG using mbed IDE.&lt;br /&gt;
&lt;br /&gt;
Pre-requisites&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE_basic keyword and you will find BLE_basic Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-72.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below.&lt;br /&gt;
&lt;br /&gt;
[[File:1-73.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and download the hex file.&lt;br /&gt;
Connect BLE SENSORS TAG to your PC using Micro USB.&lt;br /&gt;
Move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
Run and Test&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-74.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-75png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
Baud rate: 9600&lt;br /&gt;
Data : 8 bit&lt;br /&gt;
Stop: 1bit&lt;br /&gt;
&lt;br /&gt;
[[File:1-76.png]]&lt;br /&gt;
&lt;br /&gt;
If you move BLE SENSORS TAG, the values of Dx, Dy and Dz shown on the Serial window will change. &lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  uint16_t x_a,y_a,z_a;&lt;br /&gt;
  bool flag = 0;&lt;br /&gt;
  SPI spi_master(P0_6,P0_5,P0_7); //mosi miso sclk &lt;br /&gt;
  DigitalOut cs(P0_4);&lt;br /&gt;
  Serial pc(P0_23,P0_25);&lt;br /&gt;
  uint8_t LIS3DH_SPI_RD(uint8_t addr)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t  temp;&lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);      &lt;br /&gt;
      temp=spi_master.write(0xff);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
      return temp;&lt;br /&gt;
  }&lt;br /&gt;
  void LIS3DH_SPI_WR(uint8_t addr,uint8_t wrdata)&lt;br /&gt;
  {  &lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);&lt;br /&gt;
      spi_master.write(wrdata);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
  }&lt;br /&gt;
  void SPI_LIS3DH_Init()&lt;br /&gt;
  {&lt;br /&gt;
     spi_master.format(8,3);&lt;br /&gt;
     spi_master.frequency(100000);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x24,0x80);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x20,0x17);&lt;br /&gt;
     LIS3DH_SPI_WR(0x23,0x80);&lt;br /&gt;
  }&lt;br /&gt;
  void get_val(void)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t Dx_L=1,Dy_L=1,Dz_L=1;&lt;br /&gt;
      uint8_t Dx_H=1,Dy_H=1,Dz_H=1;&lt;br /&gt;
      if(LIS3DH_SPI_RD(0x0f|0x80)==0x33)&lt;br /&gt;
      {&lt;br /&gt;
           printf(&amp;quot;check device ok!\r\n&amp;quot;);&lt;br /&gt;
           flag=1;&lt;br /&gt;
           Dx_H=LIS3DH_SPI_RD(0x29|0x80);   &lt;br /&gt;
           Dx_L=LIS3DH_SPI_RD(0x28|0x80);&lt;br /&gt;
           Dy_H=LIS3DH_SPI_RD(0x2b|0x80);&lt;br /&gt;
           Dy_L=LIS3DH_SPI_RD(0x2A|0x80);&lt;br /&gt;
           Dz_H=LIS3DH_SPI_RD(0x2d|0x80);&lt;br /&gt;
           Dz_L=LIS3DH_SPI_RD(0x2C|0x80);  &lt;br /&gt;
      }&lt;br /&gt;
      else printf(&amp;quot;check device err!\r\n&amp;quot;);&lt;br /&gt;
      x_a=Dx_H&amp;lt;&amp;lt;8|Dx_L/16;&lt;br /&gt;
      y_a=Dy_H&amp;lt;&amp;lt;8|Dy_L/16;&lt;br /&gt;
      z_a=Dz_H&amp;lt;&amp;lt;8|Dz_L/16;&lt;br /&gt;
  }&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
    SPI_LIS3DH_Init();&lt;br /&gt;
    while(1)&lt;br /&gt;
    {  &lt;br /&gt;
       get_val();&lt;br /&gt;
       if(flag)&lt;br /&gt;
       {&lt;br /&gt;
           printf(&amp;quot;Dx=:%d\r\n&amp;quot;,x_a);&lt;br /&gt;
           printf(&amp;quot;Dy=:%d\r\n&amp;quot;,y_a);&lt;br /&gt;
           printf(&amp;quot;Dz=:%d\r\n&amp;quot;,z_a);&lt;br /&gt;
           flag=0;&lt;br /&gt;
           wait(1);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BMP180 barometric pressure sensor ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resistive technology for high accuracy, ruggedness and long term stability. The chip only accepts 1.8V to 3.6V input voltage.&lt;br /&gt;
&lt;br /&gt;
[[File:1-77.png]]&lt;br /&gt;
&lt;br /&gt;
NRF51822 communicates with BMP180 using I2C port. The SCL port is connected to P0.18 and SDA port is connected to P0.17.&lt;br /&gt;
&lt;br /&gt;
[[File:1-79.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to use BMP180 to get barometric pressure and temperature data and print these data to serial port.&lt;br /&gt;
&lt;br /&gt;
=== Pre-requisites ===&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x 1&lt;br /&gt;
Micro USB cable x 1&lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using bmp180 keyword and you will find BMP180_example program.&lt;br /&gt;
Import a mbed libraries into BMP180_example.&lt;br /&gt;
&lt;br /&gt;
[[File:1-78.png]]&lt;br /&gt;
&lt;br /&gt;
Update the source code using the given source code below.&lt;br /&gt;
Compile it, you will get hex file.&lt;br /&gt;
Move it to jlink disk and program the BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
=== Run and Test ===&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-80.png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
*Baud rate: 9600&lt;br /&gt;
*Data : 8 bit&lt;br /&gt;
*Stop: 1 bit&lt;br /&gt;
&lt;br /&gt;
There will be data printed on the serial window.&lt;br /&gt;
&lt;br /&gt;
[[File:1-81.png]]&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
#include &amp;quot;BMP180.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Serial pc(P0_23,P0_25);&lt;br /&gt;
DigitalOut led(P0_20);&lt;br /&gt;
I2C i2c(P0_17, P0_18);&lt;br /&gt;
BMP180 bmp180(&amp;amp;i2c);&lt;br /&gt;
&lt;br /&gt;
int main(void) &lt;br /&gt;
 {&lt;br /&gt;
    led=0;&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        if (bmp180.init() != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error communicating with BMP180\n&amp;quot;);&lt;br /&gt;
        } &lt;br /&gt;
        else &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Initialized BMP180\n&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        bmp180.startTemperature();&lt;br /&gt;
        wait_ms(5);     // Wait for conversion to complete&lt;br /&gt;
        float temp;&lt;br /&gt;
        if(bmp180.getTemperature(&amp;amp;temp) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting temperature\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
        bmp180.startPressure(BMP180::ULTRA_LOW_POWER);&lt;br /&gt;
        wait_ms(10);    // Wait for conversion to complete&lt;br /&gt;
        int pressure;&lt;br /&gt;
        if(bmp180.getPressure(&amp;amp;pressure) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting pressure\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Pressure = %d Pa Temperature = %f C\n&amp;quot;, pressure, temp);&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Schematic ==&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmbed_interface_mcu.PDF lsmbed_interface_mcu]&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmed_sensor_tag.PDF lsmed_sensor_tag]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=File:Board.png&amp;diff=7969</id>
		<title>File:Board.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=File:Board.png&amp;diff=7969"/>
		<updated>2016-01-25T01:47:23Z</updated>

		<summary type="html">&lt;p&gt;Youkee: Youkee uploaded a new version of File:Board.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7968</id>
		<title>Mbed BLE Sensors Tag</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7968"/>
		<updated>2016-01-25T01:43:21Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Mbed BLE Sensors tag is a bluetooth 4.0 BLE sensor development board that is powered by Mbed. It integrates powerful devices, such as NRF51822, LIS3DH ,BMP180, buzzer, and dual-color LED.  It also embeds an mbed compatible programmer to make program and download application very convenient. &lt;br /&gt;
&lt;br /&gt;
The mbed BLE sensors tag is consisted of two modules:  one is a bluetooth 4.0 BLE sensors tag powered by NRF51822 which is a Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC. This mbed BLE sensor tag is mbed-enabled device which simplifies and speeds up the creation and deployment of bluetooth devices based on ARM micro-controllers. There is an mbed library supporting BLE sensors tag which provides the C/C++ software platform and libraries, and can speed up your BLE application development.&lt;br /&gt;
&lt;br /&gt;
The other one works as a programmer like Jlink, but it is compatible with ARM’s mbed. It greatly simplifies the programming process. You just copy the compiled hex file to an emulated disk, which is recognized by PC when you plug this programmer into the PC and the programmer will automatically download the program into BLE SENSORS TAG without any other setting.&lt;br /&gt;
&lt;br /&gt;
[[File:1-42.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-43.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
*NRF51822 Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC&lt;br /&gt;
*LIS3DH ultra low-power high performance three axes linear accelerometer &lt;br /&gt;
*BMP180 Bosch temperature and pressure sensor&lt;br /&gt;
*1 x mbed programmer powered by ATSAM3U2CA-AU ARM-based flash MCU&lt;br /&gt;
*8 x GPIO pins&lt;br /&gt;
*1 x UART port&lt;br /&gt;
*1 x Dual-color LED&lt;br /&gt;
*2 x User buttons&lt;br /&gt;
*1 x Buzzer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Blink ===&lt;br /&gt;
&lt;br /&gt;
There are dual-color LED with common anode mounted on the BLE SENSORS TAG, and the colors are green and red. LED_R is connected to P0.20 pin, and LED_G is connected to P0.19 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.png]]&lt;br /&gt;
&lt;br /&gt;
We use mbed online compiler as our development tool and the website address is :&lt;br /&gt;
https://developer.mbed.org/compiler&lt;br /&gt;
&lt;br /&gt;
You need to register an account for free, then go to compiler. You will get a website like the followings:&lt;br /&gt;
&lt;br /&gt;
[[File:1-45.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add Platform&lt;br /&gt;
&lt;br /&gt;
Click No device selected button to add a new platform.&lt;br /&gt;
&lt;br /&gt;
Click Add Platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-46.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select Nordic Semiconductor ASA on the left side bar. On the right side, you will get '''Nordic nRF51822''' platform and click it.&lt;br /&gt;
&lt;br /&gt;
[[File:Type.png]]&lt;br /&gt;
&lt;br /&gt;
Click Add to your mbed Compiler. This will add '''Nordic nRF51822''' platform to your mbed compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Board.png]]&lt;br /&gt;
&lt;br /&gt;
Then click Open mbed compiler button to go to the online compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new program&lt;br /&gt;
&lt;br /&gt;
Create new program and add source code &lt;br /&gt;
&lt;br /&gt;
[[File:1-49.png]]&lt;br /&gt;
&lt;br /&gt;
Import the mbed libraries.&lt;br /&gt;
&lt;br /&gt;
[[File:1-50.png]]&lt;br /&gt;
&lt;br /&gt;
Search the mbed libraries and choose mbed, then import it.&lt;br /&gt;
&lt;br /&gt;
[[File:1-51.png]]&lt;br /&gt;
&lt;br /&gt;
Create main.cpp file and add the source code.&lt;br /&gt;
&lt;br /&gt;
[[File:1-52.png]]&lt;br /&gt;
&lt;br /&gt;
Click Compile button and you will get the hex file downloaded from this website, the name is edmbed_blinky_NRF51822.hex.&lt;br /&gt;
&lt;br /&gt;
[[File:1-53.png]]&lt;br /&gt;
&lt;br /&gt;
Compile and run&lt;br /&gt;
&lt;br /&gt;
*Connect the BLE sensor TAG to PC with Micro-USB cable, the PC will recognized a new disk whose nane is jlink. &lt;br /&gt;
*Copy or move your downloaded hex file to this disk.&lt;br /&gt;
*After several seconds, programming BLE sensor TAG will be finished. &lt;br /&gt;
*Please check the LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-54.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          LED_R=1;&lt;br /&gt;
          LED_G=1;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
          LED_R=0;&lt;br /&gt;
          LED_G=0;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
More information&lt;br /&gt;
If you want to get more materials about online mbed compiler, please check the following website:&lt;br /&gt;
1.https://developer.mbed.org/handbook/mbed-Compiler&lt;br /&gt;
2.https://developer.mbed.org/cookbook/Homepage &lt;br /&gt;
&lt;br /&gt;
=== Button Control ===&lt;br /&gt;
There are dual-button with common cathode mounted on the BLE SENSORS TAG which are key1 and key2. The key1 is connected to P0.28 pin, and key2 is connected to P0.29 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-55.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compile&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-56.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code, you will get hex file.&lt;br /&gt;
Move it to jink disk and program the BLE SENSORS TAG.&lt;br /&gt;
Press and release the key1 and key2 to check the status of LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-57.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-58.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
  DigitalIn key1(P0_28);&lt;br /&gt;
  DigitalIn key2(P0_29);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          if(!key1)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key1)&lt;br /&gt;
                  LED_G=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_G=1;&lt;br /&gt;
        &lt;br /&gt;
          if(!key2)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key2)&lt;br /&gt;
                  LED_R=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_R=1;&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Buzzer ===&lt;br /&gt;
BLE SENSORS TAG board provides a passive buzzer, and its frequency is about 1KHz. The buzzer is drove by 2N7002 MOS transistor. The control port is connected to P0.22 pin .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-59.png]]&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compiler.&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-60.png]]&lt;br /&gt;
&lt;br /&gt;
Move the downloaded hex file to jlink disk and program the BLE SENSORTS TAG.&lt;br /&gt;
Listen the sound from the Buzzer.&lt;br /&gt;
&lt;br /&gt;
'''Note：because the buzzer is drive by a MOS  transistor,  if you don't use it, you'd better set the P0.22 to low level, this can reduce the power consumption.'''&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
  DigitalOut buzzer(P0_22);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
              buzzer=!buzzer;&lt;br /&gt;
              wait_ms(1);    &lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
=== Send data via BLE ===&lt;br /&gt;
&lt;br /&gt;
Introduction of nRF51 BLE&lt;br /&gt;
nRF51822 supports Bluetooth® Smart protocol stacks as well as 2.4GHz protocol stacks, including Gazell, both available as downloads. nRF51822 requires a single power supply and gives the user the option of using on chip linear regulators giving a supply range of 1.8-3.6V, a direct 1.8V mode and a on chip DC-DC buck converter giving a supply range of 2.1-3.6V. The use of the DC-DC converter can be dynamically controlled during run time and enables nRF51822 to operate at radio peak currents below 10 mA @ 3V supply (TX @ 0 dBm &amp;amp; RX).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-62.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will tell you how to send data via BLE between BLE SENSORS TAG and iPhone.&lt;br /&gt;
Pre-requisites&lt;br /&gt;
iPhone（IOS 4.0 or newer） x1&lt;br /&gt;
BLE SENSORS TAGS x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
BLE SENSORS TAG side&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE keyword and you will find BLE_HeartRate Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-63.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below. &lt;br /&gt;
&lt;br /&gt;
[[File:1-64.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
iPhone side&lt;br /&gt;
&lt;br /&gt;
Install LightBlue APP to your iPhone.&lt;br /&gt;
&lt;br /&gt;
[[File:1-65.png]]&lt;br /&gt;
&lt;br /&gt;
Put all together to test&lt;br /&gt;
&lt;br /&gt;
In the program, one button is used to make a variable plus 1, another button is used to make the variable minus 1. Then the program will send this variable to iPhone.&lt;br /&gt;
Open LightBlue on iPhone, and search LinkSprite device which is defined in the program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-66.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click this device and connect it.&lt;br /&gt;
Click Heart Rate Measurement-&amp;gt;Listen for...&lt;br /&gt;
&lt;br /&gt;
[[File:1-67.png]]&lt;br /&gt;
&lt;br /&gt;
If you press the buttons and the data received on iPhone will change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-68.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-69.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/BLE.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/HeartRateService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/BatteryService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/DeviceInformationService.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut led1(P0_19);&lt;br /&gt;
  DigitalOut led2(P0_20);&lt;br /&gt;
  DigitalIn key_p(P0_28);&lt;br /&gt;
  DigitalIn key_d(P0_29);&lt;br /&gt;
&lt;br /&gt;
  const static char     DEVICE_NAME[]        = &amp;quot;LinkSprite&amp;quot;;&lt;br /&gt;
  static const uint16_t uuid16_list[]     = {GattService::UUID_HEART_RATE_SERVICE,                                              GattService::UUID_DEVICE_INFORMATION_SERVICE};&lt;br /&gt;
  static volatile bool  triggerSensorPolling = false;&lt;br /&gt;
&lt;br /&gt;
  uint8_t hrmCounter = 100; // init HRM to 100bps&lt;br /&gt;
&lt;br /&gt;
  HeartRateService         *hrService;&lt;br /&gt;
  DeviceInformationService *deviceInfo;&lt;br /&gt;
&lt;br /&gt;
  void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE::Instance(BLE::DEFAULT_INSTANCE).gap().startAdvertising(); // restart advertising&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void periodicCallback(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */&lt;br /&gt;
      led2 = !led2;&lt;br /&gt;
      /* Note that the periodicCallback() executes in interrupt context, so it is safer to do&lt;br /&gt;
       * heavy-weight sensor polling from the main thread. */&lt;br /&gt;
      triggerSensorPolling = true;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void bleInitComplete(BLE::InitializationCompleteCallbackContext *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE &amp;amp;ble          = params-&amp;gt;ble;&lt;br /&gt;
      ble_error_t error = params-&amp;gt;error;&lt;br /&gt;
&lt;br /&gt;
      if (error != BLE_ERROR_NONE) {&lt;br /&gt;
          return;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      ble.gap().onDisconnection(disconnectionCallback);&lt;br /&gt;
&lt;br /&gt;
      /* Setup primary service. */&lt;br /&gt;
      hrService = new HeartRateService(ble, hrmCounter, HeartRateService::LOCATION_FINGER);&lt;br /&gt;
&lt;br /&gt;
      /* Setup auxiliary service. */&lt;br /&gt;
      deviceInfo = new DeviceInformationService(ble, &amp;quot;ARM&amp;quot;, &amp;quot;Model1&amp;quot;, &amp;quot;SN1&amp;quot;, &amp;quot;hw-rev1&amp;quot;, &amp;quot;fw-rev1&amp;quot;, &amp;quot;soft-rev1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
      /* Setup advertising. */&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, (uint8_t *)uuid16_list, sizeof(uuid16_list));&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::GENERIC_HEART_RATE_SENSOR);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME));&lt;br /&gt;
      ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);&lt;br /&gt;
      ble.gap().setAdvertisingInterval(100); /* 1000ms */&lt;br /&gt;
      ble.gap().startAdvertising();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = 1;&lt;br /&gt;
      led2 = 0;&lt;br /&gt;
      Ticker ticker;&lt;br /&gt;
      ticker.attach(periodicCallback, 1); // blink LED every second&lt;br /&gt;
&lt;br /&gt;
      BLE&amp;amp; ble = BLE::Instance(BLE::DEFAULT_INSTANCE);&lt;br /&gt;
      ble.init(bleInitComplete);&lt;br /&gt;
&lt;br /&gt;
      /* SpinWait for initialization to complete. This is necessary because the&lt;br /&gt;
       * BLE object is used in the main loop below. */&lt;br /&gt;
      while (ble.hasInitialized()  == false) { /* spin loop */ }&lt;br /&gt;
  &lt;br /&gt;
      // infinite loop&lt;br /&gt;
      while (1) &lt;br /&gt;
      {&lt;br /&gt;
          if(!key_p)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_p) &lt;br /&gt;
                  hrmCounter++;&lt;br /&gt;
              while(!key_p);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          if(!key_d)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_d) &lt;br /&gt;
                  hrmCounter--;&lt;br /&gt;
              while(!key_d);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          hrService-&amp;gt;updateHeartRate(hrmCounter);&lt;br /&gt;
          ble.waitForEvent(); // low power wait for event &lt;br /&gt;
  }}&lt;br /&gt;
&lt;br /&gt;
=== LIS3DH accelerometer ===&lt;br /&gt;
Introduction of LIS3DH&lt;br /&gt;
The LIS3DH is an ultra low-power high performance three axes linear accelerometer belonging to the “nano” family, with digital I2C/SPI serial interface standard output. The device features ultra low-power operational modes that allow advanced power saving and smart embedded functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-70.png]]&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG integrates LIS3DH accelerometer which used as SPI communication mode, as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-71.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to get the data from the LIS3DH on BLE SENSORS TAG using mbed IDE.&lt;br /&gt;
&lt;br /&gt;
Pre-requisites&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE_basic keyword and you will find BLE_basic Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-72.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below.&lt;br /&gt;
&lt;br /&gt;
[[File:1-73.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and download the hex file.&lt;br /&gt;
Connect BLE SENSORS TAG to your PC using Micro USB.&lt;br /&gt;
Move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
Run and Test&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-74.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-75png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
Baud rate: 9600&lt;br /&gt;
Data : 8 bit&lt;br /&gt;
Stop: 1bit&lt;br /&gt;
&lt;br /&gt;
[[File:1-76.png]]&lt;br /&gt;
&lt;br /&gt;
If you move BLE SENSORS TAG, the values of Dx, Dy and Dz shown on the Serial window will change. &lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  uint16_t x_a,y_a,z_a;&lt;br /&gt;
  bool flag = 0;&lt;br /&gt;
  SPI spi_master(P0_6,P0_5,P0_7); //mosi miso sclk &lt;br /&gt;
  DigitalOut cs(P0_4);&lt;br /&gt;
  Serial pc(P0_23,P0_25);&lt;br /&gt;
  uint8_t LIS3DH_SPI_RD(uint8_t addr)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t  temp;&lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);      &lt;br /&gt;
      temp=spi_master.write(0xff);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
      return temp;&lt;br /&gt;
  }&lt;br /&gt;
  void LIS3DH_SPI_WR(uint8_t addr,uint8_t wrdata)&lt;br /&gt;
  {  &lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);&lt;br /&gt;
      spi_master.write(wrdata);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
  }&lt;br /&gt;
  void SPI_LIS3DH_Init()&lt;br /&gt;
  {&lt;br /&gt;
     spi_master.format(8,3);&lt;br /&gt;
     spi_master.frequency(100000);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x24,0x80);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x20,0x17);&lt;br /&gt;
     LIS3DH_SPI_WR(0x23,0x80);&lt;br /&gt;
  }&lt;br /&gt;
  void get_val(void)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t Dx_L=1,Dy_L=1,Dz_L=1;&lt;br /&gt;
      uint8_t Dx_H=1,Dy_H=1,Dz_H=1;&lt;br /&gt;
      if(LIS3DH_SPI_RD(0x0f|0x80)==0x33)&lt;br /&gt;
      {&lt;br /&gt;
           printf(&amp;quot;check device ok!\r\n&amp;quot;);&lt;br /&gt;
           flag=1;&lt;br /&gt;
           Dx_H=LIS3DH_SPI_RD(0x29|0x80);   &lt;br /&gt;
           Dx_L=LIS3DH_SPI_RD(0x28|0x80);&lt;br /&gt;
           Dy_H=LIS3DH_SPI_RD(0x2b|0x80);&lt;br /&gt;
           Dy_L=LIS3DH_SPI_RD(0x2A|0x80);&lt;br /&gt;
           Dz_H=LIS3DH_SPI_RD(0x2d|0x80);&lt;br /&gt;
           Dz_L=LIS3DH_SPI_RD(0x2C|0x80);  &lt;br /&gt;
      }&lt;br /&gt;
      else printf(&amp;quot;check device err!\r\n&amp;quot;);&lt;br /&gt;
      x_a=Dx_H&amp;lt;&amp;lt;8|Dx_L/16;&lt;br /&gt;
      y_a=Dy_H&amp;lt;&amp;lt;8|Dy_L/16;&lt;br /&gt;
      z_a=Dz_H&amp;lt;&amp;lt;8|Dz_L/16;&lt;br /&gt;
  }&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
    SPI_LIS3DH_Init();&lt;br /&gt;
    while(1)&lt;br /&gt;
    {  &lt;br /&gt;
       get_val();&lt;br /&gt;
       if(flag)&lt;br /&gt;
       {&lt;br /&gt;
           printf(&amp;quot;Dx=:%d\r\n&amp;quot;,x_a);&lt;br /&gt;
           printf(&amp;quot;Dy=:%d\r\n&amp;quot;,y_a);&lt;br /&gt;
           printf(&amp;quot;Dz=:%d\r\n&amp;quot;,z_a);&lt;br /&gt;
           flag=0;&lt;br /&gt;
           wait(1);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BMP180 barometric pressure sensor ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resistive technology for high accuracy, ruggedness and long term stability. The chip only accepts 1.8V to 3.6V input voltage.&lt;br /&gt;
&lt;br /&gt;
[[File:1-77.png]]&lt;br /&gt;
&lt;br /&gt;
NRF51822 communicates with BMP180 using I2C port. The SCL port is connected to P0.18 and SDA port is connected to P0.17.&lt;br /&gt;
&lt;br /&gt;
[[File:1-79.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to use BMP180 to get barometric pressure and temperature data and print these data to serial port.&lt;br /&gt;
&lt;br /&gt;
=== Pre-requisites ===&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x 1&lt;br /&gt;
Micro USB cable x 1&lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using bmp180 keyword and you will find BMP180_example program.&lt;br /&gt;
Import a mbed libraries into BMP180_example.&lt;br /&gt;
&lt;br /&gt;
[[File:1-78.png]]&lt;br /&gt;
&lt;br /&gt;
Update the source code using the given source code below.&lt;br /&gt;
Compile it, you will get hex file.&lt;br /&gt;
Move it to jlink disk and program the BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
=== Run and Test ===&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-80.png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
*Baud rate: 9600&lt;br /&gt;
*Data : 8 bit&lt;br /&gt;
*Stop: 1 bit&lt;br /&gt;
&lt;br /&gt;
There will be data printed on the serial window.&lt;br /&gt;
&lt;br /&gt;
[[File:1-81.png]]&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
#include &amp;quot;BMP180.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Serial pc(P0_23,P0_25);&lt;br /&gt;
DigitalOut led(P0_20);&lt;br /&gt;
I2C i2c(P0_17, P0_18);&lt;br /&gt;
BMP180 bmp180(&amp;amp;i2c);&lt;br /&gt;
&lt;br /&gt;
int main(void) &lt;br /&gt;
 {&lt;br /&gt;
    led=0;&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        if (bmp180.init() != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error communicating with BMP180\n&amp;quot;);&lt;br /&gt;
        } &lt;br /&gt;
        else &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Initialized BMP180\n&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        bmp180.startTemperature();&lt;br /&gt;
        wait_ms(5);     // Wait for conversion to complete&lt;br /&gt;
        float temp;&lt;br /&gt;
        if(bmp180.getTemperature(&amp;amp;temp) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting temperature\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
        bmp180.startPressure(BMP180::ULTRA_LOW_POWER);&lt;br /&gt;
        wait_ms(10);    // Wait for conversion to complete&lt;br /&gt;
        int pressure;&lt;br /&gt;
        if(bmp180.getPressure(&amp;amp;pressure) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting pressure\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Pressure = %d Pa Temperature = %f C\n&amp;quot;, pressure, temp);&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Schematic ==&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmbed_interface_mcu.PDF lsmbed_interface_mcu]&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmed_sensor_tag.PDF lsmed_sensor_tag]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=File:Board.png&amp;diff=7967</id>
		<title>File:Board.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=File:Board.png&amp;diff=7967"/>
		<updated>2016-01-25T01:38:41Z</updated>

		<summary type="html">&lt;p&gt;Youkee: Youkee uploaded a new version of File:Board.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7966</id>
		<title>Mbed BLE Sensors Tag</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7966"/>
		<updated>2016-01-25T01:35:19Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Mbed BLE Sensors tag is a bluetooth 4.0 BLE sensor development board that is powered by Mbed. It integrates powerful devices, such as NRF51822, LIS3DH ,BMP180, buzzer, and dual-color LED.  It also embeds an mbed compatible programmer to make program and download application very convenient. &lt;br /&gt;
&lt;br /&gt;
The mbed BLE sensors tag is consisted of two modules:  one is a bluetooth 4.0 BLE sensors tag powered by NRF51822 which is a Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC. This mbed BLE sensor tag is mbed-enabled device which simplifies and speeds up the creation and deployment of bluetooth devices based on ARM micro-controllers. There is an mbed library supporting BLE sensors tag which provides the C/C++ software platform and libraries, and can speed up your BLE application development.&lt;br /&gt;
&lt;br /&gt;
The other one works as a programmer like Jlink, but it is compatible with ARM’s mbed. It greatly simplifies the programming process. You just copy the compiled hex file to an emulated disk, which is recognized by PC when you plug this programmer into the PC and the programmer will automatically download the program into BLE SENSORS TAG without any other setting.&lt;br /&gt;
&lt;br /&gt;
[[File:1-42.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-43.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
*NRF51822 Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC&lt;br /&gt;
*LIS3DH ultra low-power high performance three axes linear accelerometer &lt;br /&gt;
*BMP180 Bosch temperature and pressure sensor&lt;br /&gt;
*1 x mbed programmer powered by ATSAM3U2CA-AU ARM-based flash MCU&lt;br /&gt;
*8 x GPIO pins&lt;br /&gt;
*1 x UART port&lt;br /&gt;
*1 x Dual-color LED&lt;br /&gt;
*2 x User buttons&lt;br /&gt;
*1 x Buzzer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Blink ===&lt;br /&gt;
&lt;br /&gt;
There are dual-color LED with common anode mounted on the BLE SENSORS TAG, and the colors are green and red. LED_R is connected to P0.20 pin, and LED_G is connected to P0.19 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.png]]&lt;br /&gt;
&lt;br /&gt;
We use mbed online compiler as our development tool and the website address is :&lt;br /&gt;
https://developer.mbed.org/compiler&lt;br /&gt;
&lt;br /&gt;
You need to register an account for free, then go to compiler. You will get a website like the followings:&lt;br /&gt;
&lt;br /&gt;
[[File:1-45.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add Platform&lt;br /&gt;
&lt;br /&gt;
Click No device selected button to add a new platform.&lt;br /&gt;
&lt;br /&gt;
Click Add Platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-46.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select Nordic Semiconductor ASA on the left side bar. On the right side, you will get '''Nordic nRF51822''' platform and click it.&lt;br /&gt;
&lt;br /&gt;
[[File:Type.png]]&lt;br /&gt;
&lt;br /&gt;
Click Add to your mbed Compiler. This will add '''Nordic nRF51822''' platform to your mbed compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:board.png]]&lt;br /&gt;
&lt;br /&gt;
Then click Open mbed compiler button to go to the online compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new program&lt;br /&gt;
&lt;br /&gt;
Create new program and add source code &lt;br /&gt;
&lt;br /&gt;
[[File:1-49.png]]&lt;br /&gt;
&lt;br /&gt;
Import the mbed libraries.&lt;br /&gt;
&lt;br /&gt;
[[File:1-50.png]]&lt;br /&gt;
&lt;br /&gt;
Search the mbed libraries and choose mbed, then import it.&lt;br /&gt;
&lt;br /&gt;
[[File:1-51.png]]&lt;br /&gt;
&lt;br /&gt;
Create main.cpp file and add the source code.&lt;br /&gt;
&lt;br /&gt;
[[File:1-52.png]]&lt;br /&gt;
&lt;br /&gt;
Click Compile button and you will get the hex file downloaded from this website, the name is edmbed_blinky_NRF51822.hex.&lt;br /&gt;
&lt;br /&gt;
[[File:1-53.png]]&lt;br /&gt;
&lt;br /&gt;
Compile and run&lt;br /&gt;
&lt;br /&gt;
*Connect the BLE sensor TAG to PC with Micro-USB cable, the PC will recognized a new disk whose nane is jlink. &lt;br /&gt;
*Copy or move your downloaded hex file to this disk.&lt;br /&gt;
*After several seconds, programming BLE sensor TAG will be finished. &lt;br /&gt;
*Please check the LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-54.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          LED_R=1;&lt;br /&gt;
          LED_G=1;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
          LED_R=0;&lt;br /&gt;
          LED_G=0;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
More information&lt;br /&gt;
If you want to get more materials about online mbed compiler, please check the following website:&lt;br /&gt;
1.https://developer.mbed.org/handbook/mbed-Compiler&lt;br /&gt;
2.https://developer.mbed.org/cookbook/Homepage &lt;br /&gt;
&lt;br /&gt;
=== Button Control ===&lt;br /&gt;
There are dual-button with common cathode mounted on the BLE SENSORS TAG which are key1 and key2. The key1 is connected to P0.28 pin, and key2 is connected to P0.29 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-55.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compile&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-56.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code, you will get hex file.&lt;br /&gt;
Move it to jink disk and program the BLE SENSORS TAG.&lt;br /&gt;
Press and release the key1 and key2 to check the status of LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-57.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-58.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
  DigitalIn key1(P0_28);&lt;br /&gt;
  DigitalIn key2(P0_29);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          if(!key1)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key1)&lt;br /&gt;
                  LED_G=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_G=1;&lt;br /&gt;
        &lt;br /&gt;
          if(!key2)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key2)&lt;br /&gt;
                  LED_R=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_R=1;&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Buzzer ===&lt;br /&gt;
BLE SENSORS TAG board provides a passive buzzer, and its frequency is about 1KHz. The buzzer is drove by 2N7002 MOS transistor. The control port is connected to P0.22 pin .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-59.png]]&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compiler.&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-60.png]]&lt;br /&gt;
&lt;br /&gt;
Move the downloaded hex file to jlink disk and program the BLE SENSORTS TAG.&lt;br /&gt;
Listen the sound from the Buzzer.&lt;br /&gt;
&lt;br /&gt;
'''Note：because the buzzer is drive by a MOS  transistor,  if you don't use it, you'd better set the P0.22 to low level, this can reduce the power consumption.'''&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
  DigitalOut buzzer(P0_22);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
              buzzer=!buzzer;&lt;br /&gt;
              wait_ms(1);    &lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
=== Send data via BLE ===&lt;br /&gt;
&lt;br /&gt;
Introduction of nRF51 BLE&lt;br /&gt;
nRF51822 supports Bluetooth® Smart protocol stacks as well as 2.4GHz protocol stacks, including Gazell, both available as downloads. nRF51822 requires a single power supply and gives the user the option of using on chip linear regulators giving a supply range of 1.8-3.6V, a direct 1.8V mode and a on chip DC-DC buck converter giving a supply range of 2.1-3.6V. The use of the DC-DC converter can be dynamically controlled during run time and enables nRF51822 to operate at radio peak currents below 10 mA @ 3V supply (TX @ 0 dBm &amp;amp; RX).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-62.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will tell you how to send data via BLE between BLE SENSORS TAG and iPhone.&lt;br /&gt;
Pre-requisites&lt;br /&gt;
iPhone（IOS 4.0 or newer） x1&lt;br /&gt;
BLE SENSORS TAGS x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
BLE SENSORS TAG side&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE keyword and you will find BLE_HeartRate Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-63.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below. &lt;br /&gt;
&lt;br /&gt;
[[File:1-64.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
iPhone side&lt;br /&gt;
&lt;br /&gt;
Install LightBlue APP to your iPhone.&lt;br /&gt;
&lt;br /&gt;
[[File:1-65.png]]&lt;br /&gt;
&lt;br /&gt;
Put all together to test&lt;br /&gt;
&lt;br /&gt;
In the program, one button is used to make a variable plus 1, another button is used to make the variable minus 1. Then the program will send this variable to iPhone.&lt;br /&gt;
Open LightBlue on iPhone, and search LinkSprite device which is defined in the program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-66.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click this device and connect it.&lt;br /&gt;
Click Heart Rate Measurement-&amp;gt;Listen for...&lt;br /&gt;
&lt;br /&gt;
[[File:1-67.png]]&lt;br /&gt;
&lt;br /&gt;
If you press the buttons and the data received on iPhone will change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-68.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-69.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/BLE.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/HeartRateService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/BatteryService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/DeviceInformationService.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut led1(P0_19);&lt;br /&gt;
  DigitalOut led2(P0_20);&lt;br /&gt;
  DigitalIn key_p(P0_28);&lt;br /&gt;
  DigitalIn key_d(P0_29);&lt;br /&gt;
&lt;br /&gt;
  const static char     DEVICE_NAME[]        = &amp;quot;LinkSprite&amp;quot;;&lt;br /&gt;
  static const uint16_t uuid16_list[]     = {GattService::UUID_HEART_RATE_SERVICE,                                              GattService::UUID_DEVICE_INFORMATION_SERVICE};&lt;br /&gt;
  static volatile bool  triggerSensorPolling = false;&lt;br /&gt;
&lt;br /&gt;
  uint8_t hrmCounter = 100; // init HRM to 100bps&lt;br /&gt;
&lt;br /&gt;
  HeartRateService         *hrService;&lt;br /&gt;
  DeviceInformationService *deviceInfo;&lt;br /&gt;
&lt;br /&gt;
  void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE::Instance(BLE::DEFAULT_INSTANCE).gap().startAdvertising(); // restart advertising&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void periodicCallback(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */&lt;br /&gt;
      led2 = !led2;&lt;br /&gt;
      /* Note that the periodicCallback() executes in interrupt context, so it is safer to do&lt;br /&gt;
       * heavy-weight sensor polling from the main thread. */&lt;br /&gt;
      triggerSensorPolling = true;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void bleInitComplete(BLE::InitializationCompleteCallbackContext *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE &amp;amp;ble          = params-&amp;gt;ble;&lt;br /&gt;
      ble_error_t error = params-&amp;gt;error;&lt;br /&gt;
&lt;br /&gt;
      if (error != BLE_ERROR_NONE) {&lt;br /&gt;
          return;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      ble.gap().onDisconnection(disconnectionCallback);&lt;br /&gt;
&lt;br /&gt;
      /* Setup primary service. */&lt;br /&gt;
      hrService = new HeartRateService(ble, hrmCounter, HeartRateService::LOCATION_FINGER);&lt;br /&gt;
&lt;br /&gt;
      /* Setup auxiliary service. */&lt;br /&gt;
      deviceInfo = new DeviceInformationService(ble, &amp;quot;ARM&amp;quot;, &amp;quot;Model1&amp;quot;, &amp;quot;SN1&amp;quot;, &amp;quot;hw-rev1&amp;quot;, &amp;quot;fw-rev1&amp;quot;, &amp;quot;soft-rev1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
      /* Setup advertising. */&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, (uint8_t *)uuid16_list, sizeof(uuid16_list));&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::GENERIC_HEART_RATE_SENSOR);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME));&lt;br /&gt;
      ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);&lt;br /&gt;
      ble.gap().setAdvertisingInterval(100); /* 1000ms */&lt;br /&gt;
      ble.gap().startAdvertising();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = 1;&lt;br /&gt;
      led2 = 0;&lt;br /&gt;
      Ticker ticker;&lt;br /&gt;
      ticker.attach(periodicCallback, 1); // blink LED every second&lt;br /&gt;
&lt;br /&gt;
      BLE&amp;amp; ble = BLE::Instance(BLE::DEFAULT_INSTANCE);&lt;br /&gt;
      ble.init(bleInitComplete);&lt;br /&gt;
&lt;br /&gt;
      /* SpinWait for initialization to complete. This is necessary because the&lt;br /&gt;
       * BLE object is used in the main loop below. */&lt;br /&gt;
      while (ble.hasInitialized()  == false) { /* spin loop */ }&lt;br /&gt;
  &lt;br /&gt;
      // infinite loop&lt;br /&gt;
      while (1) &lt;br /&gt;
      {&lt;br /&gt;
          if(!key_p)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_p) &lt;br /&gt;
                  hrmCounter++;&lt;br /&gt;
              while(!key_p);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          if(!key_d)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_d) &lt;br /&gt;
                  hrmCounter--;&lt;br /&gt;
              while(!key_d);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          hrService-&amp;gt;updateHeartRate(hrmCounter);&lt;br /&gt;
          ble.waitForEvent(); // low power wait for event &lt;br /&gt;
  }}&lt;br /&gt;
&lt;br /&gt;
=== LIS3DH accelerometer ===&lt;br /&gt;
Introduction of LIS3DH&lt;br /&gt;
The LIS3DH is an ultra low-power high performance three axes linear accelerometer belonging to the “nano” family, with digital I2C/SPI serial interface standard output. The device features ultra low-power operational modes that allow advanced power saving and smart embedded functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-70.png]]&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG integrates LIS3DH accelerometer which used as SPI communication mode, as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-71.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to get the data from the LIS3DH on BLE SENSORS TAG using mbed IDE.&lt;br /&gt;
&lt;br /&gt;
Pre-requisites&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE_basic keyword and you will find BLE_basic Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-72.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below.&lt;br /&gt;
&lt;br /&gt;
[[File:1-73.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and download the hex file.&lt;br /&gt;
Connect BLE SENSORS TAG to your PC using Micro USB.&lt;br /&gt;
Move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
Run and Test&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-74.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-75png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
Baud rate: 9600&lt;br /&gt;
Data : 8 bit&lt;br /&gt;
Stop: 1bit&lt;br /&gt;
&lt;br /&gt;
[[File:1-76.png]]&lt;br /&gt;
&lt;br /&gt;
If you move BLE SENSORS TAG, the values of Dx, Dy and Dz shown on the Serial window will change. &lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  uint16_t x_a,y_a,z_a;&lt;br /&gt;
  bool flag = 0;&lt;br /&gt;
  SPI spi_master(P0_6,P0_5,P0_7); //mosi miso sclk &lt;br /&gt;
  DigitalOut cs(P0_4);&lt;br /&gt;
  Serial pc(P0_23,P0_25);&lt;br /&gt;
  uint8_t LIS3DH_SPI_RD(uint8_t addr)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t  temp;&lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);      &lt;br /&gt;
      temp=spi_master.write(0xff);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
      return temp;&lt;br /&gt;
  }&lt;br /&gt;
  void LIS3DH_SPI_WR(uint8_t addr,uint8_t wrdata)&lt;br /&gt;
  {  &lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);&lt;br /&gt;
      spi_master.write(wrdata);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
  }&lt;br /&gt;
  void SPI_LIS3DH_Init()&lt;br /&gt;
  {&lt;br /&gt;
     spi_master.format(8,3);&lt;br /&gt;
     spi_master.frequency(100000);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x24,0x80);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x20,0x17);&lt;br /&gt;
     LIS3DH_SPI_WR(0x23,0x80);&lt;br /&gt;
  }&lt;br /&gt;
  void get_val(void)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t Dx_L=1,Dy_L=1,Dz_L=1;&lt;br /&gt;
      uint8_t Dx_H=1,Dy_H=1,Dz_H=1;&lt;br /&gt;
      if(LIS3DH_SPI_RD(0x0f|0x80)==0x33)&lt;br /&gt;
      {&lt;br /&gt;
           printf(&amp;quot;check device ok!\r\n&amp;quot;);&lt;br /&gt;
           flag=1;&lt;br /&gt;
           Dx_H=LIS3DH_SPI_RD(0x29|0x80);   &lt;br /&gt;
           Dx_L=LIS3DH_SPI_RD(0x28|0x80);&lt;br /&gt;
           Dy_H=LIS3DH_SPI_RD(0x2b|0x80);&lt;br /&gt;
           Dy_L=LIS3DH_SPI_RD(0x2A|0x80);&lt;br /&gt;
           Dz_H=LIS3DH_SPI_RD(0x2d|0x80);&lt;br /&gt;
           Dz_L=LIS3DH_SPI_RD(0x2C|0x80);  &lt;br /&gt;
      }&lt;br /&gt;
      else printf(&amp;quot;check device err!\r\n&amp;quot;);&lt;br /&gt;
      x_a=Dx_H&amp;lt;&amp;lt;8|Dx_L/16;&lt;br /&gt;
      y_a=Dy_H&amp;lt;&amp;lt;8|Dy_L/16;&lt;br /&gt;
      z_a=Dz_H&amp;lt;&amp;lt;8|Dz_L/16;&lt;br /&gt;
  }&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
    SPI_LIS3DH_Init();&lt;br /&gt;
    while(1)&lt;br /&gt;
    {  &lt;br /&gt;
       get_val();&lt;br /&gt;
       if(flag)&lt;br /&gt;
       {&lt;br /&gt;
           printf(&amp;quot;Dx=:%d\r\n&amp;quot;,x_a);&lt;br /&gt;
           printf(&amp;quot;Dy=:%d\r\n&amp;quot;,y_a);&lt;br /&gt;
           printf(&amp;quot;Dz=:%d\r\n&amp;quot;,z_a);&lt;br /&gt;
           flag=0;&lt;br /&gt;
           wait(1);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BMP180 barometric pressure sensor ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resistive technology for high accuracy, ruggedness and long term stability. The chip only accepts 1.8V to 3.6V input voltage.&lt;br /&gt;
&lt;br /&gt;
[[File:1-77.png]]&lt;br /&gt;
&lt;br /&gt;
NRF51822 communicates with BMP180 using I2C port. The SCL port is connected to P0.18 and SDA port is connected to P0.17.&lt;br /&gt;
&lt;br /&gt;
[[File:1-79.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to use BMP180 to get barometric pressure and temperature data and print these data to serial port.&lt;br /&gt;
&lt;br /&gt;
=== Pre-requisites ===&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x 1&lt;br /&gt;
Micro USB cable x 1&lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using bmp180 keyword and you will find BMP180_example program.&lt;br /&gt;
Import a mbed libraries into BMP180_example.&lt;br /&gt;
&lt;br /&gt;
[[File:1-78.png]]&lt;br /&gt;
&lt;br /&gt;
Update the source code using the given source code below.&lt;br /&gt;
Compile it, you will get hex file.&lt;br /&gt;
Move it to jlink disk and program the BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
=== Run and Test ===&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-80.png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
*Baud rate: 9600&lt;br /&gt;
*Data : 8 bit&lt;br /&gt;
*Stop: 1 bit&lt;br /&gt;
&lt;br /&gt;
There will be data printed on the serial window.&lt;br /&gt;
&lt;br /&gt;
[[File:1-81.png]]&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
#include &amp;quot;BMP180.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Serial pc(P0_23,P0_25);&lt;br /&gt;
DigitalOut led(P0_20);&lt;br /&gt;
I2C i2c(P0_17, P0_18);&lt;br /&gt;
BMP180 bmp180(&amp;amp;i2c);&lt;br /&gt;
&lt;br /&gt;
int main(void) &lt;br /&gt;
 {&lt;br /&gt;
    led=0;&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        if (bmp180.init() != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error communicating with BMP180\n&amp;quot;);&lt;br /&gt;
        } &lt;br /&gt;
        else &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Initialized BMP180\n&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        bmp180.startTemperature();&lt;br /&gt;
        wait_ms(5);     // Wait for conversion to complete&lt;br /&gt;
        float temp;&lt;br /&gt;
        if(bmp180.getTemperature(&amp;amp;temp) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting temperature\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
        bmp180.startPressure(BMP180::ULTRA_LOW_POWER);&lt;br /&gt;
        wait_ms(10);    // Wait for conversion to complete&lt;br /&gt;
        int pressure;&lt;br /&gt;
        if(bmp180.getPressure(&amp;amp;pressure) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting pressure\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Pressure = %d Pa Temperature = %f C\n&amp;quot;, pressure, temp);&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Schematic ==&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmbed_interface_mcu.PDF lsmbed_interface_mcu]&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmed_sensor_tag.PDF lsmed_sensor_tag]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=File:Board.png&amp;diff=7965</id>
		<title>File:Board.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=File:Board.png&amp;diff=7965"/>
		<updated>2016-01-25T01:34:24Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=File:Type.png&amp;diff=7964</id>
		<title>File:Type.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=File:Type.png&amp;diff=7964"/>
		<updated>2016-01-25T01:31:44Z</updated>

		<summary type="html">&lt;p&gt;Youkee: Platforms selection&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Platforms selection&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7963</id>
		<title>Mbed BLE Sensors Tag</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=Mbed_BLE_Sensors_Tag&amp;diff=7963"/>
		<updated>2016-01-25T01:29:03Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The Mbed BLE Sensors tag is a bluetooth 4.0 BLE sensor development board that is powered by Mbed. It integrates powerful devices, such as NRF51822, LIS3DH ,BMP180, buzzer, and dual-color LED.  It also embeds an mbed compatible programmer to make program and download application very convenient. &lt;br /&gt;
&lt;br /&gt;
The mbed BLE sensors tag is consisted of two modules:  one is a bluetooth 4.0 BLE sensors tag powered by NRF51822 which is a Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC. This mbed BLE sensor tag is mbed-enabled device which simplifies and speeds up the creation and deployment of bluetooth devices based on ARM micro-controllers. There is an mbed library supporting BLE sensors tag which provides the C/C++ software platform and libraries, and can speed up your BLE application development.&lt;br /&gt;
&lt;br /&gt;
The other one works as a programmer like Jlink, but it is compatible with ARM’s mbed. It greatly simplifies the programming process. You just copy the compiled hex file to an emulated disk, which is recognized by PC when you plug this programmer into the PC and the programmer will automatically download the program into BLE SENSORS TAG without any other setting.&lt;br /&gt;
&lt;br /&gt;
[[File:1-42.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-43.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
*NRF51822 Bluetooth Low Energy &amp;amp; 2.4GHz Wireless SOC&lt;br /&gt;
*LIS3DH ultra low-power high performance three axes linear accelerometer &lt;br /&gt;
*BMP180 Bosch temperature and pressure sensor&lt;br /&gt;
*1 x mbed programmer powered by ATSAM3U2CA-AU ARM-based flash MCU&lt;br /&gt;
*8 x GPIO pins&lt;br /&gt;
*1 x UART port&lt;br /&gt;
*1 x Dual-color LED&lt;br /&gt;
*2 x User buttons&lt;br /&gt;
*1 x Buzzer&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Blink ===&lt;br /&gt;
&lt;br /&gt;
There are dual-color LED with common anode mounted on the BLE SENSORS TAG, and the colors are green and red. LED_R is connected to P0.20 pin, and LED_G is connected to P0.19 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-44.png]]&lt;br /&gt;
&lt;br /&gt;
We use mbed online compiler as our development tool and the website address is :&lt;br /&gt;
https://developer.mbed.org/compiler&lt;br /&gt;
&lt;br /&gt;
You need to register an account for free, then go to compiler. You will get a website like the followings:&lt;br /&gt;
&lt;br /&gt;
[[File:1-45.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add Platform&lt;br /&gt;
&lt;br /&gt;
Click No device selected button to add a new platform.&lt;br /&gt;
&lt;br /&gt;
Click Add Platform.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-46.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select Nordic Semiconductor ASA on the left side bar. On the right side, you will get '''Nordic nRF51822''' platform and click it.&lt;br /&gt;
&lt;br /&gt;
[[File:1-47.png]]&lt;br /&gt;
&lt;br /&gt;
Click Add to your mbed Compiler. This will add '''Nordic nRF51822''' platform to your mbed compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-48.png]]&lt;br /&gt;
&lt;br /&gt;
Then click Open mbed compiler button to go to the online compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new program&lt;br /&gt;
&lt;br /&gt;
Create new program and add source code &lt;br /&gt;
&lt;br /&gt;
[[File:1-49.png]]&lt;br /&gt;
&lt;br /&gt;
Import the mbed libraries.&lt;br /&gt;
&lt;br /&gt;
[[File:1-50.png]]&lt;br /&gt;
&lt;br /&gt;
Search the mbed libraries and choose mbed, then import it.&lt;br /&gt;
&lt;br /&gt;
[[File:1-51.png]]&lt;br /&gt;
&lt;br /&gt;
Create main.cpp file and add the source code.&lt;br /&gt;
&lt;br /&gt;
[[File:1-52.png]]&lt;br /&gt;
&lt;br /&gt;
Click Compile button and you will get the hex file downloaded from this website, the name is edmbed_blinky_NRF51822.hex.&lt;br /&gt;
&lt;br /&gt;
[[File:1-53.png]]&lt;br /&gt;
&lt;br /&gt;
Compile and run&lt;br /&gt;
&lt;br /&gt;
*Connect the BLE sensor TAG to PC with Micro-USB cable, the PC will recognized a new disk whose nane is jlink. &lt;br /&gt;
*Copy or move your downloaded hex file to this disk.&lt;br /&gt;
*After several seconds, programming BLE sensor TAG will be finished. &lt;br /&gt;
*Please check the LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-54.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          LED_R=1;&lt;br /&gt;
          LED_G=1;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
          LED_R=0;&lt;br /&gt;
          LED_G=0;&lt;br /&gt;
          wait(0.5);&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
More information&lt;br /&gt;
If you want to get more materials about online mbed compiler, please check the following website:&lt;br /&gt;
1.https://developer.mbed.org/handbook/mbed-Compiler&lt;br /&gt;
2.https://developer.mbed.org/cookbook/Homepage &lt;br /&gt;
&lt;br /&gt;
=== Button Control ===&lt;br /&gt;
There are dual-button with common cathode mounted on the BLE SENSORS TAG which are key1 and key2. The key1 is connected to P0.28 pin, and key2 is connected to P0.29 pin.&lt;br /&gt;
&lt;br /&gt;
[[File:1-55.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compile&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-56.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code, you will get hex file.&lt;br /&gt;
Move it to jink disk and program the BLE SENSORS TAG.&lt;br /&gt;
Press and release the key1 and key2 to check the status of LED_R and LED_G.&lt;br /&gt;
&lt;br /&gt;
[[File:1-57.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-58.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut LED_R(P0_20);&lt;br /&gt;
  DigitalOut LED_G(P0_19);&lt;br /&gt;
  DigitalIn key1(P0_28);&lt;br /&gt;
  DigitalIn key2(P0_29);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
          if(!key1)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key1)&lt;br /&gt;
                  LED_G=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_G=1;&lt;br /&gt;
        &lt;br /&gt;
          if(!key2)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key2)&lt;br /&gt;
                  LED_R=0;    &lt;br /&gt;
          }&lt;br /&gt;
          else LED_R=1;&lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Buzzer ===&lt;br /&gt;
BLE SENSORS TAG board provides a passive buzzer, and its frequency is about 1KHz. The buzzer is drove by 2N7002 MOS transistor. The control port is connected to P0.22 pin .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-59.png]]&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open the mbed online compiler.&lt;br /&gt;
Add the following source code to the main.cpp which you created before, or you can create a new program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-60.png]]&lt;br /&gt;
&lt;br /&gt;
Move the downloaded hex file to jlink disk and program the BLE SENSORTS TAG.&lt;br /&gt;
Listen the sound from the Buzzer.&lt;br /&gt;
&lt;br /&gt;
'''Note：because the buzzer is drive by a MOS  transistor,  if you don't use it, you'd better set the P0.22 to low level, this can reduce the power consumption.'''&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
  DigitalOut buzzer(P0_22);&lt;br /&gt;
  int main()&lt;br /&gt;
  {&lt;br /&gt;
      while(1)&lt;br /&gt;
      {&lt;br /&gt;
              buzzer=!buzzer;&lt;br /&gt;
              wait_ms(1);    &lt;br /&gt;
      } &lt;br /&gt;
  }&lt;br /&gt;
 &lt;br /&gt;
=== Send data via BLE ===&lt;br /&gt;
&lt;br /&gt;
Introduction of nRF51 BLE&lt;br /&gt;
nRF51822 supports Bluetooth® Smart protocol stacks as well as 2.4GHz protocol stacks, including Gazell, both available as downloads. nRF51822 requires a single power supply and gives the user the option of using on chip linear regulators giving a supply range of 1.8-3.6V, a direct 1.8V mode and a on chip DC-DC buck converter giving a supply range of 2.1-3.6V. The use of the DC-DC converter can be dynamically controlled during run time and enables nRF51822 to operate at radio peak currents below 10 mA @ 3V supply (TX @ 0 dBm &amp;amp; RX).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-62.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will tell you how to send data via BLE between BLE SENSORS TAG and iPhone.&lt;br /&gt;
Pre-requisites&lt;br /&gt;
iPhone（IOS 4.0 or newer） x1&lt;br /&gt;
BLE SENSORS TAGS x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
BLE SENSORS TAG side&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE keyword and you will find BLE_HeartRate Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-63.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below. &lt;br /&gt;
&lt;br /&gt;
[[File:1-64.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
iPhone side&lt;br /&gt;
&lt;br /&gt;
Install LightBlue APP to your iPhone.&lt;br /&gt;
&lt;br /&gt;
[[File:1-65.png]]&lt;br /&gt;
&lt;br /&gt;
Put all together to test&lt;br /&gt;
&lt;br /&gt;
In the program, one button is used to make a variable plus 1, another button is used to make the variable minus 1. Then the program will send this variable to iPhone.&lt;br /&gt;
Open LightBlue on iPhone, and search LinkSprite device which is defined in the program.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-66.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click this device and connect it.&lt;br /&gt;
Click Heart Rate Measurement-&amp;gt;Listen for...&lt;br /&gt;
&lt;br /&gt;
[[File:1-67.png]]&lt;br /&gt;
&lt;br /&gt;
If you press the buttons and the data received on iPhone will change.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-68.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-69.png]]&lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/BLE.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/HeartRateService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/BatteryService.h&amp;quot;&lt;br /&gt;
  #include &amp;quot;ble/services/DeviceInformationService.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  DigitalOut led1(P0_19);&lt;br /&gt;
  DigitalOut led2(P0_20);&lt;br /&gt;
  DigitalIn key_p(P0_28);&lt;br /&gt;
  DigitalIn key_d(P0_29);&lt;br /&gt;
&lt;br /&gt;
  const static char     DEVICE_NAME[]        = &amp;quot;LinkSprite&amp;quot;;&lt;br /&gt;
  static const uint16_t uuid16_list[]     = {GattService::UUID_HEART_RATE_SERVICE,                                              GattService::UUID_DEVICE_INFORMATION_SERVICE};&lt;br /&gt;
  static volatile bool  triggerSensorPolling = false;&lt;br /&gt;
&lt;br /&gt;
  uint8_t hrmCounter = 100; // init HRM to 100bps&lt;br /&gt;
&lt;br /&gt;
  HeartRateService         *hrService;&lt;br /&gt;
  DeviceInformationService *deviceInfo;&lt;br /&gt;
&lt;br /&gt;
  void disconnectionCallback(const Gap::DisconnectionCallbackParams_t *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE::Instance(BLE::DEFAULT_INSTANCE).gap().startAdvertising(); // restart advertising&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void periodicCallback(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */&lt;br /&gt;
      led2 = !led2;&lt;br /&gt;
      /* Note that the periodicCallback() executes in interrupt context, so it is safer to do&lt;br /&gt;
       * heavy-weight sensor polling from the main thread. */&lt;br /&gt;
      triggerSensorPolling = true;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  void bleInitComplete(BLE::InitializationCompleteCallbackContext *params)&lt;br /&gt;
  {&lt;br /&gt;
      BLE &amp;amp;ble          = params-&amp;gt;ble;&lt;br /&gt;
      ble_error_t error = params-&amp;gt;error;&lt;br /&gt;
&lt;br /&gt;
      if (error != BLE_ERROR_NONE) {&lt;br /&gt;
          return;&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      ble.gap().onDisconnection(disconnectionCallback);&lt;br /&gt;
&lt;br /&gt;
      /* Setup primary service. */&lt;br /&gt;
      hrService = new HeartRateService(ble, hrmCounter, HeartRateService::LOCATION_FINGER);&lt;br /&gt;
&lt;br /&gt;
      /* Setup auxiliary service. */&lt;br /&gt;
      deviceInfo = new DeviceInformationService(ble, &amp;quot;ARM&amp;quot;, &amp;quot;Model1&amp;quot;, &amp;quot;SN1&amp;quot;, &amp;quot;hw-rev1&amp;quot;, &amp;quot;fw-rev1&amp;quot;, &amp;quot;soft-rev1&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
      /* Setup advertising. */&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED | GapAdvertisingData::LE_GENERAL_DISCOVERABLE);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_16BIT_SERVICE_IDS, (uint8_t *)uuid16_list, sizeof(uuid16_list));&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::GENERIC_HEART_RATE_SENSOR);&lt;br /&gt;
      ble.gap().accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LOCAL_NAME, (uint8_t *)DEVICE_NAME, sizeof(DEVICE_NAME));&lt;br /&gt;
      ble.gap().setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED);&lt;br /&gt;
      ble.gap().setAdvertisingInterval(100); /* 1000ms */&lt;br /&gt;
      ble.gap().startAdvertising();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
      led1 = 1;&lt;br /&gt;
      led2 = 0;&lt;br /&gt;
      Ticker ticker;&lt;br /&gt;
      ticker.attach(periodicCallback, 1); // blink LED every second&lt;br /&gt;
&lt;br /&gt;
      BLE&amp;amp; ble = BLE::Instance(BLE::DEFAULT_INSTANCE);&lt;br /&gt;
      ble.init(bleInitComplete);&lt;br /&gt;
&lt;br /&gt;
      /* SpinWait for initialization to complete. This is necessary because the&lt;br /&gt;
       * BLE object is used in the main loop below. */&lt;br /&gt;
      while (ble.hasInitialized()  == false) { /* spin loop */ }&lt;br /&gt;
  &lt;br /&gt;
      // infinite loop&lt;br /&gt;
      while (1) &lt;br /&gt;
      {&lt;br /&gt;
          if(!key_p)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_p) &lt;br /&gt;
                  hrmCounter++;&lt;br /&gt;
              while(!key_p);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          if(!key_d)&lt;br /&gt;
          {&lt;br /&gt;
              wait_ms(10);&lt;br /&gt;
              if(!key_d) &lt;br /&gt;
                  hrmCounter--;&lt;br /&gt;
              while(!key_d);    &lt;br /&gt;
          }&lt;br /&gt;
          &lt;br /&gt;
          hrService-&amp;gt;updateHeartRate(hrmCounter);&lt;br /&gt;
          ble.waitForEvent(); // low power wait for event &lt;br /&gt;
  }}&lt;br /&gt;
&lt;br /&gt;
=== LIS3DH accelerometer ===&lt;br /&gt;
Introduction of LIS3DH&lt;br /&gt;
The LIS3DH is an ultra low-power high performance three axes linear accelerometer belonging to the “nano” family, with digital I2C/SPI serial interface standard output. The device features ultra low-power operational modes that allow advanced power saving and smart embedded functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-70.png]]&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG integrates LIS3DH accelerometer which used as SPI communication mode, as shown below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:1-71.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to get the data from the LIS3DH on BLE SENSORS TAG using mbed IDE.&lt;br /&gt;
&lt;br /&gt;
Pre-requisites&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x1&lt;br /&gt;
Micro USB cable x1  &lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
Steps&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using BLE_basic keyword and you will find BLE_basic Program.&lt;br /&gt;
&lt;br /&gt;
[[File:1-72.png]]&lt;br /&gt;
&lt;br /&gt;
Open the main.cpp and modify it based on the code given below.&lt;br /&gt;
&lt;br /&gt;
[[File:1-73.png]]&lt;br /&gt;
&lt;br /&gt;
Compile the source code and download the hex file.&lt;br /&gt;
Connect BLE SENSORS TAG to your PC using Micro USB.&lt;br /&gt;
Move the downloaded hex file to jlink disk.&lt;br /&gt;
After several seconds, Programming the BLE SENSORS TAG will be finished.&lt;br /&gt;
&lt;br /&gt;
Run and Test&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-74.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:1-75png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
Baud rate: 9600&lt;br /&gt;
Data : 8 bit&lt;br /&gt;
Stop: 1bit&lt;br /&gt;
&lt;br /&gt;
[[File:1-76.png]]&lt;br /&gt;
&lt;br /&gt;
If you move BLE SENSORS TAG, the values of Dx, Dy and Dz shown on the Serial window will change. &lt;br /&gt;
&lt;br /&gt;
Source code&lt;br /&gt;
&lt;br /&gt;
  #include&amp;lt;mbed.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  uint16_t x_a,y_a,z_a;&lt;br /&gt;
  bool flag = 0;&lt;br /&gt;
  SPI spi_master(P0_6,P0_5,P0_7); //mosi miso sclk &lt;br /&gt;
  DigitalOut cs(P0_4);&lt;br /&gt;
  Serial pc(P0_23,P0_25);&lt;br /&gt;
  uint8_t LIS3DH_SPI_RD(uint8_t addr)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t  temp;&lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);      &lt;br /&gt;
      temp=spi_master.write(0xff);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
      return temp;&lt;br /&gt;
  }&lt;br /&gt;
  void LIS3DH_SPI_WR(uint8_t addr,uint8_t wrdata)&lt;br /&gt;
  {  &lt;br /&gt;
      cs = 0;&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      spi_master.write(addr);&lt;br /&gt;
      spi_master.write(wrdata);&lt;br /&gt;
      wait_us(10);&lt;br /&gt;
      cs = 1;&lt;br /&gt;
  }&lt;br /&gt;
  void SPI_LIS3DH_Init()&lt;br /&gt;
  {&lt;br /&gt;
     spi_master.format(8,3);&lt;br /&gt;
     spi_master.frequency(100000);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x24,0x80);&lt;br /&gt;
     wait_ms(5);&lt;br /&gt;
     LIS3DH_SPI_WR(0x20,0x17);&lt;br /&gt;
     LIS3DH_SPI_WR(0x23,0x80);&lt;br /&gt;
  }&lt;br /&gt;
  void get_val(void)&lt;br /&gt;
  {&lt;br /&gt;
      uint8_t Dx_L=1,Dy_L=1,Dz_L=1;&lt;br /&gt;
      uint8_t Dx_H=1,Dy_H=1,Dz_H=1;&lt;br /&gt;
      if(LIS3DH_SPI_RD(0x0f|0x80)==0x33)&lt;br /&gt;
      {&lt;br /&gt;
           printf(&amp;quot;check device ok!\r\n&amp;quot;);&lt;br /&gt;
           flag=1;&lt;br /&gt;
           Dx_H=LIS3DH_SPI_RD(0x29|0x80);   &lt;br /&gt;
           Dx_L=LIS3DH_SPI_RD(0x28|0x80);&lt;br /&gt;
           Dy_H=LIS3DH_SPI_RD(0x2b|0x80);&lt;br /&gt;
           Dy_L=LIS3DH_SPI_RD(0x2A|0x80);&lt;br /&gt;
           Dz_H=LIS3DH_SPI_RD(0x2d|0x80);&lt;br /&gt;
           Dz_L=LIS3DH_SPI_RD(0x2C|0x80);  &lt;br /&gt;
      }&lt;br /&gt;
      else printf(&amp;quot;check device err!\r\n&amp;quot;);&lt;br /&gt;
      x_a=Dx_H&amp;lt;&amp;lt;8|Dx_L/16;&lt;br /&gt;
      y_a=Dy_H&amp;lt;&amp;lt;8|Dy_L/16;&lt;br /&gt;
      z_a=Dz_H&amp;lt;&amp;lt;8|Dz_L/16;&lt;br /&gt;
  }&lt;br /&gt;
  int main(void)&lt;br /&gt;
  {&lt;br /&gt;
    SPI_LIS3DH_Init();&lt;br /&gt;
    while(1)&lt;br /&gt;
    {  &lt;br /&gt;
       get_val();&lt;br /&gt;
       if(flag)&lt;br /&gt;
       {&lt;br /&gt;
           printf(&amp;quot;Dx=:%d\r\n&amp;quot;,x_a);&lt;br /&gt;
           printf(&amp;quot;Dy=:%d\r\n&amp;quot;,y_a);&lt;br /&gt;
           printf(&amp;quot;Dz=:%d\r\n&amp;quot;,z_a);&lt;br /&gt;
           flag=0;&lt;br /&gt;
           wait(1);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== BMP180 barometric pressure sensor ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
The BMP180 offers a pressure measuring range of 300 to 1100 hPa with an accuracy down to 0.02 hPa in advanced resolution mode. It’s based on piezo-resistive technology for high accuracy, ruggedness and long term stability. The chip only accepts 1.8V to 3.6V input voltage.&lt;br /&gt;
&lt;br /&gt;
[[File:1-77.png]]&lt;br /&gt;
&lt;br /&gt;
NRF51822 communicates with BMP180 using I2C port. The SCL port is connected to P0.18 and SDA port is connected to P0.17.&lt;br /&gt;
&lt;br /&gt;
[[File:1-79.png]]&lt;br /&gt;
&lt;br /&gt;
This tutorial will introduce how to use BMP180 to get barometric pressure and temperature data and print these data to serial port.&lt;br /&gt;
&lt;br /&gt;
=== Pre-requisites ===&lt;br /&gt;
&lt;br /&gt;
BLE SENSORS TAG x 1&lt;br /&gt;
Micro USB cable x 1&lt;br /&gt;
USB UART cable&lt;br /&gt;
&lt;br /&gt;
=== Steps ===&lt;br /&gt;
&lt;br /&gt;
Open online mbed compiler and import a program from mbed.org.&lt;br /&gt;
Search programs using bmp180 keyword and you will find BMP180_example program.&lt;br /&gt;
Import a mbed libraries into BMP180_example.&lt;br /&gt;
&lt;br /&gt;
[[File:1-78.png]]&lt;br /&gt;
&lt;br /&gt;
Update the source code using the given source code below.&lt;br /&gt;
Compile it, you will get hex file.&lt;br /&gt;
Move it to jlink disk and program the BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
=== Run and Test ===&lt;br /&gt;
&lt;br /&gt;
Connect USB UART cable to UART port on BLE SENSORS TAG.&lt;br /&gt;
&lt;br /&gt;
[[File:1-80.png]]&lt;br /&gt;
&lt;br /&gt;
Open a serial program on PC to read the UART data sent from device.&lt;br /&gt;
*Baud rate: 9600&lt;br /&gt;
*Data : 8 bit&lt;br /&gt;
*Stop: 1 bit&lt;br /&gt;
&lt;br /&gt;
There will be data printed on the serial window.&lt;br /&gt;
&lt;br /&gt;
[[File:1-81.png]]&lt;br /&gt;
&lt;br /&gt;
=== Source code ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;quot;mbed.h&amp;quot;&lt;br /&gt;
#include &amp;quot;BMP180.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Serial pc(P0_23,P0_25);&lt;br /&gt;
DigitalOut led(P0_20);&lt;br /&gt;
I2C i2c(P0_17, P0_18);&lt;br /&gt;
BMP180 bmp180(&amp;amp;i2c);&lt;br /&gt;
&lt;br /&gt;
int main(void) &lt;br /&gt;
 {&lt;br /&gt;
    led=0;&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        if (bmp180.init() != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error communicating with BMP180\n&amp;quot;);&lt;br /&gt;
        } &lt;br /&gt;
        else &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Initialized BMP180\n&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    while(1) &lt;br /&gt;
    {&lt;br /&gt;
        bmp180.startTemperature();&lt;br /&gt;
        wait_ms(5);     // Wait for conversion to complete&lt;br /&gt;
        float temp;&lt;br /&gt;
        if(bmp180.getTemperature(&amp;amp;temp) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting temperature\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
        bmp180.startPressure(BMP180::ULTRA_LOW_POWER);&lt;br /&gt;
        wait_ms(10);    // Wait for conversion to complete&lt;br /&gt;
        int pressure;&lt;br /&gt;
        if(bmp180.getPressure(&amp;amp;pressure) != 0) &lt;br /&gt;
        {&lt;br /&gt;
            printf(&amp;quot;Error getting pressure\n&amp;quot;);&lt;br /&gt;
            continue;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        printf(&amp;quot;Pressure = %d Pa Temperature = %f C\n&amp;quot;, pressure, temp);&lt;br /&gt;
        wait(1);&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Schematic ==&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmbed_interface_mcu.PDF lsmbed_interface_mcu]&lt;br /&gt;
&lt;br /&gt;
[https://s3.amazonaws.com/linksprite/Mbed+BLE+Sensors+Tag/lsmed_sensor_tag.PDF lsmed_sensor_tag]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=Products-description&amp;diff=7754</id>
		<title>Products-description</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=Products-description&amp;diff=7754"/>
		<updated>2015-12-22T08:14:08Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microcontrollers ==&lt;br /&gt;
=== Arduino Shields === &lt;br /&gt;
&lt;br /&gt;
==== GSM/GPRS Shield====&lt;br /&gt;
*[[ATWIN Quad-band GPRS/GSM Shield for Arduino]] [SHD_GPRS_AW][101101005]&lt;br /&gt;
*[[Quad-band GPRS/GSM Shield for Arduino Mega]] [SHDM_GPRS_SM5100][101101020]&lt;br /&gt;
*[[SIM900 GPRS/GSM Shield]]  [SHD_SIM900][101101029]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== WiFi Shield ====&lt;br /&gt;
*[[CC3000 WiFi Shield for Arduino]] [SHD_CC3000][101201003]&lt;br /&gt;
*[[CuHead Pro WiFi/Ethernet Shield with AirPlay/DLNA Audio for Arduino]] [SHD_WIFI_CUHPRO][101102002]&lt;br /&gt;
&lt;br /&gt;
==== LCD Shield ====&lt;br /&gt;
*[[16 X 2_LCD_Keypad_Shield_for_Arduino V2]] [SHD_LCD_1602V2][101202016] &lt;br /&gt;
*[[Color Image LCD Shield for Arduino ]] [SHD_LCD_NOKIA]OR [SHD_LCD_NOKIA_WOLCD] [101101009]&lt;br /&gt;
*[[Touch LCD Shield]]  [SHD_TOUCHLCD][101101027]&lt;br /&gt;
*[[4.5&amp;quot; E-paper Shield for Arduino/pcDuino ]] [SHD_EP4P5][101101038]&lt;br /&gt;
*[[2.04&amp;quot; E-paper Shield for Arduino/pcDuino]] [SHD_EP2P04][101101041]&lt;br /&gt;
&lt;br /&gt;
==== GPS SD Shield ====&lt;br /&gt;
*[[GPS Shield with SD card slot for Arduino with configuration UART pins and  external GPS antenna]]  [SHD_GPSEXTAN_CONFUART][101102007]&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth Shield ====&lt;br /&gt;
*[[Bluetooth Shield for Arduino ]]  [SHD_BLUETOOTH][101101033]&lt;br /&gt;
*[[Bluetooth 4.0 BLE Shield for Arduino]] [SHD_BLE4][101201004]&lt;br /&gt;
*[[Bluetooth 4.0 BLE Pro Shield for Arduino (Master/Slave and iBeacon)]][SHD_BLE4_Pro][101101133]&lt;br /&gt;
&lt;br /&gt;
====Interface Conversion Shield ====&lt;br /&gt;
*[[RS232 Shield V2 for Arduino ]] [SHD_RS232V2][101102012]&lt;br /&gt;
*[[RS485 Shield V2.1 for Arduino]] [SHD_RS485V2p1][101102013]&lt;br /&gt;
*[[USB Host Shield for Arduino]] [SHD_USB_HOST][101101018]&lt;br /&gt;
*[[CAN-BUS Shield for Arduino]] [SHD_CAN][101101044]&lt;br /&gt;
&lt;br /&gt;
====LED Shield====&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=LED_Cube_Shield_for_Arduino 4x4x4 Light Cube Shield Kit for pcDuino/Arduino] [SHD_LEDCUBE][101101035]&lt;br /&gt;
*[[LoL Shield ]] [SHD_LOL][101101037]&lt;br /&gt;
*[[8X8X8 RGB LED Cube Shield]] [SHD_RGBLEDCUBE] [101101043]&lt;br /&gt;
&lt;br /&gt;
====Robotics Shield====&lt;br /&gt;
*[[Motor Shield ]] [SHD_MOTOR][101101014]&lt;br /&gt;
*[[Motor Pro Shield ]] [SHD_MOTPRO][101101045]&lt;br /&gt;
*[[I/O Expander Shield with MCP23017]] [SHD_IO][101101039]&lt;br /&gt;
*[[27-Channel PWM Shield]] [SHD-32PWMV0.1][101101042]&lt;br /&gt;
*[[NXT/EV3 Brick Shield for Arduino]]  [SHD_EV3][101101046]&lt;br /&gt;
&lt;br /&gt;
====Others Shield====&lt;br /&gt;
*[[Touch Shield for Arduino]] [SHD_TOUKEY][101101008]&lt;br /&gt;
*[[Gameduino for Arduino: A Game Adapter for Microcontrollers]] [SHD_FPGA_GAMEDUINO][101101015]&lt;br /&gt;
*[[Infrared Shield for Arduino]]  [SHD_IR][101101011]&lt;br /&gt;
*[[Mamba - Narrow Band Powerline Communication Shield for Arduino]] [SHD_PLC_MAMBA][101101021]&lt;br /&gt;
*[[MIDI Shield for Arduino]] [SHD_MIDI][101101022]&lt;br /&gt;
*[[MQ2 Smoke Detector Shield for Arduino]] [SHD_MQ2][101101010]&lt;br /&gt;
*[[Screw Shield for Arduino]]  [SHD_SCREW][101101019]&lt;br /&gt;
*[[NFC PN532 Shield]]  [SHD_RFID_NFCPN532][101101001]&lt;br /&gt;
**[http://linksprite.com/wiki/index.php5?title=RFID_tag,_rewritable,_Mifare_1,_S50_(13.56MHz) RFID tag, rewritable, Mifare 1, S50 (13.56MHz)] [RFID_NFC_MIFARE][107201012]&lt;br /&gt;
*[[SD Shield ]]   [SHD_SD] [101101026]&lt;br /&gt;
*[[Xbee Shield]]  [SHD_XBEE][101101017]&lt;br /&gt;
*[[Relay Shield]]  [SHD_RELAY][101101030]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Proto_Shield_Kits Proto Shield Kits for Arduino]  [SHD_PROTOKIT][101101025]&lt;br /&gt;
*[[Proto Shield for Mega]] [SHDM_PROTO][101101023]&lt;br /&gt;
*[[Proto shield for pcDuino]] [SHD_PROTOKITPCDUINO][101101031]&lt;br /&gt;
*[[Assembled Protoshield for Arduino]] [SHD_PROTOCUTE][101101040]&lt;br /&gt;
*[[Audio Jack Modem Arduino Shield for iPhone and Android]][SD_PHONEJACK][127201001]&lt;br /&gt;
&lt;br /&gt;
=== AVR Based Arduino ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://store.cutedigi.com/cuteduino-nano/ CuteDuino Nano] [MP_CDNANO][102201007]&lt;br /&gt;
*[http://store.cutedigi.com/cuteduino-uno-usb-board-r3/ CuteDuino UNO USB Board R3] [MP_CDUNO][102201008]&lt;br /&gt;
*[[Diamondback WiFi Platform Compatible With Arduino]] [MP_WIFI_DIAMOND][102101002]&lt;br /&gt;
*[[Redback WiFi Platform Compatible With Arduino Nano]] [MP_WIFI_REDBACK][102101003]&lt;br /&gt;
*[[Arduino Yun Compatible IO Gateway]] [MP_YUNCOM][102201003]&lt;br /&gt;
*[http://store.linksprite.com/wireless-gamepad-v2-0-for-arduino/ Wireless GamePad V2.0 for Arduino][MP_WLGP][102201005]&lt;br /&gt;
*[http://store.cutedigi.com/makey-makey-an-invention-kit-for-anyone/  Makey Makey - An Invention Kit for Anyone] [KIT_MAKMAK][108201015]&lt;br /&gt;
*[[PicoBoard]] [MP_PICOB][102201011]&lt;br /&gt;
&lt;br /&gt;
=== ARM Based Arduino ===&lt;br /&gt;
*[[Spruce LED]] [MP_SPRUCE_WLCD][102101004] &lt;br /&gt;
*[[Spruce]] [[MP_SPRUCE_WOLCD][102102004]&lt;br /&gt;
&lt;br /&gt;
=== FPGA Based Arduino ===&lt;br /&gt;
*[[Papilio 500K]]  [FPGA_PAP_500K][110101001]&lt;br /&gt;
*[[Papilio Pro]]   [FPGA_PAP_RO][110101006]&lt;br /&gt;
*[[Papilio I/O Wing]] [FPGA_PAP_IOWIG_BPW5015][110101002]&lt;br /&gt;
*[[Papilio VGA Wing]] [FPGA_PAP_VGA_BPW5017][110101003]&lt;br /&gt;
*[[Papilio B/LED Wing]] [FPGA_PAP_LED_BPW5007][110101004]&lt;br /&gt;
*[[Papilio LogicStart MegaWing]] [FPGA_PAP_LGS_BPW7003][110101005]&lt;br /&gt;
*[[Papilio MicroJoystick Wing]] [FPGA_PAP_MICJOYSTICK_BPW5038][110101007]&lt;br /&gt;
*[[RetroCade MegaWing]] [FPGA_PAP_RETROCADE_BPM7004][110101008]&lt;br /&gt;
&lt;br /&gt;
=== IOIO ===&lt;br /&gt;
*[[IOIO-OTG]] [MP_IOIOOTG][102101007]&lt;br /&gt;
**[[Micro USB OTG Cable]] [CAB_MICROUSB_OTG][117201003]&lt;br /&gt;
&lt;br /&gt;
=== pcDuino ===&lt;br /&gt;
*[http://www.pcduino.com/?page_id=1770 pcDuino Lite WIFI] [MP_PCDUINOLITEWIFI][102104006]&lt;br /&gt;
*[http://www.pcduino.com/?page_id=1707  pcDuino Lite] [MP_PCDUINOLITE][102103006]&lt;br /&gt;
&lt;br /&gt;
*[[pcDuino v2]] [MP_PCDUINOV2][102102006]&lt;br /&gt;
*[[pcDuino3]] [MP_PCDUINO3][102105006]&lt;br /&gt;
*[http://www.pcduino.com/pcduino3core/ pcDuino3Core][MP_PCD3C][102108006]&lt;br /&gt;
*[[pcDuino3Core Evaluation Board]][MP_PCD3C_EVALBD][102202001]&lt;br /&gt;
*[[pcDuino3B]][MP_PCDUINO3B]102305006]&lt;br /&gt;
*[http://www.pcduino.com/pcduino3s/ pcDuino3S] [MP_PCDUINO3S][102107006]&lt;br /&gt;
*[[pcDuino3Nano]] [MP_PCD3NANO][102201009]&lt;br /&gt;
*[[pcDuino3Nano Lite]] [MP_PCD3NANOLT][102201109]&lt;br /&gt;
*[[pcDuino8 (Beta)]] [MP_PCDUINO8] [102109006]&lt;br /&gt;
*[[pcDuino8 Uno]] [MP_PCDUINO8_UNO] [102109008]&lt;br /&gt;
*[[LinkSprite Acadia]] [MP_ACADIA] [102101009]&lt;br /&gt;
*[[Linksprite Acadia 3.0]] [MP_ACADIA3][102102009]&lt;br /&gt;
*[[LinkSprite Canyonlands]]  [MP_CANLAND] [102201012]&lt;br /&gt;
*[[pcDuino4 STB With Enclosure : 4K Resolution]]&lt;br /&gt;
*[[pcDuino8 STB With Enclosure]]&lt;br /&gt;
&lt;br /&gt;
*[[Voltage Translation Board for pcDuino V2]] [SHD_TPCDV2][101101036]&lt;br /&gt;
&lt;br /&gt;
*[[Proto shield for pcDuino]] [SHD_PROTOKITPCDUINO][101101031]&lt;br /&gt;
*[[HDMI to DVI cable for pcDunio]]  [DVICAB_PCDUINO][108202002]&lt;br /&gt;
*[[HDMI to VGA cable with Audio for pcDuino]] [VGACAB_PCDUINO][108202001]&lt;br /&gt;
*[[Serial Debug Cable for pcDuino]] [CAB_USBTTL_PCDUINO][117301001] &lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=USB_Sound_Card_with_Audio_Input/Output USB Sound Card with Audio Input/Output for pcDuino] [USB_SOUND_PCDUINO][108202003]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=RTC_Module RTC Module for pcDuino]   [LINKER_RTC][118101009]&lt;br /&gt;
*[[Bluetooth USB Module Mini for pcDuino]] [BT-USB-MINI][119201001]&lt;br /&gt;
*[[pcDuino Rover kit]][BOT_PDROVER_KIT][104201006]&lt;br /&gt;
*[[SATA Cable With Power Connector for pcDuio3]] [CAB_PCDSATA][117201005]&lt;br /&gt;
&lt;br /&gt;
====WiFi====&lt;br /&gt;
&lt;br /&gt;
*[[WiFi Dongle for pcDuino]]  [WIFI_PCDUINO][103201008]&lt;br /&gt;
*[[WiFi to Ethernet Bridge]] [WIFI_ETHBRIDGE][103201010]&lt;br /&gt;
*[[EDUP Mini WiFi Dongle for pcDuino/Raspberry Pi]] [WIFI_EDUP][103201009]&lt;br /&gt;
&lt;br /&gt;
====3G ====&lt;br /&gt;
*[[3G Cellular USB Dongle for pcDuino (Huawei E303s)]] [3G_E303S_PCD][122201001]&lt;br /&gt;
*[[TL-WR703N Wireless 3G Router]] [TL-WR703N][209201004]&lt;br /&gt;
&lt;br /&gt;
====Mouse and Keyboard====&lt;br /&gt;
*[[2.4GHz 2-IN-1 Wireless Air Mouse+Keyboard for pcDuino]] [PCD_AIRMOUSE]&lt;br /&gt;
&lt;br /&gt;
====Camera====&lt;br /&gt;
*[[5MP CSI Camera for pcDuino3]] [CAM_CSI5MP] [208201002]&lt;br /&gt;
*[[Web Cam 3-axis Servo Kit for Real Time Video for pcDuino]][108202004] [KIT_WEBCAMSRV]=[WEBCAM_PCDUINO][108202004-1]+[FIX_SERVO_CAM][108202004-2]+[KIT_SRV][108202004-3]&lt;br /&gt;
&lt;br /&gt;
==== Screen====&lt;br /&gt;
*[http://store.linksprite.com/2-8-usb-tft-touch-display-module-for-pcduino-raspberry-pi/ 2.8” USB TFT Touch Display Module For pcDuino/Raspberry Pi ] [LCD_2P8USB_L47][124201002]&lt;br /&gt;
*[[1024x600 7&amp;quot; LVDS LCD with Capacitive Touch for pcDuino3]] [LCD_7PTH4PCD3][124201007]&lt;br /&gt;
*[[1280x800 7&amp;quot; LVDS LCD with Capacitive Touch for pcDuino3]] [LCD_7PTH4PCD3_HR][124201008]&lt;br /&gt;
&lt;br /&gt;
==== Kits ====&lt;br /&gt;
&lt;br /&gt;
*[[AV Kit for pcDuino]] [KIT_AV_PCDUINO][108201012]&lt;br /&gt;
*[[AV Kit for pcDuino US Edition]] [KIT_AV_PCDUINO_US][108202012]&lt;br /&gt;
*[[Kit for Scratch for pcDuino3B]] [KIT_S4PB] [108301013]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Kit_for_pcDuino3 Starter Kit for pcDuino3] [KIT_PCDUINO3][108401002]&lt;br /&gt;
*[[Starter Kit for pcDuino3B]] [KIT_PCDUINO3B][108402002]&lt;br /&gt;
*[[京东版pcDuino V2套件]][KIT_PCDUINO2][108401001]&lt;br /&gt;
*[[京东版pcDuino V2]] [KIT_PCDUINO2_JD][108403001]&lt;br /&gt;
*[[Learning Kit for Scratch for pcDuino(without pcDuino)]] [KIT_S4P_NOPCD][108302007]&lt;br /&gt;
*[[Stackable Header Kit for pcDuino3 Nano]]&lt;br /&gt;
*[[Cutedigi Project Kit A]] ［KIT_CUTE_PROJRCT_NANOA][108301014]&lt;br /&gt;
*[[pcDuino-Metas Kit]]&lt;br /&gt;
*[[PcDuino8 UNO get started Kit]] [KIT_PCDUINO8_UNO][108401003]&lt;br /&gt;
&lt;br /&gt;
==== USB Adaptors====&lt;br /&gt;
*[[ USB 2.0 Ethernet Adapter]] [CAB_ETHUSB][117201002]&lt;br /&gt;
&lt;br /&gt;
==IoT ==&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth 4.0 BLE ===&lt;br /&gt;
&lt;br /&gt;
*[[Bluetooth 4.0 BLE Sensor Tag/iBeacon Station NRF51822]] [BLE_SENTG]&lt;br /&gt;
&lt;br /&gt;
=== IoT Relay ===&lt;br /&gt;
&lt;br /&gt;
*[[Plug and Play P2P 16 Channels Relay Kit With WiFi and Dual RJ45 ports Connections]] [HA_16CHNRLY_L62 ]&lt;br /&gt;
*[[ESP8266 Serial WIFI Module]][ RF_ESP8266_RA5 ]&lt;br /&gt;
*[[SIM800L Quad-band Network Mini GPRS GSM Breakout Module]][  BB_SIM800L_ON2  ]&lt;br /&gt;
&lt;br /&gt;
=== IoT Kit ===&lt;br /&gt;
&lt;br /&gt;
*[[Smartworld Solar Panel Sensor Kit Compatible with Arduino]] [KIT_SOLARSW ]&lt;br /&gt;
&lt;br /&gt;
=== WRTnode ===&lt;br /&gt;
*[[WRTnode]]&lt;br /&gt;
*[[WRTnode Standard Shield]]&lt;br /&gt;
*[[WRTnode Dev Cables Kit]]&lt;br /&gt;
*[[WRTnode2R Dev Kit]]&lt;br /&gt;
&lt;br /&gt;
== 96board ==&lt;br /&gt;
&lt;br /&gt;
=== 96 board kits===&lt;br /&gt;
&lt;br /&gt;
[[ Linker Mezzanine card starter kit for 96board]]&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pi Kits ==&lt;br /&gt;
*[[Raspberry Pi B+]][RAS_PI_B][120201008]&lt;br /&gt;
*[[RS232/GPIO Shield for Raspberry Pi V3.0]] [SHD_RPI_RS232GPIOV3] [101203001]&lt;br /&gt;
*[[RS485/GPIO Shield for Raspberry Pi V3.0]] [SHD_RPI_RS485GPIOV3][101203002]&lt;br /&gt;
&lt;br /&gt;
*[[TTL UART to USB Cable - Serial USB Debug Cable]] [CAB_RPIUARTUSB][117201001]&lt;br /&gt;
&lt;br /&gt;
*[[Linker kit Base Shield for Raspberry Pi with ADC Interface V3.0]] [LINKER_RPIBASEV3][118103020]&lt;br /&gt;
*[[LinkerKit for Raspberry Pi]]   [LINKERKIT_RPI][118301001]&lt;br /&gt;
*[[Starter Kit for Raspberry Pi]] [KIT_RPISTART][108301003]&lt;br /&gt;
&lt;br /&gt;
*[[Raspberry Pi T-Shoemaker Breakout Kit]] [RPI_TCOBB_KIT][120201001]&lt;br /&gt;
*[[Raspberry Pi Assorted Lego Style Enclosure]] [RPI_LEGOSTYLE_CASE][120201002]&lt;br /&gt;
*[[Assembled Raspberry Pi Shoemaker Breakout]] [RPI_COBB][120201003]&lt;br /&gt;
*[[GPIO Ribbon Cable for Raspberry Pi]] [RPI_GPIOCABLE][120201004]&lt;br /&gt;
*[[Assembled Raspberry Pi T-Shoemaker Breakout]] [RPI_T_COBB][120201005]&lt;br /&gt;
*[[Raspberry Pi microSD Card Adaptor]] [RPI_MSDADP][120201006]&lt;br /&gt;
*[[DS3231 Raspberry Pi RTC Board Real Time Clock Module for Arduino]][RPI_DS3231][120201007]&lt;br /&gt;
&lt;br /&gt;
*[[7&amp;quot; TFT Color LCD with RCA video input for Raspberry Pi ]] [LCD_7INCH_RCA][124201001]&lt;br /&gt;
&lt;br /&gt;
===HAT and Accessories for Raspberry Pi B+/ Raspberry Pi 2===&lt;br /&gt;
*[http://store.linksprite.com/raspberry-pi-b-to-arduino-adapter-hat-for-raspberry-pi-b/ Raspberry Pi B+ to Arduino Adapter HAT for Raspberry Pi B+/ Raspberry Pi 2] [RPI_ARDCON_PLUS] [120201009]&lt;br /&gt;
*[http://store.linksprite.com/gpio-extension-hat-for-raspberry-pi-b/ GPIO Extension HAT for Raspberry Pi B+/ Raspberry Pi 2] [RPI_GPIOEXIT_PLUS] [120201010]&lt;br /&gt;
*[http://store.linksprite.com/raspberry-pi-b-2x20p-to-raspberry-pi-b-2x13p-converter/ Raspberry Pi B+/ Raspberry Pi 2 2x20P to Raspberry Pi B 2x13P Converter] [RPT_RPIBPLUS2B] [120201011]&lt;br /&gt;
*[http://store.linksprite.com/gpio-reference-board-for-raspberry-pi-b/ GPIO Reference Board for Raspberry Pi B+/ Raspberry Pi 2] [RPI_GPIOREF_PLUS] [120201012]&lt;br /&gt;
*[http://store.linksprite.com/screw-protoshield-for-raspberry-pi-b/ Screw Protoshield for Raspberry Pi B+/ Raspberry Pi 2]  [RPI_SRWPRO_PLUS] [120201013]&lt;br /&gt;
*[http://store.linksprite.com/av-cable-for-raspberry-pi-b/ AV Cable for Raspberry Pi B+/ Raspberry Pi 2] [RPI_AVCAB_PLUS] [120201014]&lt;br /&gt;
*[http://store.linksprite.com/cutedigi-gpio-breakout-for-raspberry-pi-b/ GPIO Breakout for Raspberry Pi B+/ Raspberry Pi 2] [RPI_GPIOBB_PLUS] [120201015]&lt;br /&gt;
*[http://store.linksprite.com/cutedigi-t-shape-gpio-breakout-for-raspberry-pi-b/ T-shape GPIO Breakout for Raspberry Pi B+/ Raspberry Pi 2] [RPI_CDGPIOBB_RPIBP] [120201016]&lt;br /&gt;
*[http://store.linksprite.com/gpio-breakout-kit-for-raspberry-pi-b/ GPIO Breakout kit for Raspberry Pi B+/ Raspberry Pi 2] [RPI_KIT_RPIBPLUS] [120201017]&lt;br /&gt;
*[http://store.linksprite.com/gpio-ribbon-cable-for-raspberry-pi-b/ GPIO Ribbon Cable for Raspberry Pi B+/ Raspberry Pi 2] [RPI_GPIOCABLE_PLUS] [120201018]&lt;br /&gt;
*[http://store.linksprite.com/abs-plastic-enclosure-for-raspberry-pi-b-black/ ABS Plastic Enclosure for Raspberry Pi B+ / Raspberry Pi 2(Black)] [RPIBP_CSBLK_R11] [120201019]&lt;br /&gt;
*[http://store.linksprite.com/plastic-enclosure-for-raspberry-pi-b-white/ Plastic Enclosure for Raspberry Pi B+ (White)/ Raspberry Pi 2] [RPIBP_CSWHT] [120201020]&lt;br /&gt;
*[http://store.linksprite.com/black-alumina-enclosure-for-raspberry-pi-b/ Black Alumina Enclosure for Raspberry Pi B+/ Raspberry Pi 2] [RPIBP_CS_ALUCS] [120201021]&lt;br /&gt;
====Camera====&lt;br /&gt;
*[http://store.linksprite.com/raspberry-pi-camera-module-5mp-wide-angle-160-degree/ Raspberry Pi Camera Module 5MP Wide Angle 160 degree] [RPI_5MCAMWD_LR2] [120201022]&lt;br /&gt;
*[http://store.linksprite.com/a-pair-of-infrared-leds-for-raspberry-pi-camera-module-5mp-wide-angle-160-degree/ A Pair of Infrared LEDs for Raspberry Pi Camera Module 5MP Wide Angle 160 degree] [RPI_CAMINFLED] [120201023]&lt;br /&gt;
&lt;br /&gt;
== Arduino Kits ==&lt;br /&gt;
&lt;br /&gt;
*[[LinkerKit]][LINKER][118101001]-[118201003]&lt;br /&gt;
*[[Sensors Pack for Arduino]] [KIT_SENPACK][108301010]&lt;br /&gt;
***[[Hall Effect Sensor]]  - for sensing a magnet [KIT_SENPACK_COM_HALL][108201002]&lt;br /&gt;
*[[Advanced Sensors Kit for Arduino ]]   [ADVSEN_KIT]&lt;br /&gt;
*[[Advanced Learning Kit for Arduino]]   [ADVLEN_KIT]&lt;br /&gt;
*[[LED Matrix Kit]] [KIT_LEDMATRIX][108101001]&lt;br /&gt;
*[[LinkSprite Sensor Pack 101]]&lt;br /&gt;
*[[Introductory Kit with Clear Case for Arduino]] [INTOKIT_CLEARCASE]&lt;br /&gt;
*[[Scratch IO Shield Kit for Scratch for Arduino]] [KIT_SRIO][108301005]&lt;br /&gt;
*[[Learning Kit for Scratch for Arduino (S4A)]] [KIT_S4AADV][108301004]&lt;br /&gt;
*[[Temperature kit for Diamondback]] [KIT_DIA_TEM]&lt;br /&gt;
*[[The Global Car Tracking Kit]]&lt;br /&gt;
*[[Drawdio Kit]][KIT_DRAWDIO][108101006]&lt;br /&gt;
*[http://store.cutedigi.com/cutedigi-starter-kit-for-arduino-beginner-full-package  CuteDigi Starter Kit for Arduino ---Beginner Full Package] [KIT_ARDUINO_BFPACK][108301015]&lt;br /&gt;
*[[Smartworld Solar Panel Sensor Kit Compatible with Arduino]]&lt;br /&gt;
&lt;br /&gt;
==Beagleboard Kits==&lt;br /&gt;
&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Linker_kit_Base_Shield_for_Beagleboard Linker kit Base Shield for Beaglebone ]  [LINKER_BGLBASE][118101029]&lt;br /&gt;
&lt;br /&gt;
== Components and Breakout Boards ==&lt;br /&gt;
&lt;br /&gt;
===Components===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*[[GPS module SKM58]] [GPS_SKM58][116201002]&lt;br /&gt;
*[[32 Channel LinkSprite GPS 5Hz Receiver ]] [GPS_SKG17][116201001]&lt;br /&gt;
*[[GPS Patch Antenna (IPX interface with pig tale length 7cm)]] [ANT_GPS_PAT]&lt;br /&gt;
&lt;br /&gt;
*[[Serial port bluetooth module (Master/Slave)]]&lt;br /&gt;
*[[ RFID Card with UID Rewritable ]]&lt;br /&gt;
*[[ 7400 Series Kit , 5pcs]]&lt;br /&gt;
====ICs====&lt;br /&gt;
*[http://store.linksprite.com/shift-register-8-bit-74hc595/ Shift Register 8-Bit - 74HC595][74HC595_KB14]&lt;br /&gt;
*[http://store.linksprite.com/mcp23017-i2c-16-input-output-port-expander/  MCP23017-i2c 16 input/output port expander][MCP23017_KB15]&lt;br /&gt;
&lt;br /&gt;
====Breadboard====&lt;br /&gt;
*[[Mini Breadboard Mini Self-Adhesive for Arduino (White)]] [PRT_MINIBRD_WHITE][130201001]&lt;br /&gt;
*[[Mini Breadboard Mini Self-Adhesive for Arduino (RED)]] [PRT_MINIBRD_RED][130202001]&lt;br /&gt;
*[[Mini Breadboard Mini Self-Adhesive for Arduino (BLUE)]] [PRT_MINIBRD_BLUE][130203001]&lt;br /&gt;
*[[Mini Breadboard(400 holes)]][PRT_MINIBRD_400HOS][130201002]&lt;br /&gt;
&lt;br /&gt;
====Antenna====&lt;br /&gt;
*[[GSM/3G Antenna]] [ANT_GSM3G][123201001]&lt;br /&gt;
&lt;br /&gt;
====Button====&lt;br /&gt;
*[[Momentary Push Button Switch - 12mm Square]] [12MM_BUTTON_KB5]&lt;br /&gt;
====Infrared====&lt;br /&gt;
*[[Sharp GP2Y0A21YK0F Analog Distance Sensor 10-80cm]] [GP2Y0A21_D12]&lt;br /&gt;
&lt;br /&gt;
====Tapes====&lt;br /&gt;
*[[Copper Tape -5mm (50ft)]][COM_CUTP5MM][114201011]&lt;br /&gt;
*[[Copper Tape -8mm (50ft)]][COM_CUTP8MM][114201012]&lt;br /&gt;
&lt;br /&gt;
====Cable====&lt;br /&gt;
*[[USB microB Cable - 6 Foot]] [CAB_uB][117201004]&lt;br /&gt;
*[http://store.linksprite.com/usb-cable-a-to-b-3-foot/ USB Cable A to B - 3 Foot][CAB_USB_AB_3_J2][117201008]&lt;br /&gt;
*[http://store.cutedigi.com/cat-5e-ethernet-cable-rj45/ Cat 5E Ethernet Cable RJ45][CAB_ETHCAT5E][117201006]&lt;br /&gt;
*[[HDMI Cable]] [CAB_HDMI][117201007]&lt;br /&gt;
&lt;br /&gt;
=====RF cable=====&lt;br /&gt;
*[[Male N-J to MMCX-J Interface Cable]] [RFID_CAB_MNJ2MMCXJ ] [107201004]&lt;br /&gt;
&lt;br /&gt;
=== Case and Enclosure===&lt;br /&gt;
&lt;br /&gt;
*[[ Arduino Uno Assorted Lego Style Enclosure ]] [COM_CASE_ARDULEGO][114201007]&lt;br /&gt;
*[http://store.linksprite.com/aluminum-blue-box-for-wireless-device/ Aluminum Blue Box for Wireless Device ] [ALU_CASE_BLUE_C12]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=LinkSprite_Clear_Enclosure_for_pcDuino  LinkSprite Clear Enclosure for pcDuino/Arduino] [COM_CASE_PCDUINO_CLEAR] [114201005]&lt;br /&gt;
*[[LinkSprite Black Enclosure for pcDuino and arduino]] [COM_CASE_PCDUINO_CLEAR_B][114202005]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=LinkSprite_Extension_Plate_for_Clear_Enclosure_for_Arduino LinkSprite Extension Plate for Clear Enclosure for pcDuino/Arduino] [COM_CASE_ARDU_CLEAR_PLATE][114201003]&lt;br /&gt;
*[[LinkSprite Extension Plate for Black Enclosure for pcDuino]] [COM_CASE_PCDUINO_CLEAR_PLATE_B][114202003]&lt;br /&gt;
*[[Acrylic Clear Enclosure for pcDuino3]] [COM_ACCASE_PCDUINO3][114201010]&lt;br /&gt;
*[[Acrylic Clear Enclosure for pcDuino3 Universal Edition]] [COM_ACCASE_PCDUINO3_UE] [114202010]&lt;br /&gt;
*[[Acrylic Baffle Plate for pcDuino V2]][CASE_PCDV2END][128201001]&lt;br /&gt;
*[[Acrylic Clear Enclosure for pcDuino3Nano]] [COM_ACCASE_PCDUINO3NANO] [114201014]&lt;br /&gt;
*[[Acrylic Clear Enclosure for Linksprite Acadia 3.0]] [COM_ACCASE_ACADIA3.0] [114201016]&lt;br /&gt;
*[[Plastic Mounting Plate for pcDuino/Arduino With Rubber Feet]] [114201015]&lt;br /&gt;
&lt;br /&gt;
===Breakout===&lt;br /&gt;
&lt;br /&gt;
==== SD/MicroSD ====&lt;br /&gt;
*[[Breakout Board for microSD Transflash]] [BB_MINISD][105101004]&lt;br /&gt;
*[[SD Card Breakout Board]] [BB_SD][105101003]&lt;br /&gt;
&lt;br /&gt;
====SIM ====&lt;br /&gt;
*[[Breakout Board for SIM Cards]] [BB_SIM][105101021]&lt;br /&gt;
&lt;br /&gt;
==== MP3/Music/Voice ====&lt;br /&gt;
*[[Serial Port Voice Recognition Module]]  [BB_SERVOICE] [105201001]&lt;br /&gt;
*[[Serial Port Voice Recognition Module V2]] [BB_SERVOICE V2] [105202001]&lt;br /&gt;
*[[Breakout Board for ADMP401 MEMS Microphone]] [BB_ADMP401][105101002]&lt;br /&gt;
*[[Breakout Board for Si4703 FM Tuner]] [BB_FM_SI4703][105101007]&lt;br /&gt;
*[[Serial port controllable MP3 module ]] [BB_SERIAL_MP3][105201008]&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
*[[Xbee USB Adapter]] [BB_XBEE_MINIUSB][105101006]&lt;br /&gt;
*[[Breakout Board for FT232RL USB to TTL 5V]] [BB_MINIUSB_TTL][105101005]&lt;br /&gt;
&lt;br /&gt;
==== 2.4GHz Wireless ====&lt;br /&gt;
*[[NRF24L01 2.4GHz transceiver Breakout Board]] [BB_NRF24L01][105201007]&lt;br /&gt;
&lt;br /&gt;
==== Xbee====&lt;br /&gt;
*[[Xbee Socket to Xbee Socket Evaluation Board]] [BB_UART2UART][105101013]&lt;br /&gt;
*[[Xbee socket UART to RS232]] [BB_XBEE_UART2RS232][105101009]&lt;br /&gt;
*[[Xbee socket UART to RS485]] [BB_XBEE_UART2RS485][105101010]&lt;br /&gt;
*[[Xbee socket UART to USB]] [BB_XBEE_UART2USB][105101008]&lt;br /&gt;
*[[Breakout Board for XBee Module with 5V interface to 3.3V Xbee]]  [BB_XBEE_5_2_3P3][105101014]&lt;br /&gt;
*[[BluetoothBee]] [BB_XBEE_BLUETOOTH][105101017]&lt;br /&gt;
*[[Bluetooth 4.0 BLE Pro Xbee Form factor (Master/Slave and iBeacon)]][BB_XBEE_BLE4][105101117]&lt;br /&gt;
*[http://store.linksprite.com/xbee-breakout/ Xbee Breakout ] [BB_XBEE_B30][105101020]&lt;br /&gt;
&lt;br /&gt;
==== RJ45 ====&lt;br /&gt;
&lt;br /&gt;
*[[RJ45 8-pin Connector and Breakout Board Kit]] [BB_RJ45_KIT][105101015]&lt;br /&gt;
&lt;br /&gt;
==== GPS ====&lt;br /&gt;
*[[GPS Bee]] [BB_GPSBEE][105201002]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Sensors ====&lt;br /&gt;
===== Infrared=====&lt;br /&gt;
*[[Infrared Remote Control and Receiver]]&lt;br /&gt;
===== Light Sensor =====&lt;br /&gt;
*[[TEMT6000 Breakout Board]] [BB_TEMT6000][105101016]&lt;br /&gt;
*[http://store.linksprite.com/uv-sensor/ UV Sensor]  [SEN_UV][115201002]&lt;br /&gt;
&lt;br /&gt;
===== Accelerometer =====&lt;br /&gt;
*[[ ADXL335 Triple-Axis Accelerometer]] [BB_ADXL335][105101018]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=BMP085_9-axis_IMU_Module  9 Degrees of Freedom IMU] [BB_9AX_IMU_BMP085][105201006]&lt;br /&gt;
&lt;br /&gt;
=====Current=====&lt;br /&gt;
*[http://store.linksprite.com/coupling-transformer-current-sensor-breakout/  Coupling Transformer Current Sensor Breakout] [SEN_CURCOU][115201005]&lt;br /&gt;
&lt;br /&gt;
=====Distance=====&lt;br /&gt;
*[[Ultrasonic Range Sensor]] [SEN_DIS_ULTRA][115101001]&lt;br /&gt;
*[[Ultrasonic Sensor Breakout SRF04]] [SEN_DIS_ULTRA_B][115102001]&lt;br /&gt;
&lt;br /&gt;
=====ID=====&lt;br /&gt;
*[[Silicon Fingerprint Scanner]]   [SEN_ID_FP_SCAN][115201001]&lt;br /&gt;
*[[Silicon Fingerprint Area Sensing Module]]   [SEN_ID_FP_AREA][115201001]&lt;br /&gt;
&lt;br /&gt;
=====Air Quality=====&lt;br /&gt;
*[[Dust Sensor]] [SEN_DUSTPPD42NS][115201003]&lt;br /&gt;
&lt;br /&gt;
===== Force=====&lt;br /&gt;
*[[Force Sensitive Resistor 0.5&amp;quot;]] [KIT_SENPACK_COM_FSR][108201001]&lt;br /&gt;
&lt;br /&gt;
=====Water=====&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Water_Level_Sensor Liquid Level Sensor] [BB_SEN_PCBLIQUID][105201005]&lt;br /&gt;
*[http://store.linksprite.com/water-flow-sensor/  Water Flow Sensor] [SEN_WATER_FLOW][115201004]&lt;br /&gt;
&lt;br /&gt;
=====Temperature/Humidity=====&lt;br /&gt;
*[[Humidity and Temperature Sensor - SHT15 Breakout]] [BB_SEN_SHT15][105201004]&lt;br /&gt;
&lt;br /&gt;
=====Bump=====&lt;br /&gt;
*[[Bump Detector - SHT15 Breakout]] [SEN_BUMPDETEC][TBD][115201006]&lt;br /&gt;
&lt;br /&gt;
====RTC====&lt;br /&gt;
*[[DS3234 Breakout Board]] [BB_DS3234][105201003]&lt;br /&gt;
&lt;br /&gt;
====Power Supply====&lt;br /&gt;
*[[DC to DC step down with a output of 5V@5A]] [BB_POWDC2DC_5V5A][105101019]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Serial UART 16x2 LCD]] [BB_SERLCD_1602G][105101001]&lt;br /&gt;
*[[FIR: Gainspan WiFi Module with Xbee Breakout]] [WIFI_MOD_FIR][103101001]&lt;br /&gt;
*[[TTL Level Shifter]] [BB_TTLLT][105101011]&lt;br /&gt;
*[[USB LiPoly Charger - Single Cell]] [BAT_USBCHARGER][106101001]&lt;br /&gt;
*[[Embedded Serial Web Server Module]] [BB_ETH_WS][105101012]&lt;br /&gt;
&lt;br /&gt;
===Labels===&lt;br /&gt;
====Socket Label====&lt;br /&gt;
*[[Arduino Sockets Labels]] [COM_ADRSOKLEB][114201013]&lt;br /&gt;
&lt;br /&gt;
===Socket===&lt;br /&gt;
*[[Mating Socket for pcDuino3C Core Board]] ［SOK_COM_PCD3C][133201001]&lt;br /&gt;
&lt;br /&gt;
== Lighting LEDs ==&lt;br /&gt;
&lt;br /&gt;
*[[LED strip driver]]  [LED_SPDRV][109101001]&lt;br /&gt;
*[[LED PWM Dimmer Constant Current Driver (DC: 12V -48V)]] [LED_CHAMELEON_I_48V][109201007]&lt;br /&gt;
*[[LED PWM Dimmer Constant Current Driver (DC:12V -200V)]] [LED_CHAMELEON_II_200V][109201008]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[8X8 RED LED Matrix ]] [LED_8X8_Matrix_RED]&lt;br /&gt;
&lt;br /&gt;
==LCD==&lt;br /&gt;
*[[Basic 20x4 Character LCD - Black on Green 5V ]] [LCD_20_4_5V] [124201003]&lt;br /&gt;
*[[Basic 16x2 Character LCD - Black on Green 5V]] [LCD_16_2_5V] [124201004]&lt;br /&gt;
*[[Color LCD 128x128 Nokia Knock-Off]] [LCD_NOKIA_6100][124201005]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://store.linksprite.com/spi-i2c-serial-16x2-character-lcd-backpack/ SPI/I2C Serial 16x2 Character LCD Backpack] [LCD_SPI2C_1602BP][124201006]&lt;br /&gt;
&lt;br /&gt;
==EL==&lt;br /&gt;
&lt;br /&gt;
*[http://store.linksprite.com/5v-usb-inverter-for-el-up-to-3-meters-of-el/ 5V USB Inverter for EL - Up to 3 meters of EL][POW_USBEL_Q30][126201001]&lt;br /&gt;
&lt;br /&gt;
== JPEG Cameras ==&lt;br /&gt;
===JPEG Camera Without case===&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=JPEG_Color_Camera_Serial_UART_Interface_(TTL_level) JPEG Color Camera Serial Interface (TTL level)]   [CAM_JPEG_TTLUART][201201001]&lt;br /&gt;
*[[JPEG Color Camera Serial Interface (RS232 level)]] [CAM_JPEG_RS232][201201002]&lt;br /&gt;
*[[JPEG Color Camera Serial Interface(RS485)]]  [CAM_JPEG_RS485][201201003]&lt;br /&gt;
*[[JPEG 2M Pixel Color Camera Serial Interface(TTL level)]]  [CAM_JPEG_2M_TTLUART][201201004]&lt;br /&gt;
*[[JPEG 2M Pixel Color Camera Serial Interface(RS232 level)]]  [CAM_JPEG_2M_RS232][201201005]&lt;br /&gt;
&lt;br /&gt;
*[[JPEG Color Camera Serial Interface with Built-in Infrared (TTL level)]] [CAM_JPEG_IR_TTLUART][202201001]&lt;br /&gt;
*[[JPEG Color Camera Serial Interface with Built-in Infrared (RS232 level)]] [CAM_JPEG_IR_RS232][202201002]&lt;br /&gt;
*[[JPEG Color Camera Serial Interface with Built-in Infrared (RS485 level)]] [CAM_JPEG_IR_RS485][202201003]&lt;br /&gt;
&lt;br /&gt;
*[[Lens of 90 degree view angle]] [CAM_LENS_JPEG_90D][206201001]&lt;br /&gt;
*[[180 Degree Wide Angle fisheye YUY2 5MP USB Camera for Linux/Windows]]&lt;br /&gt;
&lt;br /&gt;
==RFID==&lt;br /&gt;
=== 13.4MHz RFID Modules ===&lt;br /&gt;
*[[ PN532 RFID Module]] [RFID_NFC_BB_PN532][107101002]&lt;br /&gt;
*[[RFID Reader/Write Module A (IIC interface)]] [RFID_NFC_HY502A][107201005]&lt;br /&gt;
*[[RFID Reader/Write Module B (SPI interface)]] [RFID_NFC_HY502B][107201006]&lt;br /&gt;
*[[RFID Reader/Write Module C (UART interface)]][RFID_NFC_HY502C][107201007]&lt;br /&gt;
*[http://store.linksprite.com/nfc-rfid-kit-for-arduino/ NFC RFID Kit for Arduino] [KIT_NFC][108301009]&lt;br /&gt;
&lt;br /&gt;
===Tag===&lt;br /&gt;
*[[RFID tag, rewritable, Mifare 1, S50 (13.56MHz)]] [RFID_NFC_MIFARE][107201012]&lt;br /&gt;
*[http://store.cutedigi.com/13-56mhz-water-droplets-transparent-nfc-key-tag/ 13.56MHz Water Droplets Transparent NFC Key Tag]  [SEN_NFCTKEYTG]  [107201020]&lt;br /&gt;
&lt;br /&gt;
=== UHF RFID Modules and Integrated Readers===&lt;br /&gt;
====Module====&lt;br /&gt;
*[[Cottonwood: UHF Long distance RFID reader module]][RFID_UHF_TTL_CW][107101001] or [RFID_UHF_USB_CW][107102001]&lt;br /&gt;
&lt;br /&gt;
====Integrated Readers====&lt;br /&gt;
*[[Long Range UHF RFID reader (1-6 meters) (ISO18000-6C EPC G2) RS232]]  [RFID_UHF_READER_WAN_0702_RS232][107201016]&lt;br /&gt;
*[[Long Range UHF RFID reader (1-6 meters) (ISO18000-6C EPC G2) RJ45]]  [RFID_UHF_READER_WAN_0702_RJ45][107201017]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Integrated_far-distance_reader_(1-15meters)  Long Range UHF RFID reader (1-15 meters)(ISO18000-6C EPC G2) RS232]  [RFID_UHF_READER_WAN_0703_RS232][107201018]&lt;br /&gt;
*[[Long Range UHF RFID Reader (1-25meters) (ISO18000-6C EPC G2) RS232]] [RFID_UHF_READER_WAN_0704_RS232][107201019]&lt;br /&gt;
&lt;br /&gt;
==== Antenna ====&lt;br /&gt;
*[[5dBi PCB UHF RFID 902-928M Antenna 5cm x 5cm]] [RFID_UHF_AN5DB][107101003]&lt;br /&gt;
*[[LinkSprite UHF RFID Reader Antenna (902-928MHz, 8dBi RHC Pol)]] [RFID_UHF_AN8DBMINI][107201002]&lt;br /&gt;
**This includes [[Male N-J to MMCX-J Interface Cable]] [RFID_CAB_MNJ2MMCXJ ] [107201004]&lt;br /&gt;
*[[UHF RFID Reader Antenna (902-928MHz, 8dBic LHC Pol)]] [RFID_UHF_AN8DN_S9028PCL][107201001]&lt;br /&gt;
**[[SMA to MMCX Interface Cable ]] [RFID_SMA_MMCX_ADAPTER][107201003]&lt;br /&gt;
&lt;br /&gt;
====Tag ====&lt;br /&gt;
*[[UHF RFID tag, EPC Gen2 (900MHz)]] [RFID_UHF_CARDTAG_LS0831][107201008]&lt;br /&gt;
*[[LS0832- Dual Frequencies UHF+HF RFID tag]] [RFID_UHFHF_CARDTAG_LS0832][107201009]&lt;br /&gt;
*[[UHF RFID tag for metal surface and Vechile, EPC Gen2 (900MHz)]] [RFID_UHF_METALTAG][107201013]&lt;br /&gt;
*[[Key Tag UHF RFID tag , EPC Gen2 (900MHz)]] [RFID_UHF_KEYTAG][107201015]&lt;br /&gt;
*[[UHF RFID tag for Vechile Licenser Plate, EPC Gen2 (900MHz)]] [RFID_UHF_PLATETAG][107201014]&lt;br /&gt;
*[[UHF RFID tag for flex surface (tape on back) Transparent , EPC Gen2 (900MHz)]] [RFID_UHF_FLEXTRANTAG][107201010]&lt;br /&gt;
*[[UHF RFID tag for flex surface (tape on back) Nontransparent , EPC Gen2 (900MHz)]] [RFID_UHF_FLEXNONTRANTAG][107201011]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
===Wall Adapters===&lt;br /&gt;
*[[ AC 100-240V 0.3A DC 5V 2A US Plug USB Power Supply Wall Adapter]][POW_5V2AUSB_P7][126201002]&lt;br /&gt;
*[[AC 100-240V 0.3A DC 5V 2A Europe/China Plug USB Power Supply Wall Adapter]] [POW_5V2AUSB_EU][126201003]&lt;br /&gt;
*[[AC 100-240V 0.3A DC 5V 2A USB Plug USB Power Supply Wall Adapter with Micro USB connector ]][POW_5V2AUSBMIRCO_US][126201005]&lt;br /&gt;
*[http://store.cutedigi.com/universal-to-uk-power-plug-adapter/ Universal to UK Power Plug Adapter][TOL_PW_UNI2UK ] [125201003]&lt;br /&gt;
*[[AC 100-240V 0.3A DC 5V 2A Australia Plug USB Power Supply Wall Adapter]] [POW_5V2AUSB_AUS][126201006]&lt;br /&gt;
*[[Wall Adapter Power Supply - 12VDC 1A]] [P0W_12VDC_1A][126201007]&lt;br /&gt;
*[[Wall Adapter Power Supply - 5VDC 2A]] [POW_TL_5V2A][126201008]&lt;br /&gt;
*[[Wall Adapter Power Supply - 5VDC 4A]] [POW_5VD_4A][126201009]&lt;br /&gt;
*[[Embedded AC to 12V Power Supply Module]] [EM_POWAC2DC_12V][126301001]&lt;br /&gt;
&lt;br /&gt;
===Hub===&lt;br /&gt;
*[[4 Port USB Hub]] [TOL-USBHUB-4PT][125201004]&lt;br /&gt;
&lt;br /&gt;
===Battery===&lt;br /&gt;
*[http://store.cutedigi.com/stylish-usb-battery-pack-for-pcduino-raspberry-pi-3700mah-5v-1a/ Stylish USB Battery Pack for pcDuino/Raspberry Pi-3700mAh-5V@1A ][BAT_3700][106201002]&lt;br /&gt;
&lt;br /&gt;
===Organizer===&lt;br /&gt;
*[http://store.cutedigi.com/plastic-box-for-components-kit-5-5x3-5x1-5/  Plastic Box for Components Kit 5.5&amp;quot;x3.5&amp;quot;x1.5&amp;quot;] [TL_BX5P5_3P5_1P5][209201001]&lt;br /&gt;
*[[ Plastic Box for Components Kit 6.88&amp;quot;x5.9&amp;quot;x1.69&amp;quot; (175mmx150mmx43mm)]]  [TL_BX_6P8_5P9_1P6][209201002]&lt;br /&gt;
*[[ Plastic Box for Components Kit 8.85&amp;quot;x6.10&amp;quot;x2.28&amp;quot; (225mmx155mmx58mm)]]  [TL_BX_8P8_6P1_2P2][209201003]&lt;br /&gt;
&lt;br /&gt;
===Signal Generators===&lt;br /&gt;
*[http://store.linksprite.com/mini-dds-function-generator/ Mini DDS Function Generator] [TOL_FG085_Q17][125201005]&lt;br /&gt;
&lt;br /&gt;
===Programmer===&lt;br /&gt;
*[[Silabs Compatible USB Debug Adapter]] [SILAB_USB_DEBUG_ADAP] [117201009]&lt;br /&gt;
*[http://store.cutedigi.com/altera-usb-blaster-fpga-cpld-compatible-jtag-cable/  Altera USB Blaster FPGA CPLD compatible JTAG cable] [ALTERA_USB_BLASTER][134201001]&lt;br /&gt;
&lt;br /&gt;
== Books ==&lt;br /&gt;
&lt;br /&gt;
*[[Getting Started With pcDuino]]  [BOK_PCDCHN_1] [129201001]&lt;br /&gt;
&lt;br /&gt;
== OpenWRT ==&lt;br /&gt;
*[[TL-WR703N Clone With OPENWRT, USB Camera Support, TTL UART]]&lt;br /&gt;
&lt;br /&gt;
== Robotics ==&lt;br /&gt;
===Platform===&lt;br /&gt;
&lt;br /&gt;
*[[LinkSprite Basic Robot Platform]]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Acrylic_Frame_Robot_Platform  Acrylic Turtle 2WD Mobile Platform for Arduino/pcDuino ][KIT_ROT_T2WDACY][108301011]&lt;br /&gt;
*[[Scratch Egg Car]]&lt;br /&gt;
&lt;br /&gt;
===Motor Driver ===&lt;br /&gt;
*[[DC Motor Driver Breakout (L298 Chipset)]] [BOT_MOTDRV_L298][104101001]&lt;br /&gt;
&lt;br /&gt;
===LinkerBot===&lt;br /&gt;
&lt;br /&gt;
*[[LinkerBot Platform]] [BOT_LB_PLATFORM][104201002]&lt;br /&gt;
&lt;br /&gt;
===MiniBot===&lt;br /&gt;
*[[Minibot with Arduino Programming ]]  [BOT_MINI][104201007]&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
*[[RB-65CS: Servo with 360 Degree freedom]][BOT_SERVO_65CS][104201003]&lt;br /&gt;
*[[RB-150CS: Servo with 360 Degree freedom ]][BOT_SERVO_150CS][104201004]&lt;br /&gt;
*[[SG90 mini servo for webcam]][SV_SG90][108202004-3]&lt;br /&gt;
&lt;br /&gt;
===Fixture for Servos===&lt;br /&gt;
*[[Fixture for servos of webcam used for Robotics]] [FIX_SERVO_CAM][108202004-2]&lt;br /&gt;
&lt;br /&gt;
===Camera===&lt;br /&gt;
*[[Mini Webcam for Robot Video Real Time Video Stream]] [WEBCAM_PCDUINO][108202004-1]&lt;br /&gt;
*[[Mini Webcam for Robot Video Real Time Video Stream V2.0]] [WEBCAM_PCDUINO_V2][108202005]&lt;br /&gt;
&lt;br /&gt;
===Robot Battery===&lt;br /&gt;
*[[Battery for Robot 4800mAH]] [BAT_4800MHAH][106201001]&lt;br /&gt;
*[[Battery for Robot 4800mAH Europe Edition]]  [BAT_4800MHAH_EU] [106202001]&lt;br /&gt;
&lt;br /&gt;
===Parts===&lt;br /&gt;
*[[Ball Caster Metal]] [BOT_PT_OMNIDMETAL][104201008]&lt;br /&gt;
*[[Linker Block 12 Lego Holes Long Grooved Beam -Aluminium]] [LB_12HGB][132201001]&lt;br /&gt;
*[[Linker Block Curved Beam with 4 Holes]][LB_4HCVBEAM][132201002]&lt;br /&gt;
*[[Linker Block Side Beam with 6 Holes]][LB_SBM_6H][132201003]&lt;br /&gt;
*[[Linker Block 10*3 Lego Holes Long Grooved Beam -Aluminium]] [LB_10B3_GB][132201019]&lt;br /&gt;
*[[Linker Block 9*18 Lego Holes Sheet -Aluminium]][LB_9B18_SHT][132201004]&lt;br /&gt;
*[[Linker Block Shaft Connector]][LB_NODESHFT][132201005]&lt;br /&gt;
*[[Linker Block Passive Cross Shaft -Aluminium]][LB_PASSSHFT][132201006]&lt;br /&gt;
*[[Linker Block Shaft Collar]] [LB_SHAFTCOL][132201020]&lt;br /&gt;
*[[Linker Block DC Motor]] [LB_DCMOTOR][132201007]&lt;br /&gt;
*[[Linker Block Motor Fixture Plate -Aluminium]] [LB_MOTFIXPLATE][132201008]&lt;br /&gt;
*[[Linker Block 90 Degree Fixture With a Length of 3 Holes]][LB_RETFIX3HOLE][132201009]&lt;br /&gt;
*[[Linker Block 90 Degree Fixture With a Length of 6 Holes]][LB_RETFIX6HOLE][132201010]&lt;br /&gt;
*[[Linker Block Gear Wheel with a Diameter of 5.6cm]][LB_WHEEL5P6][132201011]&lt;br /&gt;
*[[Linker Block Tire a Diameter of 5.6cm]][LB_TIRE5P5][132201012]&lt;br /&gt;
*[[Linker Block Track]] [LB_TRACK][132201021]&lt;br /&gt;
*[[Linker Block Track Connector]][LB_TRKCON][132201013]&lt;br /&gt;
*[[Linker Block Screw Driver For Hexagon M4]][LB_M4_SWDRV][132201014]&lt;br /&gt;
*[[Linker Block M4x14 Bolt]][LB_M4X14_BOLT][132201015]&lt;br /&gt;
*[[Linker Block M4 Nut]][LB_M4_NUT][132201016]&lt;br /&gt;
*[[Linker Block Plastic Washer M4]][LB_M4_WH][132201017]&lt;br /&gt;
*[[Linker Block UN*16 Bolt]] [LB_UN16_BOLT][132201022]&lt;br /&gt;
*[[Linker Block UN Nut]] [LB_UN_NUT][132201023]&lt;br /&gt;
*[[Linker Block M2x5 Screw]] [LB_M2X5_SRW][132201018]&lt;br /&gt;
*[[Linker Block Grub Screw]] [LB_GRUB_SRW][132201024]&lt;br /&gt;
&lt;br /&gt;
===Rover===&lt;br /&gt;
*[[Rover: WiFi Video Streaming Robot]] [BOT_ROVER][104201001]&lt;br /&gt;
*[[pcDuino Rover: WiFi Video Streaming Robot Kit]] [BOT_PDROVER_KIT][104201006]&lt;br /&gt;
*[[DC 12V to 5V Power Adaptor Module at 2A for pcDuino Robot]][POW_12VTO5V_H2][126101001]&lt;br /&gt;
*[[Acrylic Turtle 2WD Mobile Video Robot powered by pcDuino3 V2.0]] [KIT_BOT_T2WDACY_VIDEO_PD3_V2][108401006]&lt;br /&gt;
&lt;br /&gt;
*[[Battery case for Rover]][TOL-BATHOLD][125201006]&lt;br /&gt;
&lt;br /&gt;
===Motor===&lt;br /&gt;
*[[Stepper Motor with Cable]] [STEPPER_MOTOR][131201001]&lt;br /&gt;
&lt;br /&gt;
===Robotic Arm===&lt;br /&gt;
*[[Robotic Arm]]&lt;br /&gt;
&lt;br /&gt;
===Linker Block Set===&lt;br /&gt;
*[[Linker Block Basic Robot Platform Set A]] [KIT_LB_BASROT_A][108301008]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=PcDuino_Metal_Lego_Video_Tank Linker Block Tank Robot Platform ] [KIT_LB_BASROT_B]108302008]&lt;br /&gt;
&lt;br /&gt;
== Virtual Reality (VR)==&lt;br /&gt;
*[http://store.linksprite.com/diy-virtual-reality-3d-glasses-cardboard-box-nfc-for-google-card/  DIY Virtual Reality 3D Glasses Cardboard Box NFC for Google Card ] [VR_CARDBOX] [209201005]&lt;br /&gt;
&lt;br /&gt;
== FPGA ==&lt;br /&gt;
&lt;br /&gt;
== S3C6410 Development Kit==&lt;br /&gt;
&lt;br /&gt;
*[[LS6410 SAMSUNG ARM11 S3C6410 board kit Without LCD ]] [KIT_LS6410_WOLCD][108201008]&lt;br /&gt;
*[[LS6410 SAMSUNG ARM11 S3C6410 board kit 4.3 TFT LCD ]] [KIT_LS6410_4P3][108201009]&lt;br /&gt;
*[[LS6410 SAMSUNG ARM11 S3C6410 board kit 7.0 TFT LCD ]] [KIT_LS6410_7][108201010]&lt;br /&gt;
*[[Camera Module (3M pixel) for ARM development board]] [CAM_LS6410_OV3640_3MP][205201001]&lt;br /&gt;
*[[Camera Module (1.3M pixel) for ARM development board]] [CAM_LS6410_OV9650_1P3MP][205201002]&lt;br /&gt;
*[[Four-band GSM/GPRS Module SIM300 for LS6410 S3C6400 Dev Board]] [CL_LS6410_SIM300][113201001]&lt;br /&gt;
&lt;br /&gt;
== Accessories ==&lt;br /&gt;
*[[Power Adapter]] [POW_ADAP_DN1] [126201004]&lt;br /&gt;
*[[Alligator Clip]] [TOL_TSTCLIP] [125201001]&lt;br /&gt;
*[[Heat Shrink Tube (Black)]] [TOL_HTTUBE][125201002]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=PcDuino8_UNO_get_started_Kit&amp;diff=7753</id>
		<title>PcDuino8 UNO get started Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=PcDuino8_UNO_get_started_Kit&amp;diff=7753"/>
		<updated>2015-12-22T08:12:57Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Recently, LinkSprite released a powerful mini PC platform pcDuino8 Uno which is powered by Allwinner H8 SoC chip. It has 8 Cortex-A7 ARM cores whose operating frequency is up to 2.0GHz.&lt;br /&gt;
&lt;br /&gt;
Base on this powerful platform, we have constructed a new kit called OpenCV computer vision kit which users can use to quick start OpenCV computer vision and do lost of fun stuff including but not limited to the follows:&lt;br /&gt;
&lt;br /&gt;
* Learn or teach programming&lt;br /&gt;
* Learn Ubuntu Linux&lt;br /&gt;
* Work with hardware part&lt;br /&gt;
* OpenCV computer vision&lt;br /&gt;
* Implement a network video monitoring system&lt;br /&gt;
* DIY a simple camera&lt;br /&gt;
* Motion detection&lt;br /&gt;
* Face detection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:PcDuino8_UNO_get_started_kit.png]]&lt;br /&gt;
&lt;br /&gt;
==Package List==&lt;br /&gt;
1 X [[PcDuino8 Uno]] [MP_PCDUINO8_UNO] [102109008]&lt;br /&gt;
&lt;br /&gt;
1 X [[Mini Webcam for Robot Video Real Time Video Stream V2.0]] [WEBCAM_PCDUINO_V2][108202005]&lt;br /&gt;
&lt;br /&gt;
1 X [[USB microB Cable - 6 Foot]] [CAB_uB][117201004]&lt;br /&gt;
&lt;br /&gt;
1 X 8G TF Card&lt;br /&gt;
&lt;br /&gt;
==Projects==&lt;br /&gt;
1. CameraDIY&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-1-camera-diy.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/1.CameraDIY Demo]&lt;br /&gt;
&lt;br /&gt;
2. Face Detection&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-2-face-detection.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/2.FaceDetection Demo]&lt;br /&gt;
&lt;br /&gt;
3. Motion Detection&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-3-motion-detection.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/3.MotionDetection Demo]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=Products-description&amp;diff=7752</id>
		<title>Products-description</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=Products-description&amp;diff=7752"/>
		<updated>2015-12-22T08:10:23Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Microcontrollers ==&lt;br /&gt;
=== Arduino Shields === &lt;br /&gt;
&lt;br /&gt;
==== GSM/GPRS Shield====&lt;br /&gt;
*[[ATWIN Quad-band GPRS/GSM Shield for Arduino]] [SHD_GPRS_AW][101101005]&lt;br /&gt;
*[[Quad-band GPRS/GSM Shield for Arduino Mega]] [SHDM_GPRS_SM5100][101101020]&lt;br /&gt;
*[[SIM900 GPRS/GSM Shield]]  [SHD_SIM900][101101029]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== WiFi Shield ====&lt;br /&gt;
*[[CC3000 WiFi Shield for Arduino]] [SHD_CC3000][101201003]&lt;br /&gt;
*[[CuHead Pro WiFi/Ethernet Shield with AirPlay/DLNA Audio for Arduino]] [SHD_WIFI_CUHPRO][101102002]&lt;br /&gt;
&lt;br /&gt;
==== LCD Shield ====&lt;br /&gt;
*[[16 X 2_LCD_Keypad_Shield_for_Arduino V2]] [SHD_LCD_1602V2][101202016] &lt;br /&gt;
*[[Color Image LCD Shield for Arduino ]] [SHD_LCD_NOKIA]OR [SHD_LCD_NOKIA_WOLCD] [101101009]&lt;br /&gt;
*[[Touch LCD Shield]]  [SHD_TOUCHLCD][101101027]&lt;br /&gt;
*[[4.5&amp;quot; E-paper Shield for Arduino/pcDuino ]] [SHD_EP4P5][101101038]&lt;br /&gt;
*[[2.04&amp;quot; E-paper Shield for Arduino/pcDuino]] [SHD_EP2P04][101101041]&lt;br /&gt;
&lt;br /&gt;
==== GPS SD Shield ====&lt;br /&gt;
*[[GPS Shield with SD card slot for Arduino with configuration UART pins and  external GPS antenna]]  [SHD_GPSEXTAN_CONFUART][101102007]&lt;br /&gt;
&lt;br /&gt;
==== Bluetooth Shield ====&lt;br /&gt;
*[[Bluetooth Shield for Arduino ]]  [SHD_BLUETOOTH][101101033]&lt;br /&gt;
*[[Bluetooth 4.0 BLE Shield for Arduino]] [SHD_BLE4][101201004]&lt;br /&gt;
*[[Bluetooth 4.0 BLE Pro Shield for Arduino (Master/Slave and iBeacon)]][SHD_BLE4_Pro][101101133]&lt;br /&gt;
&lt;br /&gt;
====Interface Conversion Shield ====&lt;br /&gt;
*[[RS232 Shield V2 for Arduino ]] [SHD_RS232V2][101102012]&lt;br /&gt;
*[[RS485 Shield V2.1 for Arduino]] [SHD_RS485V2p1][101102013]&lt;br /&gt;
*[[USB Host Shield for Arduino]] [SHD_USB_HOST][101101018]&lt;br /&gt;
*[[CAN-BUS Shield for Arduino]] [SHD_CAN][101101044]&lt;br /&gt;
&lt;br /&gt;
====LED Shield====&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=LED_Cube_Shield_for_Arduino 4x4x4 Light Cube Shield Kit for pcDuino/Arduino] [SHD_LEDCUBE][101101035]&lt;br /&gt;
*[[LoL Shield ]] [SHD_LOL][101101037]&lt;br /&gt;
*[[8X8X8 RGB LED Cube Shield]] [SHD_RGBLEDCUBE] [101101043]&lt;br /&gt;
&lt;br /&gt;
====Robotics Shield====&lt;br /&gt;
*[[Motor Shield ]] [SHD_MOTOR][101101014]&lt;br /&gt;
*[[Motor Pro Shield ]] [SHD_MOTPRO][101101045]&lt;br /&gt;
*[[I/O Expander Shield with MCP23017]] [SHD_IO][101101039]&lt;br /&gt;
*[[27-Channel PWM Shield]] [SHD-32PWMV0.1][101101042]&lt;br /&gt;
*[[NXT/EV3 Brick Shield for Arduino]]  [SHD_EV3][101101046]&lt;br /&gt;
&lt;br /&gt;
====Others Shield====&lt;br /&gt;
*[[Touch Shield for Arduino]] [SHD_TOUKEY][101101008]&lt;br /&gt;
*[[Gameduino for Arduino: A Game Adapter for Microcontrollers]] [SHD_FPGA_GAMEDUINO][101101015]&lt;br /&gt;
*[[Infrared Shield for Arduino]]  [SHD_IR][101101011]&lt;br /&gt;
*[[Mamba - Narrow Band Powerline Communication Shield for Arduino]] [SHD_PLC_MAMBA][101101021]&lt;br /&gt;
*[[MIDI Shield for Arduino]] [SHD_MIDI][101101022]&lt;br /&gt;
*[[MQ2 Smoke Detector Shield for Arduino]] [SHD_MQ2][101101010]&lt;br /&gt;
*[[Screw Shield for Arduino]]  [SHD_SCREW][101101019]&lt;br /&gt;
*[[NFC PN532 Shield]]  [SHD_RFID_NFCPN532][101101001]&lt;br /&gt;
**[http://linksprite.com/wiki/index.php5?title=RFID_tag,_rewritable,_Mifare_1,_S50_(13.56MHz) RFID tag, rewritable, Mifare 1, S50 (13.56MHz)] [RFID_NFC_MIFARE][107201012]&lt;br /&gt;
*[[SD Shield ]]   [SHD_SD] [101101026]&lt;br /&gt;
*[[Xbee Shield]]  [SHD_XBEE][101101017]&lt;br /&gt;
*[[Relay Shield]]  [SHD_RELAY][101101030]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Proto_Shield_Kits Proto Shield Kits for Arduino]  [SHD_PROTOKIT][101101025]&lt;br /&gt;
*[[Proto Shield for Mega]] [SHDM_PROTO][101101023]&lt;br /&gt;
*[[Proto shield for pcDuino]] [SHD_PROTOKITPCDUINO][101101031]&lt;br /&gt;
*[[Assembled Protoshield for Arduino]] [SHD_PROTOCUTE][101101040]&lt;br /&gt;
*[[Audio Jack Modem Arduino Shield for iPhone and Android]][SD_PHONEJACK][127201001]&lt;br /&gt;
&lt;br /&gt;
=== AVR Based Arduino ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://store.cutedigi.com/cuteduino-nano/ CuteDuino Nano] [MP_CDNANO][102201007]&lt;br /&gt;
*[http://store.cutedigi.com/cuteduino-uno-usb-board-r3/ CuteDuino UNO USB Board R3] [MP_CDUNO][102201008]&lt;br /&gt;
*[[Diamondback WiFi Platform Compatible With Arduino]] [MP_WIFI_DIAMOND][102101002]&lt;br /&gt;
*[[Redback WiFi Platform Compatible With Arduino Nano]] [MP_WIFI_REDBACK][102101003]&lt;br /&gt;
*[[Arduino Yun Compatible IO Gateway]] [MP_YUNCOM][102201003]&lt;br /&gt;
*[http://store.linksprite.com/wireless-gamepad-v2-0-for-arduino/ Wireless GamePad V2.0 for Arduino][MP_WLGP][102201005]&lt;br /&gt;
*[http://store.cutedigi.com/makey-makey-an-invention-kit-for-anyone/  Makey Makey - An Invention Kit for Anyone] [KIT_MAKMAK][108201015]&lt;br /&gt;
*[[PicoBoard]] [MP_PICOB][102201011]&lt;br /&gt;
&lt;br /&gt;
=== ARM Based Arduino ===&lt;br /&gt;
*[[Spruce LED]] [MP_SPRUCE_WLCD][102101004] &lt;br /&gt;
*[[Spruce]] [[MP_SPRUCE_WOLCD][102102004]&lt;br /&gt;
&lt;br /&gt;
=== FPGA Based Arduino ===&lt;br /&gt;
*[[Papilio 500K]]  [FPGA_PAP_500K][110101001]&lt;br /&gt;
*[[Papilio Pro]]   [FPGA_PAP_RO][110101006]&lt;br /&gt;
*[[Papilio I/O Wing]] [FPGA_PAP_IOWIG_BPW5015][110101002]&lt;br /&gt;
*[[Papilio VGA Wing]] [FPGA_PAP_VGA_BPW5017][110101003]&lt;br /&gt;
*[[Papilio B/LED Wing]] [FPGA_PAP_LED_BPW5007][110101004]&lt;br /&gt;
*[[Papilio LogicStart MegaWing]] [FPGA_PAP_LGS_BPW7003][110101005]&lt;br /&gt;
*[[Papilio MicroJoystick Wing]] [FPGA_PAP_MICJOYSTICK_BPW5038][110101007]&lt;br /&gt;
*[[RetroCade MegaWing]] [FPGA_PAP_RETROCADE_BPM7004][110101008]&lt;br /&gt;
&lt;br /&gt;
=== IOIO ===&lt;br /&gt;
*[[IOIO-OTG]] [MP_IOIOOTG][102101007]&lt;br /&gt;
**[[Micro USB OTG Cable]] [CAB_MICROUSB_OTG][117201003]&lt;br /&gt;
&lt;br /&gt;
=== pcDuino ===&lt;br /&gt;
*[http://www.pcduino.com/?page_id=1770 pcDuino Lite WIFI] [MP_PCDUINOLITEWIFI][102104006]&lt;br /&gt;
*[http://www.pcduino.com/?page_id=1707  pcDuino Lite] [MP_PCDUINOLITE][102103006]&lt;br /&gt;
&lt;br /&gt;
*[[pcDuino v2]] [MP_PCDUINOV2][102102006]&lt;br /&gt;
*[[pcDuino3]] [MP_PCDUINO3][102105006]&lt;br /&gt;
*[http://www.pcduino.com/pcduino3core/ pcDuino3Core][MP_PCD3C][102108006]&lt;br /&gt;
*[[pcDuino3Core Evaluation Board]][MP_PCD3C_EVALBD][102202001]&lt;br /&gt;
*[[pcDuino3B]][MP_PCDUINO3B]102305006]&lt;br /&gt;
*[http://www.pcduino.com/pcduino3s/ pcDuino3S] [MP_PCDUINO3S][102107006]&lt;br /&gt;
*[[pcDuino3Nano]] [MP_PCD3NANO][102201009]&lt;br /&gt;
*[[pcDuino3Nano Lite]] [MP_PCD3NANOLT][102201109]&lt;br /&gt;
*[[pcDuino8 (Beta)]] [MP_PCDUINO8] [102109006]&lt;br /&gt;
*[[pcDuino8 Uno]] [MP_PCDUINO8_UNO] [102109008]&lt;br /&gt;
*[[LinkSprite Acadia]] [MP_ACADIA] [102101009]&lt;br /&gt;
*[[Linksprite Acadia 3.0]] [MP_ACADIA3][102102009]&lt;br /&gt;
*[[LinkSprite Canyonlands]]  [MP_CANLAND] [102201012]&lt;br /&gt;
*[[pcDuino4 STB With Enclosure : 4K Resolution]]&lt;br /&gt;
*[[pcDuino8 STB With Enclosure]]&lt;br /&gt;
&lt;br /&gt;
*[[Voltage Translation Board for pcDuino V2]] [SHD_TPCDV2][101101036]&lt;br /&gt;
&lt;br /&gt;
*[[Proto shield for pcDuino]] [SHD_PROTOKITPCDUINO][101101031]&lt;br /&gt;
*[[HDMI to DVI cable for pcDunio]]  [DVICAB_PCDUINO][108202002]&lt;br /&gt;
*[[HDMI to VGA cable with Audio for pcDuino]] [VGACAB_PCDUINO][108202001]&lt;br /&gt;
*[[Serial Debug Cable for pcDuino]] [CAB_USBTTL_PCDUINO][117301001] &lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=USB_Sound_Card_with_Audio_Input/Output USB Sound Card with Audio Input/Output for pcDuino] [USB_SOUND_PCDUINO][108202003]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=RTC_Module RTC Module for pcDuino]   [LINKER_RTC][118101009]&lt;br /&gt;
*[[Bluetooth USB Module Mini for pcDuino]] [BT-USB-MINI][119201001]&lt;br /&gt;
*[[pcDuino Rover kit]][BOT_PDROVER_KIT][104201006]&lt;br /&gt;
*[[SATA Cable With Power Connector for pcDuio3]] [CAB_PCDSATA][117201005]&lt;br /&gt;
&lt;br /&gt;
====WiFi====&lt;br /&gt;
&lt;br /&gt;
*[[WiFi Dongle for pcDuino]]  [WIFI_PCDUINO][103201008]&lt;br /&gt;
*[[WiFi to Ethernet Bridge]] [WIFI_ETHBRIDGE][103201010]&lt;br /&gt;
*[[EDUP Mini WiFi Dongle for pcDuino/Raspberry Pi]] [WIFI_EDUP][103201009]&lt;br /&gt;
&lt;br /&gt;
====3G ====&lt;br /&gt;
*[[3G Cellular USB Dongle for pcDuino (Huawei E303s)]] [3G_E303S_PCD][122201001]&lt;br /&gt;
*[[TL-WR703N Wireless 3G Router]] [TL-WR703N][209201004]&lt;br /&gt;
&lt;br /&gt;
====Mouse and Keyboard====&lt;br /&gt;
*[[2.4GHz 2-IN-1 Wireless Air Mouse+Keyboard for pcDuino]] [PCD_AIRMOUSE]&lt;br /&gt;
&lt;br /&gt;
====Camera====&lt;br /&gt;
*[[5MP CSI Camera for pcDuino3]] [CAM_CSI5MP] [208201002]&lt;br /&gt;
*[[Web Cam 3-axis Servo Kit for Real Time Video for pcDuino]][108202004] [KIT_WEBCAMSRV]=[WEBCAM_PCDUINO][108202004-1]+[FIX_SERVO_CAM][108202004-2]+[KIT_SRV][108202004-3]&lt;br /&gt;
&lt;br /&gt;
==== Screen====&lt;br /&gt;
*[http://store.linksprite.com/2-8-usb-tft-touch-display-module-for-pcduino-raspberry-pi/ 2.8” USB TFT Touch Display Module For pcDuino/Raspberry Pi ] [LCD_2P8USB_L47][124201002]&lt;br /&gt;
*[[1024x600 7&amp;quot; LVDS LCD with Capacitive Touch for pcDuino3]] [LCD_7PTH4PCD3][124201007]&lt;br /&gt;
*[[1280x800 7&amp;quot; LVDS LCD with Capacitive Touch for pcDuino3]] [LCD_7PTH4PCD3_HR][124201008]&lt;br /&gt;
&lt;br /&gt;
==== Kits ====&lt;br /&gt;
&lt;br /&gt;
*[[AV Kit for pcDuino]] [KIT_AV_PCDUINO][108201012]&lt;br /&gt;
*[[AV Kit for pcDuino US Edition]] [KIT_AV_PCDUINO_US][108202012]&lt;br /&gt;
*[[Kit for Scratch for pcDuino3B]] [KIT_S4PB] [108301013]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Kit_for_pcDuino3 Starter Kit for pcDuino3] [KIT_PCDUINO3][108401002]&lt;br /&gt;
*[[Starter Kit for pcDuino3B]] [KIT_PCDUINO3B][108402002]&lt;br /&gt;
*[[京东版pcDuino V2套件]][KIT_PCDUINO2][108401001]&lt;br /&gt;
*[[京东版pcDuino V2]] [KIT_PCDUINO2_JD][108403001]&lt;br /&gt;
*[[Learning Kit for Scratch for pcDuino(without pcDuino)]] [KIT_S4P_NOPCD][108302007]&lt;br /&gt;
*[[Stackable Header Kit for pcDuino3 Nano]]&lt;br /&gt;
*[[Cutedigi Project Kit A]] ［KIT_CUTE_PROJRCT_NANOA][108301014]&lt;br /&gt;
*[[pcDuino-Metas Kit]]&lt;br /&gt;
*[[OpenCV computer vision kit]] [KIT_PCDUINO8_UNO][108401003]&lt;br /&gt;
&lt;br /&gt;
==== USB Adaptors====&lt;br /&gt;
*[[ USB 2.0 Ethernet Adapter]] [CAB_ETHUSB][117201002]&lt;br /&gt;
&lt;br /&gt;
==IoT ==&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth 4.0 BLE ===&lt;br /&gt;
&lt;br /&gt;
*[[Bluetooth 4.0 BLE Sensor Tag/iBeacon Station NRF51822]] [BLE_SENTG]&lt;br /&gt;
&lt;br /&gt;
=== IoT Relay ===&lt;br /&gt;
&lt;br /&gt;
*[[Plug and Play P2P 16 Channels Relay Kit With WiFi and Dual RJ45 ports Connections]] [HA_16CHNRLY_L62 ]&lt;br /&gt;
*[[ESP8266 Serial WIFI Module]][ RF_ESP8266_RA5 ]&lt;br /&gt;
*[[SIM800L Quad-band Network Mini GPRS GSM Breakout Module]][  BB_SIM800L_ON2  ]&lt;br /&gt;
&lt;br /&gt;
=== IoT Kit ===&lt;br /&gt;
&lt;br /&gt;
*[[Smartworld Solar Panel Sensor Kit Compatible with Arduino]] [KIT_SOLARSW ]&lt;br /&gt;
&lt;br /&gt;
=== WRTnode ===&lt;br /&gt;
*[[WRTnode]]&lt;br /&gt;
*[[WRTnode Standard Shield]]&lt;br /&gt;
*[[WRTnode Dev Cables Kit]]&lt;br /&gt;
*[[WRTnode2R Dev Kit]]&lt;br /&gt;
&lt;br /&gt;
== 96board ==&lt;br /&gt;
&lt;br /&gt;
=== 96 board kits===&lt;br /&gt;
&lt;br /&gt;
[[ Linker Mezzanine card starter kit for 96board]]&lt;br /&gt;
&lt;br /&gt;
== Raspberry Pi Kits ==&lt;br /&gt;
*[[Raspberry Pi B+]][RAS_PI_B][120201008]&lt;br /&gt;
*[[RS232/GPIO Shield for Raspberry Pi V3.0]] [SHD_RPI_RS232GPIOV3] [101203001]&lt;br /&gt;
*[[RS485/GPIO Shield for Raspberry Pi V3.0]] [SHD_RPI_RS485GPIOV3][101203002]&lt;br /&gt;
&lt;br /&gt;
*[[TTL UART to USB Cable - Serial USB Debug Cable]] [CAB_RPIUARTUSB][117201001]&lt;br /&gt;
&lt;br /&gt;
*[[Linker kit Base Shield for Raspberry Pi with ADC Interface V3.0]] [LINKER_RPIBASEV3][118103020]&lt;br /&gt;
*[[LinkerKit for Raspberry Pi]]   [LINKERKIT_RPI][118301001]&lt;br /&gt;
*[[Starter Kit for Raspberry Pi]] [KIT_RPISTART][108301003]&lt;br /&gt;
&lt;br /&gt;
*[[Raspberry Pi T-Shoemaker Breakout Kit]] [RPI_TCOBB_KIT][120201001]&lt;br /&gt;
*[[Raspberry Pi Assorted Lego Style Enclosure]] [RPI_LEGOSTYLE_CASE][120201002]&lt;br /&gt;
*[[Assembled Raspberry Pi Shoemaker Breakout]] [RPI_COBB][120201003]&lt;br /&gt;
*[[GPIO Ribbon Cable for Raspberry Pi]] [RPI_GPIOCABLE][120201004]&lt;br /&gt;
*[[Assembled Raspberry Pi T-Shoemaker Breakout]] [RPI_T_COBB][120201005]&lt;br /&gt;
*[[Raspberry Pi microSD Card Adaptor]] [RPI_MSDADP][120201006]&lt;br /&gt;
*[[DS3231 Raspberry Pi RTC Board Real Time Clock Module for Arduino]][RPI_DS3231][120201007]&lt;br /&gt;
&lt;br /&gt;
*[[7&amp;quot; TFT Color LCD with RCA video input for Raspberry Pi ]] [LCD_7INCH_RCA][124201001]&lt;br /&gt;
&lt;br /&gt;
===HAT and Accessories for Raspberry Pi B+/ Raspberry Pi 2===&lt;br /&gt;
*[http://store.linksprite.com/raspberry-pi-b-to-arduino-adapter-hat-for-raspberry-pi-b/ Raspberry Pi B+ to Arduino Adapter HAT for Raspberry Pi B+/ Raspberry Pi 2] [RPI_ARDCON_PLUS] [120201009]&lt;br /&gt;
*[http://store.linksprite.com/gpio-extension-hat-for-raspberry-pi-b/ GPIO Extension HAT for Raspberry Pi B+/ Raspberry Pi 2] [RPI_GPIOEXIT_PLUS] [120201010]&lt;br /&gt;
*[http://store.linksprite.com/raspberry-pi-b-2x20p-to-raspberry-pi-b-2x13p-converter/ Raspberry Pi B+/ Raspberry Pi 2 2x20P to Raspberry Pi B 2x13P Converter] [RPT_RPIBPLUS2B] [120201011]&lt;br /&gt;
*[http://store.linksprite.com/gpio-reference-board-for-raspberry-pi-b/ GPIO Reference Board for Raspberry Pi B+/ Raspberry Pi 2] [RPI_GPIOREF_PLUS] [120201012]&lt;br /&gt;
*[http://store.linksprite.com/screw-protoshield-for-raspberry-pi-b/ Screw Protoshield for Raspberry Pi B+/ Raspberry Pi 2]  [RPI_SRWPRO_PLUS] [120201013]&lt;br /&gt;
*[http://store.linksprite.com/av-cable-for-raspberry-pi-b/ AV Cable for Raspberry Pi B+/ Raspberry Pi 2] [RPI_AVCAB_PLUS] [120201014]&lt;br /&gt;
*[http://store.linksprite.com/cutedigi-gpio-breakout-for-raspberry-pi-b/ GPIO Breakout for Raspberry Pi B+/ Raspberry Pi 2] [RPI_GPIOBB_PLUS] [120201015]&lt;br /&gt;
*[http://store.linksprite.com/cutedigi-t-shape-gpio-breakout-for-raspberry-pi-b/ T-shape GPIO Breakout for Raspberry Pi B+/ Raspberry Pi 2] [RPI_CDGPIOBB_RPIBP] [120201016]&lt;br /&gt;
*[http://store.linksprite.com/gpio-breakout-kit-for-raspberry-pi-b/ GPIO Breakout kit for Raspberry Pi B+/ Raspberry Pi 2] [RPI_KIT_RPIBPLUS] [120201017]&lt;br /&gt;
*[http://store.linksprite.com/gpio-ribbon-cable-for-raspberry-pi-b/ GPIO Ribbon Cable for Raspberry Pi B+/ Raspberry Pi 2] [RPI_GPIOCABLE_PLUS] [120201018]&lt;br /&gt;
*[http://store.linksprite.com/abs-plastic-enclosure-for-raspberry-pi-b-black/ ABS Plastic Enclosure for Raspberry Pi B+ / Raspberry Pi 2(Black)] [RPIBP_CSBLK_R11] [120201019]&lt;br /&gt;
*[http://store.linksprite.com/plastic-enclosure-for-raspberry-pi-b-white/ Plastic Enclosure for Raspberry Pi B+ (White)/ Raspberry Pi 2] [RPIBP_CSWHT] [120201020]&lt;br /&gt;
*[http://store.linksprite.com/black-alumina-enclosure-for-raspberry-pi-b/ Black Alumina Enclosure for Raspberry Pi B+/ Raspberry Pi 2] [RPIBP_CS_ALUCS] [120201021]&lt;br /&gt;
====Camera====&lt;br /&gt;
*[http://store.linksprite.com/raspberry-pi-camera-module-5mp-wide-angle-160-degree/ Raspberry Pi Camera Module 5MP Wide Angle 160 degree] [RPI_5MCAMWD_LR2] [120201022]&lt;br /&gt;
*[http://store.linksprite.com/a-pair-of-infrared-leds-for-raspberry-pi-camera-module-5mp-wide-angle-160-degree/ A Pair of Infrared LEDs for Raspberry Pi Camera Module 5MP Wide Angle 160 degree] [RPI_CAMINFLED] [120201023]&lt;br /&gt;
&lt;br /&gt;
== Arduino Kits ==&lt;br /&gt;
&lt;br /&gt;
*[[LinkerKit]][LINKER][118101001]-[118201003]&lt;br /&gt;
*[[Sensors Pack for Arduino]] [KIT_SENPACK][108301010]&lt;br /&gt;
***[[Hall Effect Sensor]]  - for sensing a magnet [KIT_SENPACK_COM_HALL][108201002]&lt;br /&gt;
*[[Advanced Sensors Kit for Arduino ]]   [ADVSEN_KIT]&lt;br /&gt;
*[[Advanced Learning Kit for Arduino]]   [ADVLEN_KIT]&lt;br /&gt;
*[[LED Matrix Kit]] [KIT_LEDMATRIX][108101001]&lt;br /&gt;
*[[LinkSprite Sensor Pack 101]]&lt;br /&gt;
*[[Introductory Kit with Clear Case for Arduino]] [INTOKIT_CLEARCASE]&lt;br /&gt;
*[[Scratch IO Shield Kit for Scratch for Arduino]] [KIT_SRIO][108301005]&lt;br /&gt;
*[[Learning Kit for Scratch for Arduino (S4A)]] [KIT_S4AADV][108301004]&lt;br /&gt;
*[[Temperature kit for Diamondback]] [KIT_DIA_TEM]&lt;br /&gt;
*[[The Global Car Tracking Kit]]&lt;br /&gt;
*[[Drawdio Kit]][KIT_DRAWDIO][108101006]&lt;br /&gt;
*[http://store.cutedigi.com/cutedigi-starter-kit-for-arduino-beginner-full-package  CuteDigi Starter Kit for Arduino ---Beginner Full Package] [KIT_ARDUINO_BFPACK][108301015]&lt;br /&gt;
*[[Smartworld Solar Panel Sensor Kit Compatible with Arduino]]&lt;br /&gt;
&lt;br /&gt;
==Beagleboard Kits==&lt;br /&gt;
&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Linker_kit_Base_Shield_for_Beagleboard Linker kit Base Shield for Beaglebone ]  [LINKER_BGLBASE][118101029]&lt;br /&gt;
&lt;br /&gt;
== Components and Breakout Boards ==&lt;br /&gt;
&lt;br /&gt;
===Components===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====GPS====&lt;br /&gt;
*[[GPS module SKM58]] [GPS_SKM58][116201002]&lt;br /&gt;
*[[32 Channel LinkSprite GPS 5Hz Receiver ]] [GPS_SKG17][116201001]&lt;br /&gt;
*[[GPS Patch Antenna (IPX interface with pig tale length 7cm)]] [ANT_GPS_PAT]&lt;br /&gt;
&lt;br /&gt;
*[[Serial port bluetooth module (Master/Slave)]]&lt;br /&gt;
*[[ RFID Card with UID Rewritable ]]&lt;br /&gt;
*[[ 7400 Series Kit , 5pcs]]&lt;br /&gt;
====ICs====&lt;br /&gt;
*[http://store.linksprite.com/shift-register-8-bit-74hc595/ Shift Register 8-Bit - 74HC595][74HC595_KB14]&lt;br /&gt;
*[http://store.linksprite.com/mcp23017-i2c-16-input-output-port-expander/  MCP23017-i2c 16 input/output port expander][MCP23017_KB15]&lt;br /&gt;
&lt;br /&gt;
====Breadboard====&lt;br /&gt;
*[[Mini Breadboard Mini Self-Adhesive for Arduino (White)]] [PRT_MINIBRD_WHITE][130201001]&lt;br /&gt;
*[[Mini Breadboard Mini Self-Adhesive for Arduino (RED)]] [PRT_MINIBRD_RED][130202001]&lt;br /&gt;
*[[Mini Breadboard Mini Self-Adhesive for Arduino (BLUE)]] [PRT_MINIBRD_BLUE][130203001]&lt;br /&gt;
*[[Mini Breadboard(400 holes)]][PRT_MINIBRD_400HOS][130201002]&lt;br /&gt;
&lt;br /&gt;
====Antenna====&lt;br /&gt;
*[[GSM/3G Antenna]] [ANT_GSM3G][123201001]&lt;br /&gt;
&lt;br /&gt;
====Button====&lt;br /&gt;
*[[Momentary Push Button Switch - 12mm Square]] [12MM_BUTTON_KB5]&lt;br /&gt;
====Infrared====&lt;br /&gt;
*[[Sharp GP2Y0A21YK0F Analog Distance Sensor 10-80cm]] [GP2Y0A21_D12]&lt;br /&gt;
&lt;br /&gt;
====Tapes====&lt;br /&gt;
*[[Copper Tape -5mm (50ft)]][COM_CUTP5MM][114201011]&lt;br /&gt;
*[[Copper Tape -8mm (50ft)]][COM_CUTP8MM][114201012]&lt;br /&gt;
&lt;br /&gt;
====Cable====&lt;br /&gt;
*[[USB microB Cable - 6 Foot]] [CAB_uB][117201004]&lt;br /&gt;
*[http://store.linksprite.com/usb-cable-a-to-b-3-foot/ USB Cable A to B - 3 Foot][CAB_USB_AB_3_J2][117201008]&lt;br /&gt;
*[http://store.cutedigi.com/cat-5e-ethernet-cable-rj45/ Cat 5E Ethernet Cable RJ45][CAB_ETHCAT5E][117201006]&lt;br /&gt;
*[[HDMI Cable]] [CAB_HDMI][117201007]&lt;br /&gt;
&lt;br /&gt;
=====RF cable=====&lt;br /&gt;
*[[Male N-J to MMCX-J Interface Cable]] [RFID_CAB_MNJ2MMCXJ ] [107201004]&lt;br /&gt;
&lt;br /&gt;
=== Case and Enclosure===&lt;br /&gt;
&lt;br /&gt;
*[[ Arduino Uno Assorted Lego Style Enclosure ]] [COM_CASE_ARDULEGO][114201007]&lt;br /&gt;
*[http://store.linksprite.com/aluminum-blue-box-for-wireless-device/ Aluminum Blue Box for Wireless Device ] [ALU_CASE_BLUE_C12]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=LinkSprite_Clear_Enclosure_for_pcDuino  LinkSprite Clear Enclosure for pcDuino/Arduino] [COM_CASE_PCDUINO_CLEAR] [114201005]&lt;br /&gt;
*[[LinkSprite Black Enclosure for pcDuino and arduino]] [COM_CASE_PCDUINO_CLEAR_B][114202005]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=LinkSprite_Extension_Plate_for_Clear_Enclosure_for_Arduino LinkSprite Extension Plate for Clear Enclosure for pcDuino/Arduino] [COM_CASE_ARDU_CLEAR_PLATE][114201003]&lt;br /&gt;
*[[LinkSprite Extension Plate for Black Enclosure for pcDuino]] [COM_CASE_PCDUINO_CLEAR_PLATE_B][114202003]&lt;br /&gt;
*[[Acrylic Clear Enclosure for pcDuino3]] [COM_ACCASE_PCDUINO3][114201010]&lt;br /&gt;
*[[Acrylic Clear Enclosure for pcDuino3 Universal Edition]] [COM_ACCASE_PCDUINO3_UE] [114202010]&lt;br /&gt;
*[[Acrylic Baffle Plate for pcDuino V2]][CASE_PCDV2END][128201001]&lt;br /&gt;
*[[Acrylic Clear Enclosure for pcDuino3Nano]] [COM_ACCASE_PCDUINO3NANO] [114201014]&lt;br /&gt;
*[[Acrylic Clear Enclosure for Linksprite Acadia 3.0]] [COM_ACCASE_ACADIA3.0] [114201016]&lt;br /&gt;
*[[Plastic Mounting Plate for pcDuino/Arduino With Rubber Feet]] [114201015]&lt;br /&gt;
&lt;br /&gt;
===Breakout===&lt;br /&gt;
&lt;br /&gt;
==== SD/MicroSD ====&lt;br /&gt;
*[[Breakout Board for microSD Transflash]] [BB_MINISD][105101004]&lt;br /&gt;
*[[SD Card Breakout Board]] [BB_SD][105101003]&lt;br /&gt;
&lt;br /&gt;
====SIM ====&lt;br /&gt;
*[[Breakout Board for SIM Cards]] [BB_SIM][105101021]&lt;br /&gt;
&lt;br /&gt;
==== MP3/Music/Voice ====&lt;br /&gt;
*[[Serial Port Voice Recognition Module]]  [BB_SERVOICE] [105201001]&lt;br /&gt;
*[[Serial Port Voice Recognition Module V2]] [BB_SERVOICE V2] [105202001]&lt;br /&gt;
*[[Breakout Board for ADMP401 MEMS Microphone]] [BB_ADMP401][105101002]&lt;br /&gt;
*[[Breakout Board for Si4703 FM Tuner]] [BB_FM_SI4703][105101007]&lt;br /&gt;
*[[Serial port controllable MP3 module ]] [BB_SERIAL_MP3][105201008]&lt;br /&gt;
&lt;br /&gt;
==== USB ====&lt;br /&gt;
*[[Xbee USB Adapter]] [BB_XBEE_MINIUSB][105101006]&lt;br /&gt;
*[[Breakout Board for FT232RL USB to TTL 5V]] [BB_MINIUSB_TTL][105101005]&lt;br /&gt;
&lt;br /&gt;
==== 2.4GHz Wireless ====&lt;br /&gt;
*[[NRF24L01 2.4GHz transceiver Breakout Board]] [BB_NRF24L01][105201007]&lt;br /&gt;
&lt;br /&gt;
==== Xbee====&lt;br /&gt;
*[[Xbee Socket to Xbee Socket Evaluation Board]] [BB_UART2UART][105101013]&lt;br /&gt;
*[[Xbee socket UART to RS232]] [BB_XBEE_UART2RS232][105101009]&lt;br /&gt;
*[[Xbee socket UART to RS485]] [BB_XBEE_UART2RS485][105101010]&lt;br /&gt;
*[[Xbee socket UART to USB]] [BB_XBEE_UART2USB][105101008]&lt;br /&gt;
*[[Breakout Board for XBee Module with 5V interface to 3.3V Xbee]]  [BB_XBEE_5_2_3P3][105101014]&lt;br /&gt;
*[[BluetoothBee]] [BB_XBEE_BLUETOOTH][105101017]&lt;br /&gt;
*[[Bluetooth 4.0 BLE Pro Xbee Form factor (Master/Slave and iBeacon)]][BB_XBEE_BLE4][105101117]&lt;br /&gt;
*[http://store.linksprite.com/xbee-breakout/ Xbee Breakout ] [BB_XBEE_B30][105101020]&lt;br /&gt;
&lt;br /&gt;
==== RJ45 ====&lt;br /&gt;
&lt;br /&gt;
*[[RJ45 8-pin Connector and Breakout Board Kit]] [BB_RJ45_KIT][105101015]&lt;br /&gt;
&lt;br /&gt;
==== GPS ====&lt;br /&gt;
*[[GPS Bee]] [BB_GPSBEE][105201002]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Sensors ====&lt;br /&gt;
===== Infrared=====&lt;br /&gt;
*[[Infrared Remote Control and Receiver]]&lt;br /&gt;
===== Light Sensor =====&lt;br /&gt;
*[[TEMT6000 Breakout Board]] [BB_TEMT6000][105101016]&lt;br /&gt;
*[http://store.linksprite.com/uv-sensor/ UV Sensor]  [SEN_UV][115201002]&lt;br /&gt;
&lt;br /&gt;
===== Accelerometer =====&lt;br /&gt;
*[[ ADXL335 Triple-Axis Accelerometer]] [BB_ADXL335][105101018]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=BMP085_9-axis_IMU_Module  9 Degrees of Freedom IMU] [BB_9AX_IMU_BMP085][105201006]&lt;br /&gt;
&lt;br /&gt;
=====Current=====&lt;br /&gt;
*[http://store.linksprite.com/coupling-transformer-current-sensor-breakout/  Coupling Transformer Current Sensor Breakout] [SEN_CURCOU][115201005]&lt;br /&gt;
&lt;br /&gt;
=====Distance=====&lt;br /&gt;
*[[Ultrasonic Range Sensor]] [SEN_DIS_ULTRA][115101001]&lt;br /&gt;
*[[Ultrasonic Sensor Breakout SRF04]] [SEN_DIS_ULTRA_B][115102001]&lt;br /&gt;
&lt;br /&gt;
=====ID=====&lt;br /&gt;
*[[Silicon Fingerprint Scanner]]   [SEN_ID_FP_SCAN][115201001]&lt;br /&gt;
*[[Silicon Fingerprint Area Sensing Module]]   [SEN_ID_FP_AREA][115201001]&lt;br /&gt;
&lt;br /&gt;
=====Air Quality=====&lt;br /&gt;
*[[Dust Sensor]] [SEN_DUSTPPD42NS][115201003]&lt;br /&gt;
&lt;br /&gt;
===== Force=====&lt;br /&gt;
*[[Force Sensitive Resistor 0.5&amp;quot;]] [KIT_SENPACK_COM_FSR][108201001]&lt;br /&gt;
&lt;br /&gt;
=====Water=====&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Water_Level_Sensor Liquid Level Sensor] [BB_SEN_PCBLIQUID][105201005]&lt;br /&gt;
*[http://store.linksprite.com/water-flow-sensor/  Water Flow Sensor] [SEN_WATER_FLOW][115201004]&lt;br /&gt;
&lt;br /&gt;
=====Temperature/Humidity=====&lt;br /&gt;
*[[Humidity and Temperature Sensor - SHT15 Breakout]] [BB_SEN_SHT15][105201004]&lt;br /&gt;
&lt;br /&gt;
=====Bump=====&lt;br /&gt;
*[[Bump Detector - SHT15 Breakout]] [SEN_BUMPDETEC][TBD][115201006]&lt;br /&gt;
&lt;br /&gt;
====RTC====&lt;br /&gt;
*[[DS3234 Breakout Board]] [BB_DS3234][105201003]&lt;br /&gt;
&lt;br /&gt;
====Power Supply====&lt;br /&gt;
*[[DC to DC step down with a output of 5V@5A]] [BB_POWDC2DC_5V5A][105101019]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[Serial UART 16x2 LCD]] [BB_SERLCD_1602G][105101001]&lt;br /&gt;
*[[FIR: Gainspan WiFi Module with Xbee Breakout]] [WIFI_MOD_FIR][103101001]&lt;br /&gt;
*[[TTL Level Shifter]] [BB_TTLLT][105101011]&lt;br /&gt;
*[[USB LiPoly Charger - Single Cell]] [BAT_USBCHARGER][106101001]&lt;br /&gt;
*[[Embedded Serial Web Server Module]] [BB_ETH_WS][105101012]&lt;br /&gt;
&lt;br /&gt;
===Labels===&lt;br /&gt;
====Socket Label====&lt;br /&gt;
*[[Arduino Sockets Labels]] [COM_ADRSOKLEB][114201013]&lt;br /&gt;
&lt;br /&gt;
===Socket===&lt;br /&gt;
*[[Mating Socket for pcDuino3C Core Board]] ［SOK_COM_PCD3C][133201001]&lt;br /&gt;
&lt;br /&gt;
== Lighting LEDs ==&lt;br /&gt;
&lt;br /&gt;
*[[LED strip driver]]  [LED_SPDRV][109101001]&lt;br /&gt;
*[[LED PWM Dimmer Constant Current Driver (DC: 12V -48V)]] [LED_CHAMELEON_I_48V][109201007]&lt;br /&gt;
*[[LED PWM Dimmer Constant Current Driver (DC:12V -200V)]] [LED_CHAMELEON_II_200V][109201008]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[[8X8 RED LED Matrix ]] [LED_8X8_Matrix_RED]&lt;br /&gt;
&lt;br /&gt;
==LCD==&lt;br /&gt;
*[[Basic 20x4 Character LCD - Black on Green 5V ]] [LCD_20_4_5V] [124201003]&lt;br /&gt;
*[[Basic 16x2 Character LCD - Black on Green 5V]] [LCD_16_2_5V] [124201004]&lt;br /&gt;
*[[Color LCD 128x128 Nokia Knock-Off]] [LCD_NOKIA_6100][124201005]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*[http://store.linksprite.com/spi-i2c-serial-16x2-character-lcd-backpack/ SPI/I2C Serial 16x2 Character LCD Backpack] [LCD_SPI2C_1602BP][124201006]&lt;br /&gt;
&lt;br /&gt;
==EL==&lt;br /&gt;
&lt;br /&gt;
*[http://store.linksprite.com/5v-usb-inverter-for-el-up-to-3-meters-of-el/ 5V USB Inverter for EL - Up to 3 meters of EL][POW_USBEL_Q30][126201001]&lt;br /&gt;
&lt;br /&gt;
== JPEG Cameras ==&lt;br /&gt;
===JPEG Camera Without case===&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=JPEG_Color_Camera_Serial_UART_Interface_(TTL_level) JPEG Color Camera Serial Interface (TTL level)]   [CAM_JPEG_TTLUART][201201001]&lt;br /&gt;
*[[JPEG Color Camera Serial Interface (RS232 level)]] [CAM_JPEG_RS232][201201002]&lt;br /&gt;
*[[JPEG Color Camera Serial Interface(RS485)]]  [CAM_JPEG_RS485][201201003]&lt;br /&gt;
*[[JPEG 2M Pixel Color Camera Serial Interface(TTL level)]]  [CAM_JPEG_2M_TTLUART][201201004]&lt;br /&gt;
*[[JPEG 2M Pixel Color Camera Serial Interface(RS232 level)]]  [CAM_JPEG_2M_RS232][201201005]&lt;br /&gt;
&lt;br /&gt;
*[[JPEG Color Camera Serial Interface with Built-in Infrared (TTL level)]] [CAM_JPEG_IR_TTLUART][202201001]&lt;br /&gt;
*[[JPEG Color Camera Serial Interface with Built-in Infrared (RS232 level)]] [CAM_JPEG_IR_RS232][202201002]&lt;br /&gt;
*[[JPEG Color Camera Serial Interface with Built-in Infrared (RS485 level)]] [CAM_JPEG_IR_RS485][202201003]&lt;br /&gt;
&lt;br /&gt;
*[[Lens of 90 degree view angle]] [CAM_LENS_JPEG_90D][206201001]&lt;br /&gt;
*[[180 Degree Wide Angle fisheye YUY2 5MP USB Camera for Linux/Windows]]&lt;br /&gt;
&lt;br /&gt;
==RFID==&lt;br /&gt;
=== 13.4MHz RFID Modules ===&lt;br /&gt;
*[[ PN532 RFID Module]] [RFID_NFC_BB_PN532][107101002]&lt;br /&gt;
*[[RFID Reader/Write Module A (IIC interface)]] [RFID_NFC_HY502A][107201005]&lt;br /&gt;
*[[RFID Reader/Write Module B (SPI interface)]] [RFID_NFC_HY502B][107201006]&lt;br /&gt;
*[[RFID Reader/Write Module C (UART interface)]][RFID_NFC_HY502C][107201007]&lt;br /&gt;
*[http://store.linksprite.com/nfc-rfid-kit-for-arduino/ NFC RFID Kit for Arduino] [KIT_NFC][108301009]&lt;br /&gt;
&lt;br /&gt;
===Tag===&lt;br /&gt;
*[[RFID tag, rewritable, Mifare 1, S50 (13.56MHz)]] [RFID_NFC_MIFARE][107201012]&lt;br /&gt;
*[http://store.cutedigi.com/13-56mhz-water-droplets-transparent-nfc-key-tag/ 13.56MHz Water Droplets Transparent NFC Key Tag]  [SEN_NFCTKEYTG]  [107201020]&lt;br /&gt;
&lt;br /&gt;
=== UHF RFID Modules and Integrated Readers===&lt;br /&gt;
====Module====&lt;br /&gt;
*[[Cottonwood: UHF Long distance RFID reader module]][RFID_UHF_TTL_CW][107101001] or [RFID_UHF_USB_CW][107102001]&lt;br /&gt;
&lt;br /&gt;
====Integrated Readers====&lt;br /&gt;
*[[Long Range UHF RFID reader (1-6 meters) (ISO18000-6C EPC G2) RS232]]  [RFID_UHF_READER_WAN_0702_RS232][107201016]&lt;br /&gt;
*[[Long Range UHF RFID reader (1-6 meters) (ISO18000-6C EPC G2) RJ45]]  [RFID_UHF_READER_WAN_0702_RJ45][107201017]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Integrated_far-distance_reader_(1-15meters)  Long Range UHF RFID reader (1-15 meters)(ISO18000-6C EPC G2) RS232]  [RFID_UHF_READER_WAN_0703_RS232][107201018]&lt;br /&gt;
*[[Long Range UHF RFID Reader (1-25meters) (ISO18000-6C EPC G2) RS232]] [RFID_UHF_READER_WAN_0704_RS232][107201019]&lt;br /&gt;
&lt;br /&gt;
==== Antenna ====&lt;br /&gt;
*[[5dBi PCB UHF RFID 902-928M Antenna 5cm x 5cm]] [RFID_UHF_AN5DB][107101003]&lt;br /&gt;
*[[LinkSprite UHF RFID Reader Antenna (902-928MHz, 8dBi RHC Pol)]] [RFID_UHF_AN8DBMINI][107201002]&lt;br /&gt;
**This includes [[Male N-J to MMCX-J Interface Cable]] [RFID_CAB_MNJ2MMCXJ ] [107201004]&lt;br /&gt;
*[[UHF RFID Reader Antenna (902-928MHz, 8dBic LHC Pol)]] [RFID_UHF_AN8DN_S9028PCL][107201001]&lt;br /&gt;
**[[SMA to MMCX Interface Cable ]] [RFID_SMA_MMCX_ADAPTER][107201003]&lt;br /&gt;
&lt;br /&gt;
====Tag ====&lt;br /&gt;
*[[UHF RFID tag, EPC Gen2 (900MHz)]] [RFID_UHF_CARDTAG_LS0831][107201008]&lt;br /&gt;
*[[LS0832- Dual Frequencies UHF+HF RFID tag]] [RFID_UHFHF_CARDTAG_LS0832][107201009]&lt;br /&gt;
*[[UHF RFID tag for metal surface and Vechile, EPC Gen2 (900MHz)]] [RFID_UHF_METALTAG][107201013]&lt;br /&gt;
*[[Key Tag UHF RFID tag , EPC Gen2 (900MHz)]] [RFID_UHF_KEYTAG][107201015]&lt;br /&gt;
*[[UHF RFID tag for Vechile Licenser Plate, EPC Gen2 (900MHz)]] [RFID_UHF_PLATETAG][107201014]&lt;br /&gt;
*[[UHF RFID tag for flex surface (tape on back) Transparent , EPC Gen2 (900MHz)]] [RFID_UHF_FLEXTRANTAG][107201010]&lt;br /&gt;
*[[UHF RFID tag for flex surface (tape on back) Nontransparent , EPC Gen2 (900MHz)]] [RFID_UHF_FLEXNONTRANTAG][107201011]&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
&lt;br /&gt;
===Wall Adapters===&lt;br /&gt;
*[[ AC 100-240V 0.3A DC 5V 2A US Plug USB Power Supply Wall Adapter]][POW_5V2AUSB_P7][126201002]&lt;br /&gt;
*[[AC 100-240V 0.3A DC 5V 2A Europe/China Plug USB Power Supply Wall Adapter]] [POW_5V2AUSB_EU][126201003]&lt;br /&gt;
*[[AC 100-240V 0.3A DC 5V 2A USB Plug USB Power Supply Wall Adapter with Micro USB connector ]][POW_5V2AUSBMIRCO_US][126201005]&lt;br /&gt;
*[http://store.cutedigi.com/universal-to-uk-power-plug-adapter/ Universal to UK Power Plug Adapter][TOL_PW_UNI2UK ] [125201003]&lt;br /&gt;
*[[AC 100-240V 0.3A DC 5V 2A Australia Plug USB Power Supply Wall Adapter]] [POW_5V2AUSB_AUS][126201006]&lt;br /&gt;
*[[Wall Adapter Power Supply - 12VDC 1A]] [P0W_12VDC_1A][126201007]&lt;br /&gt;
*[[Wall Adapter Power Supply - 5VDC 2A]] [POW_TL_5V2A][126201008]&lt;br /&gt;
*[[Wall Adapter Power Supply - 5VDC 4A]] [POW_5VD_4A][126201009]&lt;br /&gt;
*[[Embedded AC to 12V Power Supply Module]] [EM_POWAC2DC_12V][126301001]&lt;br /&gt;
&lt;br /&gt;
===Hub===&lt;br /&gt;
*[[4 Port USB Hub]] [TOL-USBHUB-4PT][125201004]&lt;br /&gt;
&lt;br /&gt;
===Battery===&lt;br /&gt;
*[http://store.cutedigi.com/stylish-usb-battery-pack-for-pcduino-raspberry-pi-3700mah-5v-1a/ Stylish USB Battery Pack for pcDuino/Raspberry Pi-3700mAh-5V@1A ][BAT_3700][106201002]&lt;br /&gt;
&lt;br /&gt;
===Organizer===&lt;br /&gt;
*[http://store.cutedigi.com/plastic-box-for-components-kit-5-5x3-5x1-5/  Plastic Box for Components Kit 5.5&amp;quot;x3.5&amp;quot;x1.5&amp;quot;] [TL_BX5P5_3P5_1P5][209201001]&lt;br /&gt;
*[[ Plastic Box for Components Kit 6.88&amp;quot;x5.9&amp;quot;x1.69&amp;quot; (175mmx150mmx43mm)]]  [TL_BX_6P8_5P9_1P6][209201002]&lt;br /&gt;
*[[ Plastic Box for Components Kit 8.85&amp;quot;x6.10&amp;quot;x2.28&amp;quot; (225mmx155mmx58mm)]]  [TL_BX_8P8_6P1_2P2][209201003]&lt;br /&gt;
&lt;br /&gt;
===Signal Generators===&lt;br /&gt;
*[http://store.linksprite.com/mini-dds-function-generator/ Mini DDS Function Generator] [TOL_FG085_Q17][125201005]&lt;br /&gt;
&lt;br /&gt;
===Programmer===&lt;br /&gt;
*[[Silabs Compatible USB Debug Adapter]] [SILAB_USB_DEBUG_ADAP] [117201009]&lt;br /&gt;
*[http://store.cutedigi.com/altera-usb-blaster-fpga-cpld-compatible-jtag-cable/  Altera USB Blaster FPGA CPLD compatible JTAG cable] [ALTERA_USB_BLASTER][134201001]&lt;br /&gt;
&lt;br /&gt;
== Books ==&lt;br /&gt;
&lt;br /&gt;
*[[Getting Started With pcDuino]]  [BOK_PCDCHN_1] [129201001]&lt;br /&gt;
&lt;br /&gt;
== OpenWRT ==&lt;br /&gt;
*[[TL-WR703N Clone With OPENWRT, USB Camera Support, TTL UART]]&lt;br /&gt;
&lt;br /&gt;
== Robotics ==&lt;br /&gt;
===Platform===&lt;br /&gt;
&lt;br /&gt;
*[[LinkSprite Basic Robot Platform]]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=Acrylic_Frame_Robot_Platform  Acrylic Turtle 2WD Mobile Platform for Arduino/pcDuino ][KIT_ROT_T2WDACY][108301011]&lt;br /&gt;
*[[Scratch Egg Car]]&lt;br /&gt;
&lt;br /&gt;
===Motor Driver ===&lt;br /&gt;
*[[DC Motor Driver Breakout (L298 Chipset)]] [BOT_MOTDRV_L298][104101001]&lt;br /&gt;
&lt;br /&gt;
===LinkerBot===&lt;br /&gt;
&lt;br /&gt;
*[[LinkerBot Platform]] [BOT_LB_PLATFORM][104201002]&lt;br /&gt;
&lt;br /&gt;
===MiniBot===&lt;br /&gt;
*[[Minibot with Arduino Programming ]]  [BOT_MINI][104201007]&lt;br /&gt;
&lt;br /&gt;
===Servo===&lt;br /&gt;
*[[RB-65CS: Servo with 360 Degree freedom]][BOT_SERVO_65CS][104201003]&lt;br /&gt;
*[[RB-150CS: Servo with 360 Degree freedom ]][BOT_SERVO_150CS][104201004]&lt;br /&gt;
*[[SG90 mini servo for webcam]][SV_SG90][108202004-3]&lt;br /&gt;
&lt;br /&gt;
===Fixture for Servos===&lt;br /&gt;
*[[Fixture for servos of webcam used for Robotics]] [FIX_SERVO_CAM][108202004-2]&lt;br /&gt;
&lt;br /&gt;
===Camera===&lt;br /&gt;
*[[Mini Webcam for Robot Video Real Time Video Stream]] [WEBCAM_PCDUINO][108202004-1]&lt;br /&gt;
*[[Mini Webcam for Robot Video Real Time Video Stream V2.0]] [WEBCAM_PCDUINO_V2][108202005]&lt;br /&gt;
&lt;br /&gt;
===Robot Battery===&lt;br /&gt;
*[[Battery for Robot 4800mAH]] [BAT_4800MHAH][106201001]&lt;br /&gt;
*[[Battery for Robot 4800mAH Europe Edition]]  [BAT_4800MHAH_EU] [106202001]&lt;br /&gt;
&lt;br /&gt;
===Parts===&lt;br /&gt;
*[[Ball Caster Metal]] [BOT_PT_OMNIDMETAL][104201008]&lt;br /&gt;
*[[Linker Block 12 Lego Holes Long Grooved Beam -Aluminium]] [LB_12HGB][132201001]&lt;br /&gt;
*[[Linker Block Curved Beam with 4 Holes]][LB_4HCVBEAM][132201002]&lt;br /&gt;
*[[Linker Block Side Beam with 6 Holes]][LB_SBM_6H][132201003]&lt;br /&gt;
*[[Linker Block 10*3 Lego Holes Long Grooved Beam -Aluminium]] [LB_10B3_GB][132201019]&lt;br /&gt;
*[[Linker Block 9*18 Lego Holes Sheet -Aluminium]][LB_9B18_SHT][132201004]&lt;br /&gt;
*[[Linker Block Shaft Connector]][LB_NODESHFT][132201005]&lt;br /&gt;
*[[Linker Block Passive Cross Shaft -Aluminium]][LB_PASSSHFT][132201006]&lt;br /&gt;
*[[Linker Block Shaft Collar]] [LB_SHAFTCOL][132201020]&lt;br /&gt;
*[[Linker Block DC Motor]] [LB_DCMOTOR][132201007]&lt;br /&gt;
*[[Linker Block Motor Fixture Plate -Aluminium]] [LB_MOTFIXPLATE][132201008]&lt;br /&gt;
*[[Linker Block 90 Degree Fixture With a Length of 3 Holes]][LB_RETFIX3HOLE][132201009]&lt;br /&gt;
*[[Linker Block 90 Degree Fixture With a Length of 6 Holes]][LB_RETFIX6HOLE][132201010]&lt;br /&gt;
*[[Linker Block Gear Wheel with a Diameter of 5.6cm]][LB_WHEEL5P6][132201011]&lt;br /&gt;
*[[Linker Block Tire a Diameter of 5.6cm]][LB_TIRE5P5][132201012]&lt;br /&gt;
*[[Linker Block Track]] [LB_TRACK][132201021]&lt;br /&gt;
*[[Linker Block Track Connector]][LB_TRKCON][132201013]&lt;br /&gt;
*[[Linker Block Screw Driver For Hexagon M4]][LB_M4_SWDRV][132201014]&lt;br /&gt;
*[[Linker Block M4x14 Bolt]][LB_M4X14_BOLT][132201015]&lt;br /&gt;
*[[Linker Block M4 Nut]][LB_M4_NUT][132201016]&lt;br /&gt;
*[[Linker Block Plastic Washer M4]][LB_M4_WH][132201017]&lt;br /&gt;
*[[Linker Block UN*16 Bolt]] [LB_UN16_BOLT][132201022]&lt;br /&gt;
*[[Linker Block UN Nut]] [LB_UN_NUT][132201023]&lt;br /&gt;
*[[Linker Block M2x5 Screw]] [LB_M2X5_SRW][132201018]&lt;br /&gt;
*[[Linker Block Grub Screw]] [LB_GRUB_SRW][132201024]&lt;br /&gt;
&lt;br /&gt;
===Rover===&lt;br /&gt;
*[[Rover: WiFi Video Streaming Robot]] [BOT_ROVER][104201001]&lt;br /&gt;
*[[pcDuino Rover: WiFi Video Streaming Robot Kit]] [BOT_PDROVER_KIT][104201006]&lt;br /&gt;
*[[DC 12V to 5V Power Adaptor Module at 2A for pcDuino Robot]][POW_12VTO5V_H2][126101001]&lt;br /&gt;
*[[Acrylic Turtle 2WD Mobile Video Robot powered by pcDuino3 V2.0]] [KIT_BOT_T2WDACY_VIDEO_PD3_V2][108401006]&lt;br /&gt;
&lt;br /&gt;
*[[Battery case for Rover]][TOL-BATHOLD][125201006]&lt;br /&gt;
&lt;br /&gt;
===Motor===&lt;br /&gt;
*[[Stepper Motor with Cable]] [STEPPER_MOTOR][131201001]&lt;br /&gt;
&lt;br /&gt;
===Robotic Arm===&lt;br /&gt;
*[[Robotic Arm]]&lt;br /&gt;
&lt;br /&gt;
===Linker Block Set===&lt;br /&gt;
*[[Linker Block Basic Robot Platform Set A]] [KIT_LB_BASROT_A][108301008]&lt;br /&gt;
*[http://linksprite.com/wiki/index.php5?title=PcDuino_Metal_Lego_Video_Tank Linker Block Tank Robot Platform ] [KIT_LB_BASROT_B]108302008]&lt;br /&gt;
&lt;br /&gt;
== Virtual Reality (VR)==&lt;br /&gt;
*[http://store.linksprite.com/diy-virtual-reality-3d-glasses-cardboard-box-nfc-for-google-card/  DIY Virtual Reality 3D Glasses Cardboard Box NFC for Google Card ] [VR_CARDBOX] [209201005]&lt;br /&gt;
&lt;br /&gt;
== FPGA ==&lt;br /&gt;
&lt;br /&gt;
== S3C6410 Development Kit==&lt;br /&gt;
&lt;br /&gt;
*[[LS6410 SAMSUNG ARM11 S3C6410 board kit Without LCD ]] [KIT_LS6410_WOLCD][108201008]&lt;br /&gt;
*[[LS6410 SAMSUNG ARM11 S3C6410 board kit 4.3 TFT LCD ]] [KIT_LS6410_4P3][108201009]&lt;br /&gt;
*[[LS6410 SAMSUNG ARM11 S3C6410 board kit 7.0 TFT LCD ]] [KIT_LS6410_7][108201010]&lt;br /&gt;
*[[Camera Module (3M pixel) for ARM development board]] [CAM_LS6410_OV3640_3MP][205201001]&lt;br /&gt;
*[[Camera Module (1.3M pixel) for ARM development board]] [CAM_LS6410_OV9650_1P3MP][205201002]&lt;br /&gt;
*[[Four-band GSM/GPRS Module SIM300 for LS6410 S3C6400 Dev Board]] [CL_LS6410_SIM300][113201001]&lt;br /&gt;
&lt;br /&gt;
== Accessories ==&lt;br /&gt;
*[[Power Adapter]] [POW_ADAP_DN1] [126201004]&lt;br /&gt;
*[[Alligator Clip]] [TOL_TSTCLIP] [125201001]&lt;br /&gt;
*[[Heat Shrink Tube (Black)]] [TOL_HTTUBE][125201002]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=PcDuino8_UNO_get_started_Kit&amp;diff=7751</id>
		<title>PcDuino8 UNO get started Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=PcDuino8_UNO_get_started_Kit&amp;diff=7751"/>
		<updated>2015-12-22T08:09:18Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Recently, LinkSprite released a powerful mini PC platform pcDuino8 Uno which is powered by Allwinner H8 SoC chip. It has 8 Cortex-A7 ARM cores whose operating frequency is up to 2.0GHz.&lt;br /&gt;
&lt;br /&gt;
Base on this powerful platform, we are construct a new kit called OpenCV computer vision kit which users can use to quick start OpenCV computer vision and do lost of fun stuff including but not limited to the follows:&lt;br /&gt;
&lt;br /&gt;
* Learn or teach programming&lt;br /&gt;
* Learn Ubuntu Linux&lt;br /&gt;
* Work with hardware part&lt;br /&gt;
* OpenCV computer vision&lt;br /&gt;
* Implement a network video monitoring system&lt;br /&gt;
* DIY a simple camera&lt;br /&gt;
* Motion detection&lt;br /&gt;
* Face detection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:PcDuino8_UNO_get_started_kit.png]]&lt;br /&gt;
&lt;br /&gt;
==Package List==&lt;br /&gt;
1 X [[PcDuino8 Uno]] [MP_PCDUINO8_UNO] [102109008]&lt;br /&gt;
&lt;br /&gt;
1 X [[Mini Webcam for Robot Video Real Time Video Stream V2.0]] [WEBCAM_PCDUINO_V2][108202005]&lt;br /&gt;
&lt;br /&gt;
1 X [[USB microB Cable - 6 Foot]] [CAB_uB][117201004]&lt;br /&gt;
&lt;br /&gt;
1 X 8G TF Card&lt;br /&gt;
&lt;br /&gt;
==Projects==&lt;br /&gt;
1. CameraDIY&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-1-camera-diy.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/1.CameraDIY Demo]&lt;br /&gt;
&lt;br /&gt;
2. Face Detection&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-2-face-detection.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/2.FaceDetection Demo]&lt;br /&gt;
&lt;br /&gt;
3. Motion Detection&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-3-motion-detection.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/3.MotionDetection Demo]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=PcDuino8_UNO_get_started_Kit&amp;diff=7750</id>
		<title>PcDuino8 UNO get started Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=PcDuino8_UNO_get_started_Kit&amp;diff=7750"/>
		<updated>2015-12-22T08:06:22Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Recently, LinkSprite released a powerful mini PC platform **pcDuino8 Uno** which is powered by Allwinner H8 SoC chip. It has 8 Cortex-A7 ARM cores whose operating frequency is up to 2.0GHz.&lt;br /&gt;
&lt;br /&gt;
In this user guide, we are going to introduce how to quick start OpenCV computer vision and how to use this kit to do lost of fun stuff including but not limited to the follows:&lt;br /&gt;
&lt;br /&gt;
* Learn or teach programming&lt;br /&gt;
* Learn Ubuntu Linux&lt;br /&gt;
* Work with hardware part&lt;br /&gt;
* OpenCV computer vision&lt;br /&gt;
* Implement a network video monitoring system&lt;br /&gt;
* DIY a simple camera&lt;br /&gt;
* Motion detection&lt;br /&gt;
* Face detection&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:PcDuino8_UNO_get_started_kit.png]]&lt;br /&gt;
&lt;br /&gt;
==Package List==&lt;br /&gt;
1 X [[PcDuino8 Uno]] [MP_PCDUINO8_UNO] [102109008]&lt;br /&gt;
&lt;br /&gt;
1 X [[Mini Webcam for Robot Video Real Time Video Stream V2.0]] [WEBCAM_PCDUINO_V2][108202005]&lt;br /&gt;
&lt;br /&gt;
1 X [[USB microB Cable - 6 Foot]] [CAB_uB][117201004]&lt;br /&gt;
&lt;br /&gt;
1 X 8G TF Card&lt;br /&gt;
&lt;br /&gt;
==Projects==&lt;br /&gt;
1. CameraDIY&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-1-camera-diy.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/1.CameraDIY Demo]&lt;br /&gt;
&lt;br /&gt;
2. Face Detection&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-2-face-detection.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/2.FaceDetection Demo]&lt;br /&gt;
&lt;br /&gt;
3. Motion Detection&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-3-motion-detection.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/3.MotionDetection Demo]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=PcDuino8_UNO_get_started_Kit&amp;diff=7725</id>
		<title>PcDuino8 UNO get started Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=PcDuino8_UNO_get_started_Kit&amp;diff=7725"/>
		<updated>2015-12-21T04:48:24Z</updated>

		<summary type="html">&lt;p&gt;Youkee: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Recently, LinkSprite released a powerful mini PC platform pcDuino8 Uno which is powered by Allwinner H8 SoC chip. It has 8 Cortex-A7 ARM cores whose operating frequency is up to 2.0GHz.&lt;br /&gt;
&lt;br /&gt;
This get started kit is based on pcDuino8 Uno which you can use to do lost of fun stuff including but not limited to the follows:&lt;br /&gt;
&lt;br /&gt;
* Learn or teach programming&lt;br /&gt;
* Learn Ubuntu Linux&lt;br /&gt;
* Work with hardware part&lt;br /&gt;
* Implement a network video monitoring system&lt;br /&gt;
* DIY a simple camera&lt;br /&gt;
* Motion detection&lt;br /&gt;
* Face detection&lt;br /&gt;
&lt;br /&gt;
[[File:PcDuino8_UNO_get_started_kit.png]]&lt;br /&gt;
&lt;br /&gt;
==Package List==&lt;br /&gt;
1 X [[PcDuino8 Uno]] [MP_PCDUINO8_UNO] [102109008]&lt;br /&gt;
&lt;br /&gt;
1 X [[Mini Webcam for Robot Video Real Time Video Stream V2.0]] [WEBCAM_PCDUINO_V2][108202005]&lt;br /&gt;
&lt;br /&gt;
1 X [[USB microB Cable - 6 Foot]] [CAB_uB][117201004]&lt;br /&gt;
&lt;br /&gt;
1 X 8G TF Card&lt;br /&gt;
&lt;br /&gt;
==Projects==&lt;br /&gt;
1. CameraDIY&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-1-camera-diy.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/1.CameraDIY Demo]&lt;br /&gt;
&lt;br /&gt;
2. Face Detection&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-2-face-detection.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/2.FaceDetection Demo]&lt;br /&gt;
&lt;br /&gt;
3. Motion Detection&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/blob/master/doc/en/post/3-3-motion-detection.md User Guide]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/pcduino/pcduino8-uno-guide/tree/master/demo/3.MotionDetection Demo]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=Acrylic_Turtle_2WD_Mobile_Video_Robot_powered_by_pcDuino3_V2.0&amp;diff=7619</id>
		<title>Acrylic Turtle 2WD Mobile Video Robot powered by pcDuino3 V2.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=Acrylic_Turtle_2WD_Mobile_Video_Robot_powered_by_pcDuino3_V2.0&amp;diff=7619"/>
		<updated>2015-12-07T23:16:45Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
The robot with acrylic frame and video surveillance, it uses pcDuino3 as control board.&lt;br /&gt;
&lt;br /&gt;
[[File:pcDuino V3 acrylic robot_v2.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Package List ==&lt;br /&gt;
&lt;br /&gt;
*1 × [http://linksprite.com/wiki/index.php5?title=PcDuino3B pcDuino3B][MP_PCDUINO3B][102305006]&lt;br /&gt;
&lt;br /&gt;
*1 × [http://linksprite.com/wiki/index.php5?title=Mini_Webcam_for_Robot_Video_Real_Time_Video_Stream_V2.0 Mini Webcam for Robot Video Real Time Video Stream V2.0][WEBCAM_PCDUINO_V2][108202005]&lt;br /&gt;
&lt;br /&gt;
*1 × [http://linksprite.com/wiki/index.php5?title=Motor_Shield Motor Shield][SHD_MOTOR][101101014][SHD_MOTOR][101101014]&lt;br /&gt;
&lt;br /&gt;
*1 × [http://linksprite.com/wiki/index.php5?title=Acrylic_Frame_Robot_Platform Acrylic Frame Robot Platform] [KIT_ROT_T2WDACY][108301011]&lt;br /&gt;
&lt;br /&gt;
*1 × [http://linksprite.com/wiki/index.php5?title=AC_100-240V_0.3A_DC_5V_2A_Europe/China_Plug_USB_Power_Supply_Wall_Adapter Wall Power Adapter (5V 2A)][POW_5V2AUSB_EU][126201003]&lt;br /&gt;
&lt;br /&gt;
*1 × [http://linksprite.com/wiki/index.php5?title=USB_microB_Cable_-_6_Foot Micro USB cable][CAB_uB][117201004]&lt;br /&gt;
&lt;br /&gt;
*1 × [http://linksprite.com/wiki/index.php5?title=4_Port_USB_Hub 4 port USB hub][TOL-USBHUB-4PT][125201004]&lt;br /&gt;
&lt;br /&gt;
*1 × [http://linksprite.com/wiki/index.php5?title=HDMI_Cable HDMI cable][CAB_HDMI][117201007]&lt;br /&gt;
&lt;br /&gt;
*1 × [http://linksprite.com/wiki/index.php5?title=Acrylic_Clear_Enclosure_for_pcDuino3_Universal_Edition Acrylic Clear Enclosure for pcDuino3 Universal Edition] [COM_ACCASE_PCDUINO3_UE][114202010]&lt;br /&gt;
&lt;br /&gt;
*10× [http://www.cutedigi.com/prototyping/wire/jumper-wires-pack-of-40-femaletofemale-with-254mm-to-20mm.html 2.54mm to 2.0mm Jumper Wire][IT_JUMR_FF2.54_2.0MM_WI20CM][BB101101]&lt;br /&gt;
&lt;br /&gt;
== Assembly Instruction ==&lt;br /&gt;
*[http://learn.linksprite.com/robot/video-how-to-assemble-linksprite-turtle-2wd-mobile-platform/ assembly video]&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
*[https://s3.amazonaws.com/pcduino/Images/v3/Robot-firmware-for-pcDuino3B.rar Robot-firmware-for-pcDuino3B.rar]&lt;br /&gt;
*[https://s3.amazonaws.com/linksprite/robot/pcDuino+V2+video+robot/WiFiRobot.apk WiFiRobot.apk]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.linksprite.com/index.php?title=RS485/GPIO_Shield_for_Raspberry_Pi_V3.0&amp;diff=7608</id>
		<title>RS485/GPIO Shield for Raspberry Pi V3.0</title>
		<link rel="alternate" type="text/html" href="https://wiki.linksprite.com/index.php?title=RS485/GPIO_Shield_for_Raspberry_Pi_V3.0&amp;diff=7608"/>
		<updated>2015-11-24T01:56:07Z</updated>

		<summary type="html">&lt;p&gt;Youkee: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This is a shield to add a RS485 level shift to the UART of Raspberry Pi. Moreover, it also breakout the rest headers for easy access.&lt;br /&gt;
&lt;br /&gt;
It's a new version which compatible with Raspberry Pi B+ .&lt;br /&gt;
&lt;br /&gt;
[[File:RS485 V3 for RPi_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:RS485 V3 for RPi_2.jpg]]&lt;br /&gt;
&lt;br /&gt;
[[File:RS485 V3 for RPi_3.jpg]]&lt;br /&gt;
&lt;br /&gt;
== Schematics ==&lt;br /&gt;
&lt;br /&gt;
*[https://s3.amazonaws.com/linksprite/Shields/RS485_RPI/RS485+Shield+for+RPi+B%2B.PDF schematics]&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
The UART on Raspberry Pi is on P1 and shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:RPI UART.png]]&lt;br /&gt;
&lt;br /&gt;
The UART is /dev/ttyAMAO,  it defaults to output system log.  But if user wants to use this UART to connect to other modules through UART, for example, GPS module, we need to change the configuration.&lt;br /&gt;
&lt;br /&gt;
The detailed steps are as following:&lt;br /&gt;
&lt;br /&gt;
We need to modify two files:  /boot/cmdline.txt and /etc/inittab.&lt;br /&gt;
&lt;br /&gt;
Modify /boot/cmdline.txt:&lt;br /&gt;
&lt;br /&gt;
Replace the original content: &lt;br /&gt;
&lt;br /&gt;
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait&lt;br /&gt;
&lt;br /&gt;
With:&lt;br /&gt;
&lt;br /&gt;
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Modify /etc/inittab:&lt;br /&gt;
&lt;br /&gt;
Comment out the last line of /etc/inittab. To comment out, it simply addess a '#'.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$ sudo vi /etc/inittab&lt;br /&gt;
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100&lt;br /&gt;
&lt;br /&gt;
Save the changes, and reboot. We will get an UART with baud rate of 115200.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
&lt;br /&gt;
*[http://learn.linksprite.com/raspberry-pi/shield/user-tips-of-rs485-shield-for-rpi/ User Guide of RS485 Shield for Raspberry Pi]&lt;/div&gt;</summary>
		<author><name>Youkee</name></author>
		
	</entry>
</feed>