Difference between revisions of "ITEAD SDK"

From ITEAD Wiki
Jump to: navigation, search
m (Links to existing pages added by LinkTitles bot.)
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<markdown>
+
'''1. What is ITEAD SDK?'''
## What Is It?
+
+
 
   
 
   
 
IteadOS SDK offers junior developers with underlying
 
IteadOS SDK offers junior developers with underlying
Line 10: Line 8:
 
   
 
   
 
IteadOS SDK supports Iteaduino Plus and [[IBOX|ibox]]. For details of the
 
IteadOS SDK supports Iteaduino Plus and [[IBOX|ibox]]. For details of the
hardware, you can refer to <http://imall.iteadstudio.com/ibox.html/> and
+
hardware, you can refer to  
<http://imall.iteadstudio.com/iteaduino-plus-a20.html/>
+
:<http://imall.iteadstudio.com/ibox.html/>
 +
:<http://imall.iteadstudio.com/iteaduino-plus-a20.html/>
 
   
 
   
 
The operating functions similar to Arduino offered by the SDK make it
 
The operating functions similar to Arduino offered by the SDK make it
Line 20: Line 19:
 
same chip (Allwinner A10/A20) such pcDuino, Marsboard, Cubieboard, etc.
 
same chip (Allwinner A10/A20) such pcDuino, Marsboard, Cubieboard, etc.
 
   
 
   
## What Can It Do?
+
'''2. What Can It Do?'''
  
 
At present, IteadOS SDK holds the following features making it possible for users
 
At present, IteadOS SDK holds the following features making it possible for users
Line 42: Line 41:
  
 
   
 
   
## Dependency
+
'''3. Dependency'''
 +
 
 
* Platform :Allwinner A10/A20 SoC
 
* Platform :Allwinner A10/A20 SoC
* Kernel verson: linux-sunxi-3.4
+
* Kernel version: linux-sunxi-3.4
<https://github.com/linux-sunxi/linux-sunxi>
+
:<https://github.com/linux-sunxi/linux-sunxi>
* Kernel make configure
+
* Kernel make configure file:
file:<https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a10_defconfig>
+
:<https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a10_defconfig>
and <https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a20_defconfig>
+
:<https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a20_defconfig>
* FEX file:<https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a10.fex>
+
* FEX file:
and <https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a20.fex>
+
:<https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a10.fex>
 +
:<https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a20.fex>
 
   
 
   
 
Users of [[Iteaduino Plus A10/A20]] can directly [[download]] and install the
 
Users of [[Iteaduino Plus A10/A20]] can directly [[download]] and install the
Line 57: Line 58:
 
offered.
 
offered.
 
   
 
   
## Dynamic Library(.so file) Catalogue:
+
*Dynamic Library(.so file) Catalogue:
 
Python users need to know the specific installation locations of the
 
Python users need to know the specific installation locations of the
 
following dynamic libraries when they use the SDK:
 
following dynamic libraries when they use the SDK:
 
   
 
   
* libiteadc.so(core c language dynamic library):/usr/lib, /usr/local/lib
+
: libiteadc.so(core c language dynamic library):/usr/lib, /usr/local/lib
* libiteadcpp.so(core c++ dynamic library):/usr/lib, /usr/local/lib
+
: libiteadcpp.so(core c++ dynamic library):/usr/lib, /usr/local/lib
* libiteadmodule.so(all the c++ modules library):/usr/lib, /usr/local/lib
+
: libiteadmodule.so(all the c++ modules library):/usr/lib, /usr/local/lib
 
   
 
   
## How to Install
+
'''4. How to Install'''
 
   
 
   
### [[Download]] and install SDK in Debian
+
'''[[Download]] and install SDK in Debian'''
 +
 
 
In debian,you can [[download]] and install SDK with the fellowing command:
 
In debian,you can [[download]] and install SDK with the fellowing command:
  
Line 80: Line 82:
 
     $ iteadcompile -v
 
     $ iteadcompile -v
 
      
 
      
####Note:  
+
*Note: We assume that you have installed the make,build-essential and git-core packages in your debian system.
We assume that you have installed the make,build-essential and git-core packages in your debian system.
+
 
 +
'''Raspberry Rv2 GPIO Pin Number Map'''
  
### Raspberry Rv2 GPIO Pin Number Map
 
 
In IteadOS SDK, Raspberry Rv2 GPIO in number is identical to PCB Connector's number order. In others words,
 
In IteadOS SDK, Raspberry Rv2 GPIO in number is identical to PCB Connector's number order. In others words,
 
