eSOM335x SoftwareManual
eSOM335x SoftwareManual
Software Manual
eSOM335x Software Development
Contents
Introduction.............................................................................................................................. 2
Features ................................................................................................................................ 2
Programming with Visual Studio ............................................................................................ 3
Create new project ............................................................................................................... 4
Deploy project to Device ..................................................................................................... 5
Sample Codes .......................................................................................................................... 8
Create GPIO Project .......................................................................................................... 10
Create ADC Project ........................................................................................................... 13
Adding folder paths to the OS ............................................................................................... 14
Autorun .................................................................................................................................. 15
1
eSOM335x Software Development
Introduction
The eSOM335x is an ARM-based computer module with AM3358BZCZA100 ARM Cortex-
A8 microprocessor family from Texas Instrument. RAM and storage memories was designed
modular. There are 128MB/256MB/1GB DDR3L versions for RAM module. (default RAM is
512MB). The eMMC modules exist in 2G/4G/6G/8G/16GB/32GB versions. (Default eMMC is
8GB)
The eSOM335x can boot a real-time, small foot-print Windows CE very quickly. OS images
are customized to enable users on rapid application development without any OS challenging.
Users are free to choose the video output and can change their LCD without need to OS
customization. In addition, users can configure their boot setting such as their logo and boot
progress bar easily. Many device drivers like 4G module, Camera, CAN, Touch are integrated in
OS image and users can add them to their projects safely. Users can develop applications in Visual
Studio 2008 and LabVIEW for eSOM335x. Many sample codes are provided for software
developer to access to eSOM335x peripherals and accelerates time-to-market procedures.
The eSOM335x targets a wide range of applications, including: Medical Devices, PLC,
Industrial Automation, HMIs, Entertainment system, POS, Data Acquisition, Gaming and much
more.
Features
- Texas Instrument AM3358BZCZA100 ARM Cortex-A8 Up to 1GHz Processor
- Replaceable and optional modular memories
- Support HDMI, TFT and LVDS as Video Output
- Rich interface through DDR3-SODIMM 204 pin connector
- On-board Gigabit Ethernet PHY, customizable Up to 2 Ethernet port
- Support 4G Module
- Support Camera
- Ready to Run WIN CE7 with quick launching
- Easy configuration OS parameters and driver settings
- Open-source WIN CE7 OS
- Rapid software development with many sample codes
2
eSOM335x Software Development
3
eSOM335x Software Development
Click OK, in the next window select Windows CE as Target platform and then click OK.
Your project is created with empty form.
4
eSOM335x Software Development
- In this form you can place your controls from toolbox section, in our case two label is in
center of form.
5
eSOM335x Software Development
- Press Device Options , with this action, in opened window click on Devices and select
SDK1.
Click on Properties button, a new window appears, click on Configure button in this
window. Select Use specific IP address check Box and type device IP as shown in
following figure. Then click OK.
6
eSOM335x Software Development
- If click on Start Debugging button then click on Deploy button on opened window,
your project run immediately on your device.
- If anything is OK, your application appears in device, below picture shows an example
that run in eSOM335x
- A folder in your device is created for store your application data temporarily in
Windows/Programs folder. After restarting this folder is deleted. You can copy
application folder to eMMC or uSD drive to maintain in your device after restarting.
7
eSOM335x Software Development
Sample Codes
Many source codes are provided for rapid application development. The table below details
the libraries currently available for Visual C# programming:
these files are accessible through network drive URL after buy eSOM335x. In addition,
sample codes for Codeplex are listed in below picture:
8
eSOM335x Software Development
For example, if open GPIOtest project with VS2008, you can see project with a form
designed for it as shown in the following figure:
If deploy this application on your device, immediately GPIOtest program run, and its form
appeared in your device:
9
eSOM335x Software Development
Note: GPIO3[21] is reserved for sound chip. GPIO3[17] and GPIO3[18] is used as touch panel
interrupt and reset. GPIO0[18] and GPIO0[19] are also reserved.
For example, a new helloBlinky project is created for using GPIO1_16 as output and GPIO1_
18 as input. You can access to GPIO pins with GPIO class. You can add GPIO.cs class file to
your project with right click on your project and click on Add>Existing Item as shown in below
figure:
10
eSOM335x Software Development
In addition, you must click Add References and in Browse tab in opened window, select
OpenNETCF.IO and add it to your project. Methods of GPIO class list in below table:
Method Description
SetDirection(GPIOPin pin, Set Direction of pin
Direction dir)
Direction can be Direction.Output or
Direction.Input
gpio.SetBit(GPIOPin pin) Set Output pin HIGH
gpio.ClearBit(GPIOPin pin) Set Output pin LOW
gpio.GetBit(GPIOPin pin) Read Input PIN
11
eSOM335x Software Development
namespace helloBlinky
{
public partial class Form1 : Form
{
const GPIOPin LED = GPIOPin.GPIO1_16;
const GPIOPin KEY = GPIOPin.GPIO1_18;
GPIO gpio;
bool ledStatus;
public Form1()
{
InitializeComponent();
gpio = new GPIO();
gpio.SetDirection(LED, Direction.Output);
gpio.SetDirection(KEY, Direction.Input);
gpio.ClearBit(LED);
ledStatus = true;
timer1.Enabled = true;
}
else
{
gpio.ClearBit(LED);
ledStatus = true;
ledBtn.Text = "LED ON";
}
}
12
eSOM335x Software Development
For handle with ADC channel, a class library is provided as ADC.cs. following table lists
methods of this library. An example for using this class is explained in the following.
Method Description
Scan Scan and convert an ADC channel
UInt32 ReadChannel(ADCChannel channel) Reads an ADC channel result and return its Value.
IsCh0_3Available Test if ADC channel 0-3 are available
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using BEAGLEBONE.ADC;
namespace simpleADC
{
public partial class Form1 : Form
{
ADC adc;
public Form1()
{
InitializeComponent();
adc = new ADC();
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
adc.Scan = ADC.ADCChannel.AN0;
int adcVal = (int)adc.ReadChannel(ADC.ADCChannel.AN0);
adcValLabel.Text = adcVal.ToString();
}
}
}
13
eSOM335x Software Development
14
eSOM335x Software Development
Autorun
There are multiple ways to autorun an application after device power on:
- AutoLaunchProgram : If you want to launch your application after OS booting, you must go
to Windows folder on your device OS and run AutoLaunchProgram.exe
In this window click on Browse button and select application file, therefore after restarting
your device, selected application automatically launches Immediately after OS boot and Win CE
desktop appears.
- Registry Editor: another way to autorun an application is from Registry Editor. Run regedit in
Windows folder and click on HKEY_LOCAL_MACHINE then init as shown in following
figure:
15
eSOM335x Software Development
In this window exist Launch and Depend registry followed by a number like Launch99 and
Depend99. In Launch registry, users can write application name, for example if click on
Launch99, in opened dialog, AutoLaunch.exe is written on Value data field, that means
AutoLaunch application run after boot, but OS firstly check its dependency in Depend99.
Open Depend99, as shown in following figure, some text is written in Value data field imply
that before AutoLaunch run, Launch20, Launch30 and launch50 must be running. Launch20
refers to drivers library, Launch30 refers to gwes.dll (graphic diver) and Launch50 refers to
explorer.exe.
Windows check init registry while booting and run launch numbers respectively due to their
numbers from low to high. Users can add or edit Launch and Depends due to their needs. In this
case (Launch99) OS run AutoLaunch.exe after windows explorer and desktop appears. Config of
this application is in ethDebugAutoRUN.reg file as shown in below figure.
16
eSOM335x Software Development
Users can add any other Process in Registry Editor in Startup directory, follow these instructions
to add a process:
- right click on this page and click on New ->String Value
- Rename it to Process1
- Click on Process1 and write your application name in Value data field. (Note that your
application must be in Windows Path to OS can recognize it.)
- Again, Right click and click on New->DWORD Value
- Rename it to Process1Delay then double click on it and set time delay for running
application in Value data.
- After restart, your application appears after a delay time.
17
eSOM335x Software Development
In addition to the edit AutoLaunch.exe and startup configuration, users can edit Launch99
directly. Double click on it and write your application name in Value data field.
- For remove Windows explorer environment, users can edit dependency in Depend99 with
delete number 32 that run process32(explorer.exe). In another way, users can replace their
application name instead of explorer.exe in Launch50, in this manner, application run
immediately after windows launch and Windows shell do not appear. If you want to appear
Windows shell, you should burn windows again with old NK.
18