Appendix A: Hex File Parser Application; Using The Hex File Parser Application - Infineon PSoC 4 Quick Start Quide

Table of Contents

Advertisement

PSoC 4 Programming Using an External Microcontroller (HSSP)

Appendix A: Hex File Parser Application

14
Appendix A: Hex File Parser Application
The data for programming PSoC 4 is available in the hex file (.hex) format, which is explained in the section
"Appendix B. Intel Hex File Format" of the programming specifications document of the respective device listed
in the
Related Documentation
The hex file is not in a format that can be used by a host to program the target device. This file, which is
generated by the PSoC Creator software, contains both the programming data and the metadata in
hexadecimal format. The metadata includes information on the hex file record type, extended linear address
data, and so on. This metadata is used to categorize the programming data into flash code region data, flash
configuration region data, flash protection data, and so on.
A C# application has been developed in the Visual Studio development environment that parses the hex file and
generates the .c and .h (HexImage.c, HexImage.h) files, which store only the programming data from the hex
files. The programming data is stored as an array of constants in the HexImage.c and HexImage.h files.
The C# application with the source code is provided along with the application note. To use the C# application,
you must install .NET Framework version 3.5 or higher on your computer.
Note:
Separate Hex File Parser applications are provided for the PSoC 4000, PSoC 4100/4200,
PSoC 4100M/4200M, PSoC 4xx7_BLE, PSoC 4xx8_BLE, PSoC 4xxxL, PSoC 40xxS, PSoC 41xxS, PSoC
41xxS Plus, and PSoC 41xxPS device families.
C# Application Name: Hex File Parser
Development environment: Microsoft Visual Studio Express 2013 (Version 12.0.31101.00 Update 4)
Source code: See the C# source project for details. The project source code can be viewed and edited by
downloading and installing the freely available Microsoft Visual Studio 2013 Express edition. Simply right-click
the Form1.cs file in the Solution Explorer window and select the View Code option. This action opens the
source code of Form1.cs.
14.1

Using the Hex File Parser Application

Nine sets of parser applications are available in the folder 'C# Application'. Choose the appropriate application
depending on the PSoC 4 family you are using.
Open the executable file of the Hex File Parser application in the folder C# Application\HexFile Parser.exe of the
attached .zip file. A GUI screen pops up, as
Application Note
section.
Figure 15
shows.
33 of 45
001-84858 Rev. *N
2021-03-23

Advertisement

Table of Contents
loading

This manual is also suitable for:

An84858

Table of Contents