Connector P1 covers GPIO pin number 1-26 with P1's first pin corresponding to GPIO pin number 1. Specially,
 
Connector P1 covers GPIO pin number 1-26 with P1's first pin corresponding to GPIO pin number 1. Specially,
 
Connector P5 covers GPIO pin number 27-34 with P5's first pin corresponding to GPIO pin number 27.
 
Connector P5 covers GPIO pin number 27-34 with P5's first pin corresponding to GPIO pin number 27.
  
## How to Use
+
'''5. How to Use'''
  
### To use SDK like an Arduino sketch
+
'''To use SDK like an Arduino sketch'''
  
 
Create a new file named "led.ino" which contains the fellowing lines:
 
Create a new file named "led.ino" which contains the fellowing lines:
Line 120: Line 122:
 
     $ sudo ./LED
 
     $ sudo ./LED
  
#### Note: How to read debug information
+
'''Note: How to read debug information'''
 +
 
 
You DO NOT include the itead.h explicitly in you source file with suffex .ino. iteacompile will take care of  
 
You DO NOT include the itead.h explicitly in you source file with suffex .ino. iteacompile will take care of  
 
everything. That means you need to know the method you should use for locating your .ino sketch bugs. Actually,if you  
 
everything. That means you need to know the method you should use for locating your .ino sketch bugs. Actually,if you  
Line 129: Line 132:
 
bugs in your sketch,debug skills on C++ program will also helpful for solving your porblems.
 
bugs in your sketch,debug skills on C++ program will also helpful for solving your porblems.
  
### To use SDK in C program
+
'''To use SDK in C program'''
 
   
 
   
 
Create a new file named "led.c" which reads as follow:
 
Create a new file named "led.c" which reads as follow:
Line 170: Line 173:
 
hardware that it supports, wiki will also be updated accordingly.
 
hardware that it supports, wiki will also be updated accordingly.
 
   
 
   
## Plan for Next Stage
+
'''6. Plan for Next Stage'''
 
   
 
   
 
* Provide more API for user's application
 
* Provide more API for user's application
Line 176: Line 179:
 
   
 
   
 
   
 
   
## How to Contribute
+
'''7. How to Contribute'''
 
   
 
   
 
If you are interested and want to contribute to this [[project]], yet you
 
If you are interested and want to contribute to this [[project]], yet you
Line 190: Line 193:
 
3. Push
 
3. Push
 
   
 
   
## License GPL
+
'''License GPL'''
 
   
 
   
 
Copyright (C) 2013 Itead Studio
 
Copyright (C) 2013 Itead Studio
Line 197: Line 200:
 
   
 
   
 
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
</markdown>
 

Latest revision as of 09:10, 14 August 2014

1. What is ITEAD SDK?

IteadOS SDK offers junior developers with underlying hardware operation interfaces. It can simplify the hardware operation, which is a way for software engineers who are not familiar with the underlying hardware and junior developers to know about "Code World" and "Physical World"; it can also work as a rapid prototyping development tool.

IteadOS SDK supports Iteaduino Plus and ibox. For details of the hardware, you can refer to

<http://imall.iteadstudio.com/ibox.html/>
<http://imall.iteadstudio.com/iteaduino-plus-a20.html/>

The operating functions similar to Arduino offered by the SDK make it easier for those who have some understanding of Arduino. Moreover, with the SDK, Python users can operate the underlying hardware more easily.

The SDK can also be applied in others development boards which adopt the same chip (Allwinner A10/A20) such pcDuino, Marsboard, Cubieboard, etc.

2. What Can It Do?

At present, IteadOS SDK holds the following features making it possible for users to manipulate hardwares such as GPIO,UART,SPI,I2C etc. Based on those, users can control directly a mass of Shields(or Modules for a specific purpose) shch as GSM,1602LCD, OLED etc. Importantly, IteadOS SDK gets its popular with supporting more and more Shields and Hardware Platforms.

  • Support for simple GPIO operation
  • Support for GPIO 8-bit / 16-bit bus operations
  • Support for simple UART operations
  • Support for simple upper-layer time operation functions
  • Support for IIC bus operations
  • Support for SPI bus operations
  • Support for SSD1306-based IIC interfaced OLED screen operations
  • Support for LiquidCrystal module
  • Support for GPS module
  • Support for GSM(SIM900/SIM908) module including GPRS/GPS operations
  • More libraries are being developed


3. Dependency

  • Platform :Allwinner A10/A20 SoC
  • Kernel version: linux-sunxi-3.4
