This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMS320F28379D: Hex2000 parser

Part Number: TMS320F28379D

Tool/software: TI C/C++ Compiler

Hello everyone,

we want to write our own custom RAM-Firmware to load an hex-File received from SCIa into the Flash of an C2000 MCU.

We generate the hex-file with the hex2000.exe with the following options:
-o test1_28335_test.hex
-i
-sci8
-boot
-bootorg 0
-map Map1.txt

now we want to parse this hex file to extract the data we have to store in flash via flash-Api.
I don't fully understand the structure of the generated hex-file:
What's clear to me, is that:
-the hex files data is wrapped inside the intel format.
-the data begins with the initializer (underlined HexValues).
-This is the startadress for the next data. (see the attached map-file)
But from on there I don't know how to go on.

Hex-file-extract:
:20000000AA08000000000000000000000000000000003300F6FFEC2E3300D61969006E00F3
:2000200066006F00000000004E0000002D000000740069006D00650000000000540000006D
:200040007200740069006D0065000000680065006C007000000000002D007C0054000000D9
:200060006500630068006F000000000077006C006500760065006C00000000004E005400B0

Please help me undersatnding the structure of the generated hex-file, so we can succesfully parse it.
Compiler and hex2000.exe: V. 15.2.4
CCS: V. 6

Map1.txt
********************************************************************************
TMS320C2000 Hex Converter                                               v15.12.4
********************************************************************************

INPUT FILE NAME: <..\PPTest.out>
OUTPUT FORMAT:   Intel

PHYSICAL MEMORY PARAMETERS
   Default data width   :  16
   Default memory width :   8 (LS-->MS)
   Default output width :   8

BOOT LOADER PARAMETERS
   Table Type:		  SERIAL PORT (SCI 8 bit Mode)
   Entry Point:		  0x0033fff6


OUTPUT TRANSLATION MAP
--------------------------------------------------------------------------------
00000000..003fffff  Page=0  Memory Width=8  ROM Width=8
--------------------------------------------------------------------------------
   OUTPUT FILES: test1_28335_test.hex [b0..b7]

   CONTENTS: 00000000..0006684f   BOOT TABLE
                          .econst : dest=003319d6  size=00002eec  width=00000002
                            .text : dest=0031fd1c  size=0000a4a6  width=00000002
                           .text2 : dest=0032a1c2  size=00007813  width=00000002
                      Flash28_API : dest=00313ca4  size=00000543  width=00000002
                           .cinit : dest=003348c2  size=00001e70  width=00000002
                           .text1 : dest=003141e8  size=0000bb34  width=00000002
                        codestart : dest=0033fff6  size=00000002  width=00000002
                        ramfuncs1 : dest=00310640  size=00002aaf  width=00000002
                        ramfuncs2 : dest=00310000  size=00000341  width=00000002
                        ramfuncs3 : dest=00310341  size=000002ff  width=00000002
                        ramfuncs4 : dest=003130f0  size=00000bb3  width=00000002
                       csmpasswds : dest=0033fff8  size=00000008  width=00000002
                         csm_rsvd : dest=0033ff80  size=00000076  width=00000002
                          .switch : dest=00336732  size=000000ee  width=00000002
                          extvars : dest=00228000  size=0000c1e0  width=00000002
                  ConfigParameter : dest=00308000  size=00000970  width=00000002

--------------------------------------------------------------------------------
00000000..003fffff  Page=1  Memory Width=8  ROM Width=8  "*DEFAULT PAGE 1*"
--------------------------------------------------------------------------------
   NO CONTENTS

  • Marcel Kummer said:
    we want to write our own custom RAM-Firmware to load an hex-File received from SCIa into the Flash of an C2000 MCU.

    I lack the expertise needed to deeply understand what this means.  Keep that in mind as you read my answer.

    Since you use the option -i, the hex file is in the format described in the section titled Intel MCS-86 Object Format in the C28x assembly tools manual.  The option -boot means the hex utility composes another section and adds it the output, called the boot table.  This table is processed by a boot loader when the system starts.  This additional section is also in Intel format.  The options -sci8 and -bootorg are further specifications of the boot table.  It may make sense for you to not have a boot table, in which case you should remove the options -boot, -bootorg, and -sci8.  But I don't understand your problem well enough to be certain on this point.

    Thanks and regards,

    -George

  • Hello,

    my Problem has changed a bit but is very close to the original question so I post it here.

    I still use the same settings for the Hex2000.exe as described before.

    o test1_28335_test.hex
    -i
    -sci8
    -boot
    -bootorg 0
    -map Map1.txt

    The generated map-file also hasn't changed (attached to prev. question).

    I noticed, that inside the generated test1_28335_test.hex file is also data for the
    extvars : dest=00228000  size=0000c1e0 (see map file).

    Why is this data also in the hex file?
    I don't need it, because I just want to get the Program into the C2000 F28335's Flash, so only data inside the Memory area from 0x300000 to 0x33FFFF is important.

    Which options do I have to pass to the hex2000.exe, to generate a hex-file with the same format but without the unnecessary extvars-data?

    Thanks and Regards,

    Marcel Kummer.

  • Add the option ...

    --exclude=extvars

    ... to not convert that output section.  Read more about the option --exclude in the C2000 assembly language tools manual.

    Thanks and regards,

    -George

  • Thank you, that worked.