Sei sulla pagina 1di 11

Development Environment Guide

for EFT-POS TPS300


(SDK 2.0)

Date 2015-04-23

Version V2.0

Telepower Communication Co., Ltd.


Development Environment Guide for EFT-POS TPS300 Version:V2.0

Contents

1 SUMMARY .......................................................................... 2

1.1 INTRODUCTION ...................................................................... 2


1.2 HISTORY ........................................................................... 2

2 DEVELOPMENT ENVIRONMENT ..................................................... 2

2.1 GENERAL .......................................................................... 2


2.2 SOFTWARE INSTALLATION ............................................................. 2

3 COMPILER INSTALLATION .......................................................... 2

3.1 VMWARE + UBUNTU(TELPO VERSION) ................................................... 2


3.2 OTHER ENVIRONMENT ................................................................ 4

3 APPLICATION COMPILING .......................................................... 5

3.1 COMPILE DEMO PROJECT .............................................................. 5


3.2 TIPS .............................................................................. 7
3.2.1 How to generate your own app file 7
3.2.2 Explanation for file “tap.manifest” 9
3.2.3 About tapgen 10

1
Development Environment Guide for EFT-POS TPS300 Version:V2.0

1 Summary
1.1 Introduction
This article is for TPS300 financial POS terminal SDK based development guide.

1.2 History
Date Version Remark
2014-01-22 1.0 First Release
2015-04-23 2.0 For SDK 2.0

2 Development Environment
2.1 General
Basically we edit source code in Windows system and compile in Linux system. For this reason, we
recommended developer to use Virtual machine with a Windows host / Linux guest. Below we will take
Windows XP / Ubuntu 10.04 as example.
System 64M above ram, 200M available hard drive space
requirements Windows2000 or above OS

Compiler arm-brcm-linux-gnueabi-gcc

API Header TP SDK Headers

API library libtpapp.a


vapinpad.a

2.2 Software Installation


It’s suggested to use Windows computer with VMware and Ubuntu in it.
(1) VMware 9.0: Please download it from internet.
(2) Ubuntu10.04_Telpo_POS.rar: Ubuntu system with compiler in it which is provided by Telpo. Filesize
is about 1.5GB, which can be open directly by Vmware after unzip.
(3) brcm-armtools-32_bit_mod.tar.bz2: It should install compiler first if the Ubuntu version is not provided
by Telpo.

3 Compiler Installation
3.1 VMware + Ubuntu(Telpo Version)
(1) Install VMWare 9.0
(2) Unzip Ubuntu10.04_Telpo_POS.rar
(3) Open Ubuntu. Please choose File -> Open in Vmware and select Ubuntu LTS.vmx which is in the
package of Ubuntu10.04_Telpo_POS

2
Development Environment Guide for EFT-POS TPS300 Version:V2.0

(4) Run Ubuntu. Please click the button of “Power on this virtual machine” in VMware.

(5) Start Ubuntu and select “Ubuntu LTS”, and password is “123456”.
NOTE: When you want to get priority of root, please use the same password “123456”.

3
Development Environment Guide for EFT-POS TPS300 Version:V2.0

(6) In this Ubuntu, you could find “arm-brcm-linux-gnueabi-gcc” in directory


“/usr/local/tools/le_arm11_external_20090506_32bit/bin”.

3.2 Other Environment


If you are using another Linux system, please follow below steps to install compiler.
(1) Copy “brcm-armtools-32_bit_mod.tar.bz2” to Linux, e.g. “/home/telpo/BCM5892”.
(2) Unzip compiler.
cd /home/telpo/BCM5892
tar –xjvf brcm-armtools-32_bit_mod.tar.bz2
(3) Add environment variables
Run command “sudo vi /etc/environment”, and add
“/home/telpo/BCM5892/tools/le_arm11_external_20090506_32bit/bin” to environment path, which is
shown as below:

(4) Reboot Linux.


(5) Check if installation is success.
Open terminal in Linux, and type command “arm-brcm-linux-gnueabi-gcc”. If it says “command not
found”, that means installation failure(compiler is not in environment variable). If it says “no input files”,
that means installation is success.

4
Development Environment Guide for EFT-POS TPS300 Version:V2.0

3 Application Compiling
3.1 Compile Demo Project
Telpo has provided Demo_Project. Here we will take it as an example.
(1) There are 4 directories in SDK.
tools: Includes tools for app generating and app downloading.
tpdemo: Source code of Demo_Projcet.
tpinc: Telpo SDK header files.
tplib: Telpo SDK library.

(2) Change directory to “tpdemo”, and open Makefile to check.


The last sentence should be “rm $(OBJS) $(TARGET) $(TAP)”. If there are more lines as below picture,
please delete them. After changes, please save Makefile and close it.

5
Development Environment Guide for EFT-POS TPS300 Version:V2.0

(3) Run command “make”.

(3) If compiling is success, the compiling result is shown as below.

6
Development Environment Guide for EFT-POS TPS300 Version:V2.0

(4) In the demo project, the output app is named “tpdemo_xxxx.tap” as below.

(5) If app is compiled successfully, the next step is to download it to POS.

3.2 Tips

3.2.1 How to generate your own app file


(1) Add your own project source code to the sub directory. Also, you could create a new directory like
“tpdemo” and put your source code inside.

7
Development Environment Guide for EFT-POS TPS300 Version:V2.0

(2) Write your own Makefile according to the one in directory “tpdemo”.

(3) The compiling target file should output to directory “tap”.

(4) Directory “tap” includes below contents.

8
Development Environment Guide for EFT-POS TPS300 Version:V2.0

a. executed file.
b. file “tap.manifest”.
c. directory “data” (optional). The directory is used to store pre-defined files, which could be
accessed by TPFile APIs.

(5) Change to directory “tools/linux/tapgen” to excute script “create_tap”, the input parameter is the path
of directory “tap”. If success, the final app “xxx.tap” will be generated.

3.2.2 Explanation for file “tap.manifest”


ProcessName (Mandatory): Executed file name.
SystemName (Mandatory): App name recognized by system. This is the unique app ID in terminal, each
app should have different SystemName. The maximum length is 64 English or numerical characters.
CommonName (Mandatory): App name.
LocalName (Optional): Local app name which uses the font lib in POS. If local name includes unsupported
characters, POS will use CommomName as app name.
LocalCP(Optional): Character set of local name. NOTE: LocalName and LocalCP should appear or
disappear at the same time.
VersionName (Optional): The name of app version.
VersionCode (Optional): The ID of app version.
NOTE: This file should be Unix file format.

9
Development Environment Guide for EFT-POS TPS300 Version:V2.0

3.2.3 About tapgen


If tapgen could not be executed, please recompile tapgen.c. The makefile for tapgen is under directory
“tools/Linux/tapgen”. Please install openssl-devel package first.

10

Potrebbero piacerti anche