<https://github.com/linux-sunxi/linux-sunxi>
  • Kernel make configure file:
<https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a10_defconfig>
<https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a20_defconfig>
  • FEX file:
<https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a10.fex>
<https://github.com/iteadsw/SDK/blob/master/tools/iteaduino_plus_a20.fex>

Users of Iteaduino Plus A10/A20 can directly download and install the latest system img and SDK; users of other platforms are recommended to use make configure provided to compile 3.4 kernel and apply the fex file offered.

  • Dynamic Library(.so file) Catalogue:

Python users need to know the specific installation locations of the following dynamic libraries when they use the SDK:

libiteadc.so(core c language dynamic library):/usr/lib, /usr/local/lib
libiteadcpp.so(core c++ dynamic library):/usr/lib, /usr/local/lib
libiteadmodule.so(all the c++ modules library):/usr/lib, /usr/local/lib

4. How to Install

Download and install SDK in Debian

In debian,you can download and install SDK with the fellowing command:

   $ git clone https://github.com/iteadsw/SDK.git
   $ cd SDK
   $ make Iteaduino_Plus (or make Raspberry_Rv2 if you have a Raspberry Rv2 board)
   $ make
   $ sudo make install

To check the version of SDK installed,run this command in terminal:

   $ iteadcompile -v
   
  • Note: We assume that you have installed the make,build-essential and git-core packages in your debian system.

Raspberry Rv2 GPIO Pin Number Map

In IteadOS SDK, Raspberry Rv2 GPIO in number is identical to PCB Connector's number order. In others words, Connector P1 covers GPIO pin number 1-26 with P1's first pin corresponding to GPIO pin number 1. Specially, Connector P5 covers GPIO pin number 27-34 with P5's first pin corresponding to GPIO pin number 27.

5. How to Use

To use SDK like an Arduino sketch

Create a new file named "led.ino" which contains the fellowing lines:

   #include <stdio.h>
   
   #define STATUS_LED1 PIN_PH21

   void setup(void)
   {
       printf("setup begin\n");
       pinMode(STATUS_LED1,OUTPUT);
   }
   void loop(void)
   {
       digitalWrite(STATUS_LED1,HIGH);
       delay(1000);
       digitalWrite(STATUS_LED1,LOW);
       delay(1000);
   }


Then run command as below to compile led.ino:

   $ iteadcompile LED led.ino

You can run the LED program after compilation:

   $ sudo ./LED

Note: How to read debug information

You DO NOT include the itead.h explicitly in you source file with suffex .ino. iteacompile will take care of everything. That means you need to know the method you should use for locating your .ino sketch bugs. Actually,if you have a sketch named "Hello.ino" with a bug at level ERROR in line 25, you will get some ERROR informations telling the ERROR bug in "Hello.cpp" with line 26(25+1) when command "iteadcompile Hello Hello.ino" is executed. Why? iteacompile insert one line like _include "itead.h"_ in the head of your Hello.ino, change the suffex .ino to .cpp and compile(using g++) Hello.cpp to generate Hello which is executable binary file. When you encounter other bugs in your sketch,debug skills on C++ program will also helpful for solving your porblems.

To use SDK in C program

Create a new file named "led.c" which reads as follow:

   #include <itead.h>
   #include <stdio.h>

   #define STATUS_LED1 PIN_PH21

   void setup(void)
   {
       printf("setup begin\n");
       pinMode(STATUS_LED1,OUTPUT);
   }
   void loop(void)
   {
       digitalWrite(STATUS_LED1,HIGH);
       delay(1000);
       digitalWrite(STATUS_LED1,LOW);
       delay(1000);
   }
   int main(void)
   {
       setup();
       while(1)
       {
           loop();
       }
   }
   

Then run iteadcompile in the terminal

   $ iteadcomile LED led.c

You can run the LED program after compilation:

   $ sudo ./LED

For more details, please find in project wiki. With more and more hardware that it supports, wiki will also be updated accordingly.

6. Plan for Next Stage

  • Provide more API for user's application
  • Support more hardware platform, such as Raspberry PI


7. How to Contribute

If you are interested and want to contribute to this project, yet you are suffering from lack of the related hardware. It does not matter. Just write an E-mail to <info@iteadstudio.com>, attach your github username in it and say something about your experience on the related projects, Itead Studio will send you a hardware for free after approval.

After receiving Iteaduino Plus A10/A20, you only need to:

1. Fork this project 2. Coding 3. Push

License GPL

Copyright (C) 2013 Itead Studio

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.