0% found this document useful (0 votes)
72 views19 pages

eSOM335x SoftwareManual

This document provides information about software development for the eSOM335x module using Visual Studio. It includes the following: 1) An introduction to the eSOM335x module and its features like ARM processor, modular memory, video outputs, Ethernet ports, and integrated device drivers. 2) Instructions for creating projects in Visual Studio, deploying them to the device over Ethernet, and configuring device options. 3) A section on sample code projects provided for tasks like GPIO and ADC interfacing to accelerate development. 4) Guidance on adding folder paths to the operating system and enabling autorun of applications.

Uploaded by

Abolfazl Saeedie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views19 pages

eSOM335x SoftwareManual

This document provides information about software development for the eSOM335x module using Visual Studio. It includes the following: 1) An introduction to the eSOM335x module and its features like ARM processor, modular memory, video outputs, Ethernet ports, and integrated device drivers. 2) Instructions for creating projects in Visual Studio, deploying them to the device over Ethernet, and configuring device options. 3) A section on sample code projects provided for tasks like GPIO and ADC interfacing to accelerate development. 4) Guidance on adding folder paths to the operating system and enabling autorun of applications.

Uploaded by

Abolfazl Saeedie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

eSOM335x

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

Programming with Visual Studio


Visual Studio 2008 is the version of Microsoft’s popular IDE that also supports Windows
Embedded Compact 7. WEC 7 (Compact 7) includes a suite of development tools that help you
design, build, and deploy a Windows Embedded CE–based OS to a target hardware device. These
tools are designed to make the development process straightforward as well as flexible. Users can
interface with eSOM335x using an ethernet cable, and program application in Visual studio 2008,
then deploy into their devices. Many sample codes are provided, and they can use them for rapid
programming. These codes are simple and self-explaining. In the following, we describe how to
program eSOM335x in step-by-step routine.

- Install visual studio 2008.


- Install eSOM335x_WEC7_SDK.msi ( This file existed in SDK Folder on eSOM335x
network drive accessible after buy this product.)
- Plug ethernet cable to development board and PC, then PC identify your new ethernet
connection.
- Configure IP addresses in device and PC relatively. In PC side assign Default gateway to
device IP, and in device side assign Default gateway to device IP.

PC side eSOM335x side

3
eSOM335x Software Development

Create new project


- Open Visual Studio 2008 and click create new project through File>New>Project. In
Opened window set Project Type with Smart Device in Visual C# group as shown in
following figure.

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.

Deploy project to Device


- Click on Target Device and select SDK1 ARMV7 Device

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.

- Click on Connect to Device button , if everything is ok then Connection succeeded


message appears in opened window.

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

Create GPIO Project


Some of eSOM335x pin can be used as GPIO, these pins are specified in pinmux and
Hardware Manual document. If you are using eDVK335x, some of GPIOs are accessible through
a 2×24 pin header as shown in the following figure:

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:

This file exists in SampleCodes\GPIOTest in eSOM335x network drive, then it is better to


copy this file to your project folder and in opened window select this file.

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

Designed form of this application shown as the following figure:

After deploy this application following UI appeared in device desktop:

11
eSOM335x Software Development

Source code for this application is written here


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.GPIO;

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;

private void ledBtn_Click(object sender, EventArgs e)


{
if (ledStatus)
{
gpio.SetBit(LED);
ledStatus = false;
ledBtn.Text = "LED OFF";

}
else
{
gpio.ClearBit(LED);
ledStatus = true;
ledBtn.Text = "LED ON";
}
}

private void timer1_Tick(object sender, EventArgs e)


{
if (gpio.GetBit(KEY))
{
keyCheckBox.Checked = true;
}
else
{
keyCheckBox.Checked = false;
}
}
}
}

12
eSOM335x Software Development

Create ADC Project


eSOM335x has 8 channels for analog to digital conversion as shown in following table, for
more information refer to pinMux document.

Core PIN number ADC


3 AIN2
4 AIN4
5 AIN1
6 AIN5
7 AIN3
8 AIN6
9 AIN0
10 AIN7

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

Adding folder paths to the OS


By default, Windows folder is system path, therefore most of application is in this folder that
means, after calling, Windows can find them. For example, if you copy your application to
Windows folder, you can call it from command prompt and OS can find it in Windows folder and
run it. This folder was created in RAM while booting operating system. If restart your development
board, OS cannot find your application because this application was deleted from this folder. For
solve this problem, you can copy your application into a permanent memory like eMMC drives
and add this folder to Windows path variables through Registry editor. For this work, go to
Windows folder and run regedit, then click on HKEY_LOCAL_MACHINE then LOADER. Click
on system path, there are 2 paths, and you can type your folder path instead of any of them. A
reboot required to apply changes.

In another way, you can edit platform.org file in WINCE700\platform\eSOM335x\FILES


folder as shown in following figure, after add path, you need to build your NK with Platform
Builder and replace NK.bin instead of old version.

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

You might also like