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.

TMS320F28384S: CM - A issue about .resetisr section code generation

Part Number: TMS320F28384S


Hello,
on Cortex core reside two programs: a bootloader and an application.

The bootloader starts at POR, checks the application CRC and eventually branches to it.
The application is allocated at higher addresses, starting from sector 4.

I have the following strange behaviour with the generated code of the application .resetisr section.
I have declared the following two consecutive regions and corresponding sections, in the linker command file:

CMBANK0_RESETISR : origin = 0x00210000, length = 0x00000008
CMBANK0_CRC      : origin = 0x00210008, length = 0x00000002

.resetisr : > CMBANK0_RESETISR, ALIGN(16)
.crc      : > CMBANK0_CRC

I have seen, from .map file, that even if the .resetisr section is assigned to a 8 bytes long region, it is long only 6 bytes:

.resetisr
* 0 00210000 00000006
00210000 00000006 startup_cm.obj (.resetisr:resetISR)

.crc 0 00210008 00000002
00210008 00000002 main.obj (.crc)

So I expected to find a hole of two 0xFF unprogrammed bytes between the two sections.
Instead, this two bytes are programmed at 0.

Of course, I found the same sections length information also in the corresponding .hex file records, that I use to calculate and append CRC on the application code.

:0600000001F0B4BE7047E0
:02000800C71D12

The .hex file CRC calculation procedure assumes that holes between sections are unprogrammed memory areas at 0xFF.

So, in the end, the CRC calculated on the .hex file is different from the one calculated by the bootloader at the startup, on the appliction memory.

Is there something wrong in my linker command file?

Thank you,
Carlo