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.

hex430 tool ignores --order parameter and always generates little-endian output

Expert 1140 points

Hi,

I need to convert .out file into an ihex format with big-endian order and the hex430 tool stubbornly generates little-endian data.

> ~/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.4/bin/hex430 -o file.hex file.out --intel --memwidth=8 --order=ms
Translating to Intel format...
   "file.out" .text ==> .text
   "file.out" .const ==> .const
   "file.out" .text:_isr ==> .text:_isr
   "file.out" .cinit ==> .cinit
   "file.out" RTC ==> RTC
   "file.out" PORT2 ==> PORT2
   "file.out" TIMER2_A1 ==> TIMER2_A1
   "file.out" TIMER2_A0 ==> TIMER2_A0
   "file.out" USCI_B1 ==> USCI_B1
   "file.out" USCI_A1 ==> USCI_A1
   "file.out" PORT1 ==> PORT1
   "file.out" TIMER1_A1 ==> TIMER1_A1
   "file.out" TIMER1_A0 ==> TIMER1_A0
   "file.out" DMA ==> DMA
   "file.out" USB_UBM ==> USB_UBM
   "file.out" TIMER0_A1 ==> TIMER0_A1
   "file.out" TIMER0_A0 ==> TIMER0_A0
   "file.out" ADC12 ==> ADC12
   "file.out" USCI_B0 ==> USCI_B0
   "file.out" USCI_A0 ==> USCI_A0
   "file.out" WDT ==> WDT
   "file.out" TIMER0_B1 ==> TIMER0_B1
   "file.out" TIMER0_B0 ==> TIMER0_B0
   "file.out" COMP_B ==> COMP_B
   "file.out" UNMI ==> UNMI
   "file.out" SYSNMI ==> SYSNMI
   "file.out" .reset ==> .reset
> cat file.hex | grep 02FFFE
:02FFFE0000C43D

> ~/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.4/bin/hex430 -o file.hex file.out --intel --memwidth=8 --order=ls
Translating to Intel format...
   "file.out" .text ==> .text
   "file.out" .const ==> .const
   "file.out" .text:_isr ==> .text:_isr
   "file.out" .cinit ==> .cinit
   "file.out" RTC ==> RTC
   "file.out" PORT2 ==> PORT2
   "file.out" TIMER2_A1 ==> TIMER2_A1
   "file.out" TIMER2_A0 ==> TIMER2_A0
   "file.out" USCI_B1 ==> USCI_B1
   "file.out" USCI_A1 ==> USCI_A1
   "file.out" PORT1 ==> PORT1
   "file.out" TIMER1_A1 ==> TIMER1_A1
   "file.out" TIMER1_A0 ==> TIMER1_A0
   "file.out" DMA ==> DMA
   "file.out" USB_UBM ==> USB_UBM
   "file.out" TIMER0_A1 ==> TIMER0_A1
   "file.out" TIMER0_A0 ==> TIMER0_A0
   "file.out" ADC12 ==> ADC12
   "file.out" USCI_B0 ==> USCI_B0
   "file.out" USCI_A0 ==> USCI_A0
   "file.out" WDT ==> WDT
   "file.out" TIMER0_B1 ==> TIMER0_B1
   "file.out" TIMER0_B0 ==> TIMER0_B0
   "file.out" COMP_B ==> COMP_B
   "file.out" UNMI ==> UNMI
   "file.out" SYSNMI ==> SYSNMI
   "file.out" .reset ==> .reset
> cat file.hex | grep 02FFFE
:02FFFE0000C43D

Some time ago I have created the .hex file with the same utility that generated MS-ordered output:

> cat 1.1.13.hex | grep 02FFFE
:02FFFE00C2043B

Do you know how can I force the tool to generate MS-ordered hex file? The same happens for all supported output formats: ascii, motorola, tektronix etc.

I checked also Windows versions of the compilers back to 4.3.1 and all have the same behavior. Is that an issue or a proper way of working and I am missing something?

Best Regards,
tml

**Attention** This is a public forum