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.

TMS320F28335: how the complier assign the unspecified section in the memory?

Part Number: TMS320F28335

Customer reported that they forgot to specify the space for .SpecialFuncs in the CMD, and found it was assigned to the remaining space of RAML0123 by the complier. In the initiated CMD, RAML0123 was used to run the critical functions, and FLASHBCDEFGH was used for .text.

They wanted to understand why .SpecialFuncs was assigned to the remaining space of RAML0123, instead of FLASHBCDEFGH. And is there any method to report such error when some section was not specified with the related space? 

#pragma CODE_SECTION(".SpecialFuncs")
void Funcs1(woid)
{
…
}

MEMORY
{
PAGE 0:    /* Program Memory */
         /* on-chip SRAM block L0~L3 16KW Secure Zone */
         RAML0123                         : origin = 0x8000, length = 0x3FD0
         /* on-chip Flash sector B~H 112KW Secure Zone */
         FLASHBCDEFGH                          : origin = 0x320000, length = 0x1BFFC              /* Normal Routine size ~56KW */
         ...
PAGE 1:    /* Data Memory */
         ...
}
SECTIONS
{
         .RTCriticalFuncs        :       LOAD = FLASHBCDEFGH,
                                                        RUN = RAML0123
                                                        LOAD_START(_RTCriticalFuncsLoadStart),
                                                        LOAD_END(_RTCriticalFuncsLoadEnd),
                                                        RUN_START(_RTCriticalFuncsRunStart),
                                                        PAGE = 0
         .text             : > FLASHBCDEFGH         PAGE = 0
         ...
}

  • Hi,

    CCS usually reports a warning if it detects any unspecified memory section. If you do not find this warning, please check if the option --warn_sections is enabled. It is available in Project Properties->C2000 Linker->Basic Options

    If not specified, it will be assigned to the first available memory.

    Regards,

    Veena

  • Veena,

    Thank you for the information. Is there any method to change this warning to error reported? 

  • Hi,

    You can do that in C2000 Linker->Advanced Options->Diagnostics.

    You can either add the warning ID in the --diag_error field to make the CCS report the specified warning as error. Or, you can enable --emit_warnings_as_errors to make the CCS report all warnings as errors.

    Regards,

    Veena