Difference between revisions of "ITEAD SDK Instruction"
m (→How to Install) |
m (→How to Contribute) |
||
(7 intermediate revisions by the same user not shown) | |||
Line 21: | Line 21: | ||
==What Can It Do?== | ==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 41: | Line 39: | ||
* Support for GSM(SIM900/SIM908) module including GPRS/GPS operations | * Support for GSM(SIM900/SIM908) module including GPRS/GPS operations | ||
* More libraries are being developed | * More libraries are being developed | ||
− | |||
− | |||
− | |||
== Dependency== | == Dependency== | ||
− | |||
* Platform :Allwinner A10/A20 SoC | * Platform :Allwinner A10/A20 SoC | ||
Line 52: | Line 46: | ||
<https://github.com/linux-sunxi/linux-sunxi> | <https://github.com/linux-sunxi/linux-sunxi> | ||
* Kernel make configure | * Kernel make configure | ||
− | file:<https://github.com/ | + | file:<https://github.com/itead/SDK/blob/master/tools/iteaduino_plus_a10_defconfig> |
− | and <https://github.com/ | + | and <https://github.com/itead/SDK/blob/master/tools/iteaduino_plus_a20_defconfig> |
− | * FEX file:<https://github.com/ | + | * FEX file:<https://github.com/itead/SDK/blob/master/tools/iteaduino_plus_a10.fex> |
− | and <https://github.com/ | + | and <https://github.com/itead/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 61: | Line 55: | ||
use make configure provided to compile 3.4 kernel and apply the fex file | use make configure provided to compile 3.4 kernel and apply the fex file | ||
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 | ||
Line 72: | Line 64: | ||
* 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== | == How to Install== | ||
Line 79: | Line 70: | ||
In debian,you can [[download]] and install SDK with the fellowing command: | In debian,you can [[download]] and install SDK with the fellowing command: | ||
− | $ git clone https://github.com/ | + | $ git clone https://github.com/itead/SDK.git |
$ cd SDK | $ cd SDK | ||
$ make Iteaduino_Plus (or make Raspberry_Rv2 if you have a Raspberry Rv2 board) | $ make Iteaduino_Plus (or make Raspberry_Rv2 if you have a Raspberry Rv2 board) | ||
Line 100: | Line 91: | ||
== How to Use== | == How to Use== | ||
− | + | 1. 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 133: | Line 121: | ||
$ sudo ./LED | $ sudo ./LED | ||
− | + | 2. 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 142: | Line 131: | ||
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. | ||
− | + | 3. 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 182: | Line 171: | ||
For more details, please find in [[project]] wiki. With more and more | For more details, please find in [[project]] wiki. With more and more | ||
hardware that it supports, wiki will also be updated accordingly. | hardware that it supports, wiki will also be updated accordingly. | ||
− | |||
== Plan for Next Stage== | == Plan for Next Stage== | ||
− | |||
− | |||
* Provide more API for user's application | * Provide more API for user's application | ||
* Support more hardware platform, such as Raspberry PI | * Support more hardware platform, such as Raspberry PI | ||
− | + | ||
− | + | ||
− | + | ||
== How to Contribute== | == How to Contribute== | ||
Line 205: | Line 189: | ||
After receiving [[Iteaduino Plus A10/A20]], you only need to: | After receiving [[Iteaduino Plus A10/A20]], you only need to: | ||
− | 1. Fork this [[project]] on [https://github.com/ | + | 1. Fork this [[project]] on [https://github.com/itead/sdk GitHub] |
2. Coding | 2. Coding |
Latest revision as of 07:44, 12 November 2014
Contents
What Is It?
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/ and 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.
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
Dependency
- Platform :Allwinner A10/A20 SoC
- Kernel verson: linux-sunxi-3.4
<https://github.com/linux-sunxi/linux-sunxi>
- Kernel make configure
file:<https://github.com/itead/SDK/blob/master/tools/iteaduino_plus_a10_defconfig> and <https://github.com/itead/SDK/blob/master/tools/iteaduino_plus_a20_defconfig>
and <https://github.com/itead/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
How to Install
1. Download and install SDK in Debian In debian,you can download and install SDK with the fellowing command:
$ git clone https://github.com/itead/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
2. Note: We assume that you have installed the make,build-essential and git-core packages in your debian system.
3. 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.
How to Use
1. 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
2. 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.
3. 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.
Plan for Next Stage
- Provide more API for user's application
- Support more hardware platform, such as Raspberry PI
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 on GitHub
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.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.