Difference between revisions of "User:Pau pajuelo"
From IGEP - ISEE Wiki
m |
m |
||
Line 143: | Line 143: | ||
= How to develop with Eclipse IDE under IGEP technology (under construction) = | = How to develop with Eclipse IDE under IGEP technology (under construction) = | ||
+ | |||
+ | use eclipse ide examples | ||
= Getting started with IGEPv2 Expansion<br> = | = Getting started with IGEPv2 Expansion<br> = |
Revision as of 18:15, 20 August 2012
TODO:
Update peripheral tutorials
Categorize new tutorials
Upgrade ethernet gadget tutorial for new IGEP firmware and VM
Finish tutorials below
NOTES: Qt, Codeblocks and Eclipse are linked to main page:
Eclipse -> How to develop under Eclipse (copy manual) (refers at beginning VM and option to install Eclipse(under construction))CONFIGURE REMOTE CONNECTION
Upgrade ethernet gadget how to
How to setup a cross compiler(link qt creator and Eclipse tutorial)
igep.ini table
Upgrade IGEP Technology Devices Guides
How to install Eclipse with IGEP support (under construction)
Overview
Eclipse is a multi-language software development environment comprising an integrated development environment (IDE) and an extensible plug-in system. It is written mostly in Java. It can be used to develop applications in Java and, by means of various plug-ins, other programming languages including Ada, C, C++, COBOL, Haskell, Perl, PHP, Python, R, Ruby (including Ruby on Rails framework), Scala, Clojure, Groovy, Android and Scheme.
Eclipse is very popular among programmers because you can extend its functionalities using plugins. One of these interesting plugins is the Yocto Eclipse IDE Plug-in.
The Yocto Eclipse IDE Plug-in integrates the functionality of the Yocto Project Application Development Toolkit (ADT) and toolchain into the Eclipse IDE. This allows its users direct access to deploy, build, run and debug your own project. More information about Eclipse software here.
NOTE: If you use IGEP SDK Virtual Machine you don't need to follow this guide, go directly to How to develop with Eclipse IDE under IGEP technology
Requirements
- PC with Linux, for example Linux Mint distribution.
- IGEP YOCTO Toolchain SDK
- Eclipse IDE for C/C++ Linux Developers
- Yocto Eclipse IDE Plug-in
This guide was tested under Linux Mint Lisa 12, Eclipse 3.7 Indigo and Yocto IDE Plug-in 1.2 |
Install
Install Java Runtime Environment
Eclipse IDE has Java dependencies. Java Runtime Environment should be installed, but if you don't have it type next command:
sudo apt-get install sun-java6-bin sun-java6-jre
Install Eclipse IDE
Download Eclipse 3.7 Indigo for C/C++ Linux Developers, choose 32 or 64 bits version depends your machine.
Maybe you want to install build essential to test programs in your Host computer. Install it using the next command:
sudo apt-get install build-essential
Extract Eclipse binaries:
jdoe@ubuntu ~/Downloads $ tar xzf eclipse-linuxtools-indigo-incubation-linux-gtk.tar.gz -C ~/
Install Yocto SDK
Configure
Open Eclipse IDE
Eclipse binaries are located in ~/eclipse directory, follow the next instructions to open it:
Click to enlarge image
Update Eclipse IDE
Follow the next instructions to update it:
Click to enlarge image
Install Linux tools
Yocto Eclipse IDE Plug-in has Linux tools plugin dependencies, install this plugin:
Click to enlarge image
Install Yocto Eclipse IDE Plug-in
'Click to enlarge image'
- Image 3, at location field copy: http://downloads.yoctoproject.org/releases/eclipse-plugin/1.2/
Configure Yocto Eclipse IDE Plug-in
Set up a connection between IGEP and Host computer (under construcion)
How to develop with Eclipse IDE under IGEP technology (under construction)
use eclipse ide examples
Getting started with IGEPv2 Expansion
|
|
Contents
- 1 TODO:
- 2 How to install Eclipse with IGEP support (under construction)
- 3 How to develop with Eclipse IDE under IGEP technology (under construction)
- 4 Getting started with IGEPv2 Expansion
- 5 Overview
- 6 Requirements
- 7 Getting started
- 8 What can i do with igepv2 expansion
- 9 Overview
- 10 What can I do
Overview
This is the 1/3 chapter of IGEPv2 Expansion Tutorial Guide.
In this first chapter, we will learn how to connect some expansion peripherals.
Requirements
In these tutorials we are going to need the following components :
- IGEPv2, +5V DC power supply, Ethernet cable and a PC with Linux or Windows.
- Powertrip 4.3" or Seiko 7" screen if you need a touch screen.
- DB9 connector and USB serial converter to follow serial communication tutorial
- 4 pin connector for CAN Bus with another IGEPv2 and Expansion to follow CAN Bus communication tutorial
- SIM card with an antenna to follow Telit modem tutorial
- Composite video cable, composite video output peripheral (PAL or NTSC) and a screen to follow TVP5151 tutorial
Getting started
Connect IGEPv2 Expansion with IGEPv2 Board
Basic
The IGEPv2 Expansion connects to the IGEPv2 Board through J990, JA41, JA42, JC30 and J960 connectors. Some IGEPv2 Expansion may include three jumpers, you should remove it because they are designed for test and lab purposes. Just take a look on the figure below to mount it:
|
|
TFT and Touchscreen
Basic
IGEPv2 Expansion integrates a LCD backlight driver (Texas instruments TPS61081) and touch screen controller (Texas instruments TSC2046), 4-wire touch screen controller which supports a low-voltage I/O interface which can be directly connected to a SEIKO 7” LCD or to a POWERTIP 4.3” LCD. Use J301 connector for POWERTRIP 4.3" or use J302, J303 and J304 connector for SEIKO 7".Know more
IGEPv2 Expansion integrates LCD backlight driver (TPS61081) and touch screen controller (TSC2046), a 4-wire touch screen controller which supports a low voltage I/O interface from 1.5V to 5.25V.
Serial port
BasicIGEPv2 Expansion integrates a DB9 RS232 connector. Plug a DB9 cable.
Know more
This peripheral (UART 3) can be used to debug system using kernel traces, getting a remote prompt, etc.
VGA monitor
Basic
IGEPv2 Expansion integrates a VGA connector, the output VGA signal is equal to HDMI connector. Plug a monitor with VGA input.
Know more
This output is controled by ADV7125KSTZ140 Integrated Circuit.
CAN bus
Basic
IGEPv2 Expansion integrates a CAN peripheral. Connect any CAN bus device or network to the CAN bus connector (J703).Know more
This output is controled by MICROCHIP MCP2515. J703 is a 3.5 mm pitch terminal blocks 4 Positions:
Signal Name | Pin # |
Description |
VDD_CAN | J703:1 | Supply Voltage (+5V DC) |
CANL | J703:2 | CAN Low-Level Voltage I/O |
GND | J703:3 | Ground |
CANH | J703:4 | CAN High-Level Voltage I/O |
GSM/GPRS modem
Basic
GSM-GPRS antenna (highly recommended) | SIM card reader |
IGEPv2 Expansion integrates a GSM/GPRS modem to make phone calls or to send SMS or to write and read data from it, etc.
Know more Modem chip Telit GE865 is a small GSM/GPRS Ball-Grid-Array BGA module with next main features:
- Quad-band EGSM 850 / 900 / 1800 / 1900 MHz
- Power consumption (typical values)
- Power off: ‹ 62 uA
- Idle (registered, power saving): 1.6 mA @ DRX=9
Composite Video Decoder
Basic
IGEPv2 Expansion integrates two composite video connectors to decode analog input signal. Plug some peripheral with video composite output.Know more
Analog input is decoded by TVP5151.
----
You have successfully completed this chapter of the guide.
|
If you have any question, don't ask to ask at the IGEP Community Forum or the IGEP Community Chat |
|
|
What can i do with igepv2 expansion
|
|
Overview
This is the 2/3 chapter of IGEPv2 Expansion Tutorial Guide.
We will learn some basic tasks such add support to IGEPv2 Expansion, control some peripherals, etc.
What can I do
How to use Serial communication (DB9 connector)
Basic
RS232 link for UART 3 (/dev/ttyO2) can be obtained through J502 DB9 connector. You can use PuTTy to get a shell prompt to IGEP:
- Power up IGEPv2
- Open PuTTy.
- Choose Serial line. If you are running PuTTy on Windows, the Serial line will be like (COM1 or COM2 or COM3, etc.). If you are running PuTTy on Ubuntu, the Serial line will be like (/dev/ttyS0 or /dev/ttyS1 or /dev/ttyS3, etc.). Note that if you are using a USB->Serial converter, the Serial line will be like /dev/ttyUSB0
- Configure Speed to 115200
- Select Serial Connection type
- Press on Open button
- You will successfully started the console.
Know more
Read this tutorial to learn about UARTs.
How to use TFT and Touchscreen
Seiko a Powertip touch screens are not supported by default in IGEPv2. Use the following steps for it:
- Log into IGEPv2 (via SSH, as shown in the previous chapter), and run the following commands:
ssh root@192.168.5.1 mkdir /tmp/temp mount -t jffs2 /dev/mtdblock1 /tmp/temp vi /tmp/temp/igep.ini
- In Seiko screen add the following line:
omapdss.def_disp=lcd-70
- In Powertip screen add the following line:
omapdss.def_disp=lcd-43
- Save changes and reboot your IGEP Device to finish it.
How to use Telit Modem
Basic
Telit modem is not supported by default in IGEPv2. Use the following steps for it:
- Log into IGEPv2 (via SSH, as shown in the previous chapter), and run the following commands:
ssh root@192.168.5.1 mkdir /tmp/temp mount -t jffs2 /dev/mtdblock1 /tmp/temp vi /tmp/temp/igep.ini
- Add the following line (press i to insert content):
buddy.modem=yes
- Save changes (ESC -> :wq -> Enter) and reboot your IGEP Device
- Power up the modem. You can power off using again these commands:
echo 0 > /sys/class/gpio/gpio140/value echo 1 > /sys/class/gpio/gpio141/value sleep 1 echo 0 > /sys/class/gpio/gpio141/value
- Once the modem is on (led D401, near SIM card reader, is blinking now), you can interact with it via UART 2. You can use Microcom to comunicate with it from the serial debug console:
microcom -s 115200 /dev/ttyO1
- To check the modem status use the command:
at
- Answer should be OK.
- Now unlock it by inserting your SIM card PIN number. Use the command:
at+cpin=<PIN>
- If you correctly inserted the PIN number, the answer should be OK. If you fail more than 3 times, your SIM card will lock and you will have to insert PUK number.
- Now you are ready to use the GSM/GPS modem.
Examples
If you successfully followed the the previous instructions, you are ready to test the GSM/GPRS modem. Here are some examples:
You can check the complete list of AT commands at the Official manufacturer Software User Guide.
Test received signal strength
Use the instruction:
at+csq
The answer should be: +CSQ: X,0, where X is the signal strenght. For example 12 is poor and 18 is good. If the answer is +CSQ:99,99 you should check your coverage or use an antenna
Making a phone call
Use the instruction, replace number_to_call with your number:
atd number_to_call
Press any key to end call
NOTE: If "NO CARRIER" message appears, check your coverage or use an antenna.
Sending a SMS
First of all, you need to configure the SMS format type. Telit GE865 GSM/GPRS supports PDU format and Text format. We use Text format. Type the following command:
AT+CMGF=1
There are so many ways in this modem to send a message. Here you have a simple example. Use the instruction, replace destination_number with your number:
at+cmgs= destination_number > insert here your text message
When you are ready to send your message use Ctrl+Z to send it.
If you want to cancel or restart the message press ESC.
NOTE: If "NO CARRIER" message appears, check your coverage or use an antenna.
NOTE: Don't use special characters in SMS text message like <`´'">.
Know more
Here you have the official manuals from the manufacturer's webpage:
How to use TVP5151 Video Decoder
Basic
Use the following steps to capture analog video:
- Connect a video composite input to J501 connector from IGEPv2 Expansion (near CAN Bus)
- Connect a screen, for example HDMI monitor.
- Log into IGEPv2 (via SSH, as shown in the previous chapter), and run the following commands:
ssh root@192.168.5.1
- Now you have a remote igep terminal
- Refresh repositories and accept it.
zypper ref
- Install video4linux2 plugin
zypper in gst-plugins-good-video4linux2
- Load OMAP ISP kernel module
modprobe omap3-isp
- Configure ISP, for PAL resulution use 720x576 for NTSC resolution use 720x480:
media-ctl -r -l '"tvp5150 2-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]' media-ctl -v --set-format '"tvp5150 2-005c":0 [UYVY 720x480]' media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY 720x480]' media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY 720x480]'
- Export display
export DISPLAY=:0.0
- Launch gstreamer
gst-launch-0.10 -v v4l2src device=/dev/video2 queue-size=8 ! video/x-raw-yuv,format=\(fourcc\)UYVY,width=720,height=480 ! ffmpegcolorspace ! autovideosink
- Now you can see in your IGEP screen a result similar like this
Know more
You can use other programs like yavta
How to use EEPROM
Basic
The IGEP0022 expansion board provides an AT24C01B serial EEPROM memory which is connected to the OMAP via I2C (register 50).
Use i2c-tools to manage it:
i2cget <bus> <chip> <register> i2cset <bus> <chip> <register> <value>
For example, the following writes the value 0x22 to register 0x10 of device 0x50 on i2c bus 2:
i2cset -f -y 2 0x50 0x10 0x22 i2cget -f -y 2 0x50 0x10
Know more
See also: i2dump(8), i2cget(8) and i2cset(8) man page
How to use CAN bus (under construction)
You have to connect the two boards like this:
IGEPv2 1 IGEPv2 2 .--- .--- | 1 |-X X-| 1 | | 2 |------------------| 2 | | 3 |------------------| 3 | | 4 |------------------| 4 | .--- .---
If this is your first time accessing CAN bus, check J702 jumper is not connected before follow this tutorial. If you don't have this jumper, don't worry because its function is only for testing.
Now you can set up the interface (on all boards when using multiple IGEPv2 EXPANSION connected to a CAN network simultaneously):
/bin/ip link set can0 up type can bitrate 125000
If you want to receive CAN data, use:
candump can0
If you want to send CAN data, use:
cansend can0 -i 0x123 0xaa 0xbb 0xcc 0xdd
On the receiver side, you must see the following messages:
can0 123 [4] aa bb cc dd
Switch roles and try it again
----
You have successfully completed this chapter of the guide.
|
If you have any question, don't ask to ask at the IGEP Community Forum or the IGEP Community Chat |