Difference between revisions of "What can I do with IGEP COM PROTON"

From IGEP - ISEE Wiki

Jump to: navigation, search
m
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
__NOTOC__
+
{{Table/IGEP Technology Devices
 
+
|Tech_Family={{#lst:Template:Links|IGEP_COM_PROTON_Tech_Family}}
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
+
|Tech_ID={{#lst:Template:Links|IGEP_COM_PROTON_Tech_ID}}
|-
 
| bgcolor="#cccccc" |'''What can I do with IGEP0032'''
 
|-
 
| If you have '''successfully completed the [[Getting Started with IGEP0032 board|first chapter of this guide]]''', you can continue with this tutorial guide about IGEP0032.
 
|}
 
 
 
 
 
{{Navigation/IGEP Technology Guides
 
 
|Name={{#lst:Template:Links|IGEP_COM_PROTON_Name}}
 
|Name={{#lst:Template:Links|IGEP_COM_PROTON_Name}}
 
|Image={{#lst:Template:Links|IGEP_COM_PROTON_Image}}
 
|Image={{#lst:Template:Links|IGEP_COM_PROTON_Image}}
 
|ISEE_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_MainPage}}
 
|ISEE_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_MainPage}}
 
|ISEE_Hardware={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_Hardware}}
 
|ISEE_Hardware={{#lst:Template:Links|IGEP_COM_PROTON_ISEE_Hardware}}
|Community_MainPage={{#lst:Template:Links|IGEP_COM_PROTON_Community_MainPage}}
 
|Community_Guides_1={{#lst:Template:Links|IGEP_COM_PROTON_Community_Guides_1}}
 
|Community_Guides_2={{#lst:Template:Links|IGEP_COM_PROTON_Community_Guides_2}}
 
 
}}
 
}}
  
  
{| cellspacing="0" cellpadding="5" border="1" align="center" style="text-align: left;"
+
= Overview =
|-
 
| bgcolor="#cccccc" colspan="3" | '''Overview'''
 
|-
 
| [[Image:Igep0032_side.png|250px|center|link=Category:IGEP0032]]
 
|-
 
|'''1) [[What can I do with IGEP0032#Booting and setting up|Booting up IGEP0032]]'''
 
|-
 
|'''2) [[What can I do with IGEP0032#Basic instructions|Basic instructions]]'''
 
|-
 
|'''3) [[What can I do with IGEP0032#Send a file between a PC and IGEP0032|Send a file between a PC and IGEP0032]]'''
 
|-
 
|'''4) [[What can I do with IGEP0032#Mount a MicroSD card|Mount a MicroSD card]]'''
 
|-
 
|}
 
 
 
 
 
=== Booting and setting up ===
 
----
 
 
 
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
 
|-
 
| bgcolor="#cccccc" |'''Pre-installed software'''
 
|-
 
|By default, '''all brand new IGEP Processor Boards have a firmware installed''' on its flash memory.
 
 
 
That means that if you power up your board it will run a Linux distribution provided and installed by ISEE.
 
|}
 
 
 
 
 
This distribution consists on a '''minimal Linux-based distribution''' with a lite X Window System and GNOME Mobile based applications created with '''Poky Platform Builder'''.
 
 
 
In the previous chapter of this tutorial, we have booted IGEP0032 with its pre-installed software.
 
 
 
Once the board has booted up, you can log in into IGEP0032 via many interfaces. In the previous chapter of this tutorial we have used the USB Ethernet Gadget and the Wifi interface, but you can use many other interfaces when connecting IGEP0032 to an IGEP Expansion Board.
 
 
 
'''Boot priority'''
 
 
 
In fact, IGEP0032 can boot from many other devices (listed by priority):
 
 
 
# from USB
 
# from UART3
 
# from a MMC/MicroSD card
 
# from OneNAND memory
 
 
 
 
 
As we haven't set any other boot device rather than the oneNAND (the IGEP0032 flash memory) the system boots from it.
 
 
 
 
 
But, as '''the MicroSD card has an upper priority than the flash''', if you plug a MicroSD card (with the right configuration on it) to the MicroSD card reader, IGEP0032 will boot from it and won't boot from the flash memory.
 
 
 
 
 
Now, We are going to use this functionality to update your pre-installed software.
 
 
 
 
 
=== Basic instructions ===
 
----
 
 
 
{| cellspacing="0" cellpadding="5" border="1" align="center" width="100%" style="text-align: left;"
 
|-
 
| bgcolor="#cccccc" |'''Overview'''
 
|-
 
| Learn some Bash basic instructions in Linux (for newbies).
 
 
1) Create, edit, move and delete files
 
 
 
2) Run a simple script
 
|}
 
 
 
IGEP0032 is '''compatible with many Linux distributions'''. In this tutorial we are using Poky Linux, which is the pre-installed software from ISEE.
 
 
 
In case you are not familiar with Bash instructions, here comes some basic instructions to help you startup with the board.
 
 
 
First of all, '''log in to IGEP0032''' with a console from your host PC (via serial port or via SSH), as shown previous sections in this article. Remember the default settings:
 
 
 
login: root
 
password: (none: press return)
 
 
 
Once you are logged in IGEP0030, run the following commands:
 
 
 
cd /
 
ls
 
 
 
You have moved to the root directory, that is "/".
 
The instruction "ls" lists all the existing files and directories in the current "path".
 
 
 
Now let's go to the directory /home/root/ with:
 
 
 
cd /home/root/
 
 
 
You can always check at which directory you are with the instruction:
 
 
 
pwd
 
 
 
Most instructions include a 'help' option that can be accessed by inserting the parameter --help. Check out the help page of 'echo' instruction, for example:
 
 
 
echo --help
 
 
 
You can try the instruction by yourself and type:
 
 
 
echo Hello
 
 
 
You have sent the text "Hello" to the standard output, that is the console you are interacting with.
 
 
 
But you can change and 'redirect' the output by using the character '>' :
 
 
 
echo Hello world! > /home/root/name.file
 
 
 
Now notice you have redirected the output to a file called name.file :
 
 
 
ls
 
 
 
You can append any file using '>>' instead of '>'.
 
You can print the content of the file to the standard output:
 
 
 
cat /home/root/name.file
 
 
 
'''Building a basic script'''
 
 
 
You can create a script that can run any instruction you want to use in Bash. The main advantage is that you do not have to compile the code, as is auto-interpereted by the system.
 
 
 
We are going to create a basic 'Hello World' script that is going to run the same command you have actually used before:
 
 
 
echo "echo > Hello world!" > /home/root/example.sh
 
cat example.sh
 
 
 
Now you have created a file called example.sh, but by default it has no execute permissions (x):
 
 
 
ls -la
 
 
 
We are going to add permission to the file by:
 
 
 
chmod a+x example.sh
 
ls -la
 
 
 
Now you can run the script:
 
 
 
./example.sh
 
 
 
You can edit this file (example.sh) with 'vi', the pre-installed text editor in IGEP0032.
 
 
 
vi example.sh
 
 
 
Press ESC and:
 
 
 
* :q! , to exit without saving
 
* :w , to save
 
* :wq , to quit and save
 
* i , to insert text
 
 
 
'''Other simple & useful instructions'''
 
 
 
* mkdir
 
* rmdir
 
* find
 
* grep
 
 
 
You can stop any instruction by pressing CTRL+C
 
 
 
 
 
=== Send a file between a PC and IGEP0032 ===
 
----
 
 
 
In a Linux host PC, you can '''use SCP (secure copy) via SSH to transfer files''' between IGEP0032 and your host PC.
 
 
 
We are going to use the default settings in IGEP0032 for USB Ethernet Gadget.
 
 
 
''Note: This section is assuming you have successfully followed the previous chapters in this tutorial''
 
 
 
Now let's transfer a file called original.file from your host PC to the directory /home/root/ in your IGEP0032.
 
 
 
In your Host PC open Terminal and type:
 
 
 
scp -r original.file root@<destination_IP>:/home/root/destination.file
 
 
 
where:
 
 
 
*destination_IP: 192.168.7.2 via USB Ethernet Gadget, 192.168.6.1 via Wifi
 
 
 
 
You can repeat the process from the IGEP0032 console, and transfer a file from IGEP0032 to your Host PC.
 
 
 
 
 
=== Mount a MicroSD card ===
 
----
 
  
(Work in progress section!)
+
This is the 2/3 chapter of the Getting Started with IGEP COM PROTON Tutorial Guide.
  
==== Access to Generic FAT32 microSD  ====
+
In this second chapter, we will learn some basics tasks. Upon completion, you will be ready to continue with chapter 3/3 that explains more advanced tasks.
  
mount -t vfat /dev/mmcblk0 /mnt/tmp/
 
  
==== Access to Generic USB Flash disk  ====
+
__TOC__
  
mount -t vfat /dev/sda1 /mnt/tmp/
 
  
==== Safety Remove microSD  ====
+
= What can I do =
 +
You must logged in the board.
 +
== Handle the gpio-LED's ==
 +
The board has three leds available that can be controlled. In its simplest form, you can control of LEDs from
 +
userspace. LEDs appear in /sys/class/leds/ and you can turn on and off with following commands:
  
umount /mnt/tmp
+
<pre>$ echo 1 > /sys/devices/platform/leds-gpio/leds/d242\:green/brightness
 +
$ echo 1 > /sys/devices/platform/leds-gpio/leds/d441\:green/brightness
 +
$ echo 1 > /sys/devices/platform/leds-gpio/leds/d442\:green/brightness</pre>
  
==== Access to IGEP demo microSD  ====
+
A detailed guide on how use GPIO-LEDS can be found by following this link: [[How to handle the gpio-LED]]
  
mount -t jffs2 /dev/mmcblk0 /mnt/tmp/
+
== How to use the SD card ==
  
 +
You can connect a micro SD card for storage. After plugin the SD card the kernel should detect the card and automount in /media directory.
  
{{Navigation/IGEP Technology Guides/What can I do/Ending|device=IGEP COM PROTON}}
+
{{Template:Navigation/IGEP Technology Guides/What can I do/Ending}}
  
[[Category:IGEP0032]]
+
[[Category:IGEP Technology Devices Guides]]
[[Category:Tutorials]]
 
[[Category:Work in progress]]
 

Latest revision as of 12:18, 29 January 2013


Overview

This is the 2/3 chapter of the Getting Started with IGEP COM PROTON Tutorial Guide.

In this second chapter, we will learn some basics tasks. Upon completion, you will be ready to continue with chapter 3/3 that explains more advanced tasks.



What can I do

You must logged in the board.

Handle the gpio-LED's

The board has three leds available that can be controlled. In its simplest form, you can control of LEDs from userspace. LEDs appear in /sys/class/leds/ and you can turn on and off with following commands:

$ echo 1 > /sys/devices/platform/leds-gpio/leds/d242\:green/brightness
$ echo 1 > /sys/devices/platform/leds-gpio/leds/d441\:green/brightness
$ echo 1 > /sys/devices/platform/leds-gpio/leds/d442\:green/brightness

A detailed guide on how use GPIO-LEDS can be found by following this link: How to handle the gpio-LED

How to use the SD card

You can connect a micro SD card for storage. After plugin the SD card the kernel should detect the card and automount in /media directory.



You have successfully completed this chapter of the guide.


Continue this tutorial guide: 3/3 - Start developing under IGEP Technology
Igep forum.png If you have any question, don't ask to ask at the IGEP Community Forum or the IGEP Community Chat Irc.png