beautypg.com

Integrating an existing ztp application with zgate – Zilog EZ80F91GA User Manual

Page 32

background image

The ZGATE Embedded Security Development Kit

UM024502-1012

20

ZGATE Embedded Security Development Kit
User Manual

ZGATE first checks for the presence of the ZGATE user configuration file,

zg_rules.usr

, in ZFS. If this file is present, ZGATE uses the configuration rules in this

file. If this file is not present, ZGATE next looks for the ZGATE default configuration file,

zg_rules.def

, in ZFS. If this default file is present, ZGATE uses the configuration rules

in this file.

If neither configuration file is present (or if ZFS support is not included in the ZTP appli-
cation), ZGATE uses the configuration rules defined in the

ZGATE_Conf.c

file that is

compiled and linked to the ZTP application. If the

ZGATE_Conf.c

file is modified, it is

necessary to rebuild and download the project.

If ZFS is used and the

zg_rules.usr

file becomes unusable, a next-level static configu-

ration file can be recovered. For example, the

zg_rules.usr

file could become unusable

if the IP address filter is configured for WHITELIST filtering, but no IP addresses are
added to the filtering list. In this instance, ZGATE will block all IP packets from reaching
ZTP, effectively disabling all network communication.

This recovery of the next-level static configuration file can be performed using either of
the following two methods:

Using a browser, navigate to the Startup Settings page of the ZGATE Demo program
and click the

Use Default

button.

Issue the

zg_restore

command on the ZTP console.

Either method will erase the

zg_rules.usr

file and cause ZGATE to boot with the set-

tings defined in the

zg_rules.def

ZFS file (if present) or the settings defined in the

ZGATE_Conf.c

file that is linked to the ZGATE Demo program.

Integrating an Existing ZTP Application with ZGATE

ZGATE support can be added to any ZTP application using the following procedure:

1. From the

Start

menu on a Windows PC, click

Computer

and navigate to the

Sample

Programs

folder of the ZTP installation. By default, this folder will be located in the

following filepath:

\ZTP\ZTP_Lib \ZTP\SamplePrograms

2. Create a new folder in the Sample Program folder by right-clicking in the display win-

dow and selecting

New…

, then

Folder

. Enter an appropriate name for the folder; for

example,

MyZgateDemo

.

3. Navigate to the ZGATE_Demo folder and copy the following three files to the folder

created in

Step 2

:

ZGATE_Demo_ZGATE000100ZCOG.zdsproj