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/TMS570LS3137: Issues converting .out to .hex with Armhex utility

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

Tool/software: TI C/C++ Compiler

Hello,

I'm trying to convert my .out file into a .hex file using armhex.exe utility.  My project is generated using HalCoGen with the basic linker sections:

MEMORY
{
    VECTORS (X)  : origin=0x00000000 length=0x00000020
    FLASH0  (RX) : origin=0x00000020 length=0x0017FFE0
    FLASH1  (RX) : origin=0x00180000 length=0x00180000
    STACKS  (RW) : origin=0x08000000 length=0x00017300
    RAM     (RW) : origin=0x08017300 length=0x00028d00

/* USER CODE BEGIN (2) */
/* USER CODE END */
}

/* USER CODE BEGIN (3) */
/* USER CODE END */


/*----------------------------------------------------------------------------*/
/* Section Configuration                                                      */

SECTIONS
{
    .intvecs : {} > VECTORS
    .text    : {} > FLASH0 | FLASH1
    .const   : {} > FLASH0 | FLASH1
    .cinit   : {} > FLASH0 | FLASH1
    .pinit   : {} > FLASH0 | FLASH1
    .bss     : {} > RAM
    .data    : {} > RAM
	.sysmem  : {} > RAM
	

/* USER CODE BEGIN (4) */
/* USER CODE END */
}

I don't yet understand why, but when I run "armhex.exe -i projectName.out -o projectName.hex" I get the following warning:

Translating to Intel format...
"projectName.out" .intvecs ==> .intvecs
warning: Data is being written to auto-generated file projectName.i1
warning: Data is being written to auto-generated file projectName.i2
warning: Data is being written to auto-generated file projectName.i3
"projectName.out" .text ==> .text
"projectName.out" .const ==> .const
"projectName.out" .init_array ==> .init_array
"projectName.out" .cinit ==> .cinit

Probably not a surprise, but the generated hex file does not run properly. 

Why is the data being auto generated to another file? Do I need to specify other parameters for utility to properly generate a .hex file for this device?

Thank you.

  • Hello,

    The default ROM width is 8-bit. The number of files = Memory width (32-bit) / ROM width (8-bit) = 32/8=4 files. This is why you got 4 hex files. If you change the ROM width to 32-bit, only 1 hex file is generated.

    armhex.exe -i projectName.out -o projectName.hex -romwidth=32

    The armhex also converts all initialized sections.

    Please see the chapter titled Hex Conversion Utilities Description in: