User`s manual
Table of Contents
Chapter 1 Introduction..................................................................................................1-1
Moxa OS Ver. 2.x .................................................................................................................... 1-1
PCG SDK 2............................................................................................................................. 1-1
SDK Function Group Overview.............................................................................................. 1-2
Chapter 2 Installing SDK...............................................................................................2-1
System Requirements.............................................................................................................. 2-1
Installing PCG SDK2 .............................................................................................................. 2-1
Desktop Icon.................................................................................................................. 2-1
PCG SDK2 Directories and Files................................................................................... 2-2
Installing Turbo C.................................................................................................................... 2-3
Turbo C Directories and Files........................................................................................ 2-3
Setting up Environment Variables.................................................................................. 2-3
Chapter 3 Developing User Applications....................................................................3-1
Application Development Flow............................................................................................... 3-2
Development System............................................................................................................... 3-3
Source Code Editing................................................................................................................ 3-3
Compiling and Linking your Application................................................................................ 3-4
Creating a Make File...................................................................................................... 3-4
Generating an EXE file.................................................................................................. 3-4
Using EXE2AP........................................................................................................................ 3-5
Protect Your Software with Private Key ........................................................................ 3-5
Embedding a Private Key in your Application............................................................... 3-5
Embedding a Private Key from the Command Line...................................................... 3-6
Using SDK Manager ............................................................................................................... 3-6
Searching for NPort PCGs............................................................................................. 3-6
Selecting/Deselecting NPort PCG ............................................................................... 3-10
Configuring an NPort PCG...........................................................................................3-11
Application Download................................................................................................. 3-16
Run Application / Debug ............................................................................................. 3-17
Example Programs................................................................................................................. 3-20
Chapter 4 Application Deployment..............................................................................4-1
Creating System FirmwareâEXE2FRM................................................................................ 4-1
Command Line Usage.................................................................................................... 4-2
Field Utility.................................................................................................................... 4-2
Developing an NPort PCG Utility........................................................................................... 4-3
PCGCI Library............................................................................................................... 4-3
AP ID............................................................................................................................. 4-3
AP Version ..................................................................................................................... 4-3
Chapter 5 Programming Notes ....................................................................................5-1
Flash ROM Access .................................................................................................................. 5-2
Flash ROM Structure ..................................................................................................... 5-2
Writing Data................................................................................................................... 5-3
Reading Data.................................................................................................................. 5-3
Erasing Data................................................................................................................... 5-3
Serial I/O Buffer...................................................................................................................... 5-3
Chapter 6 FAQ ...............................................................................................................6-1