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.
Hello
We need an 8Bit HEX file for flashing. I have generated an 8Bit HEX file with the hex2000 tool with the option memwidth 8.
What i see now is that in the 8 bit hex file the bytes are swapped. Can I change this with an option in the hex2000?
This is the 8Bit file:
This is the 16Bit file:
Greetings
Jochen
I suspect the option --swapbytes will help. But I'm not certain.
I'm not sure what you mean by 8Bit or 16Bit file. Please show the hex2000 commands you use to create each file. Please copy and paste the text of each command, and do not use a screenshot.
Thanks and regards,
-George
Hello
This is the command to generate an HEX File with 8Bit addressing.
-------------------------------------------------------------------------------------------------------------------
/* Special settings to get an HEX file with 8 bit addressing for flash proces over SAC */
--intel
--image
--swapbytes
--memwidth 8
ROMS
{
/* Multiply the linker addressing of Flash sections by 2 (16 bit to 8 bit addressing ) */
/* When using --binary option all addresses are converted to binary (byte addressing) */
FLASHIMAGE: org=0x0110000, len=0x30000, romwidth=16, fill=0xFFFF
files = { .\mainSAC.hex}
}
-------------------------------------------------------------------------------------------------------------------
This is the command to generate an HEX File with 16Bit addressing.
-------------------------------------------------------------------------------------------------------------------
--intel
--image
ROMS
{
FLASHIMAGE: org=0x088000, len=0x18000, romwidth=16, fill=0xFFFF,
files = { .\main.hex}
}
-------------------------------------------------------------------------------------------------------------------
Greetings
Jochen
I remain unsure of what you intend to do. Thus I hesitate to suggest any solution. I can make some comments that I think will prove helpful.
On C28x, each address corresponds to 1 16-bit word. Not 1 8-bit byte, as is the case on nearly every other CPU.
Please search the C28x assembly tools manual for the sub-chapter titled Understanding Memory Widths. That explains the relationship between target width, --memwidth, and --romwidth. In your case, target width is always 16, --romwidth is always 16 (it is set on the FLASHIMAGE line in the ROMS directive), and --memwidth varies between 8 and 16. The interesting case is when --romwidth is less than --memwidth. That never happens under these conditions.
This comment is correct when viewed in isolation ...
/* When using --binary option all addresses are converted to binary (byte addressing) */
But it is still wrong in context. Because --intel is used, and not --binary. Thus, you should not double the address and length of the ROMS directive.
The option --swapbytes changes nothing when --memwidth=8 and --romwidth=16. Try it when --memwidth=16 and --romwidth=16.
Thanks and regards,
-George