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.

TMS320F28069: Hex utility: generation of hex files for unconfigured memory

Part Number: TMS320F28069

Hello,

Currently the we are hitting a memory limit of the mentioned uC. To overcome this issue some code fragments are stored in an external eeprom. For ramfuncs and the cla segments this is relatively easy and works fine. The modification to the linker file etc. could be made within a few hours. Now comes the challenging part: We have large binary like structures that are currently stored in flash and only used once in a while. The idea is to store them in the external memory as well and only load them sequentely when needed. The idea was to create a dummy section in the linker file and command the linker to put the structure in the dummy section. Once linking has finished i want to create a hex file of the afore mentioned section using the HEX2000 utility. Unfortunately the utility tells me that this would fall in unconfigured memory and therefore is going to be skipped. Any ideas how to "force" the utility to just write this section to a hex file? The linker itself however has no problems with linking the external sections, problems start when i try to load or process the linked binary any further.

Thanks in advance Tobias F.

  • Please describe this part in more detail ...

    We have large binary like structures that are currently stored in flash and only used once in a while. The idea is to store them in the external memory as well and only load them sequentely when needed. The idea was to create a dummy section in the linker file and command the linker to put the structure in the dummy section.

    Please attach the linker command file to your next post.  So that the forum will accept it, add the file extension .txt to it.

    Thanks and regards,

    -George

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /*
    //###########################################################################
    //
    // FILE: F28069.cmd
    //
    // TITLE: Linker Command File For F28069 Device
    //
    //###########################################################################
    // $TI Release: F2806x C/C++ Header Files and Peripheral Examples V150 $
    // $Release Date: June 16, 2015 $
    // $Copyright: Copyright (C) 2011-2015 Texas Instruments Incorporated -
    // http://www.ti.com/ ALL RIGHTS RESERVED $
    //###########################################################################
    */
    /* ======================================================
    // For Code Composer Studio V2.2 and later
    // ---------------------------------------
    // In addition to this memory linker command file,
    // add the header linker command file directly to the project.
    // The header linker command file is required to link the
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • currently the .cli_scmd section is interesting, as can be seen the section is linked to external memory which start at 0. Usually this is no problem, except that sometimes a null pointer is still valid, but this isnt an issue here

  • I suspect the .cli_scmd output section does not work as you intend.  Let's review how it is specified ...

    Fullscreen
    1
    .cli_scmd : {CliCmdDeflated.obj (.const)} > EXT_MEM, PAGE = 0, RUN_SIZE(CliScmdSize)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    This says to create an output section named .cli_scmd.  It is made up of one input section, the .const section from CliCmdDeflated.obj.  It is allocated to an address in the memory range EXT_MEM.  

    Therefore, the entire program assumes that this output section is always located at this address in EXT_MEM.  Is that the case?  If so, why is the symbol CliScmdSize created?  What is it used for?

    Thanks and regards,

    -George

  • Hello George,

    Your assumptions are correct so far, as the external memory is read only any external reference are loaded during runtime through a custom handler. The size of the section is used to identify where this particular section starts in the generated blob. Currently there are multiple section in the external eeprom and therefore i have to calculate their start address (with ext_mem) and the size. The ramfuncs and cla prog and math tables follow the same scheme.
    The problem is located in the hex utility which returns an error if i want to create a hex file for only the .cli_scmd section as mentioned above.

    Thanks in advance Tobias Faschingbauer

  • i want to create a hex file for only the .cli_scmd section

    To limit the output of the hex utility to only one section, create a hex command file that contains a SECTIONS directive.  For details, please search the C28x assembly tools manual for the chapter titled Hex Conversion Utility Description.  From there, click on the sub-chapter titled The SECTIONS Directive.

    Thanks and regards,

    -George

  • I was able to resolve the issue by now, the section directive alone is not sufficient, i had to use a rom directive as well. There i can specify the external memory and now it works like a charm.

    Thanks for your time Tobias Faschingbauer