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.

CC2642R: Linker cmd file error in simple_peripheral_oad_offchip_CC26X2R1_LAUNCHXL_tirtos_ccs

Part Number: CC2642R

Hello TI Team,

Using simple_peripheral_oad_offchip_CC26X2R1_LAUNCHXL_tirtos_ccs example from simplelink_cc13x2_26x2_sdk_4_20_00_35  I discovered an issue in linker cmd file.
The calculation of FLASH section is not correct:

Expected lenght is: 0x55f30

The problem seems to be the FLASH_START macro. Using braces like length = (FLASH_END - (FLASH_START) + 1) might solve this issue.

For the example I would also prefer to have the .ccfg section placed correctly in the linker cmd file otherwise changes in syscfg will not take an effect.

Regards,
Tobias

  • Hi Tobias,

    Can you please confirm that your project is discovering the correct linker .cmd file?

    In CCS, got to Project Properties > Build > ARM Linker > File Search Path and look for the .cmd linker file. It should be 

    ${COM_TI_SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR}/examples/rtos/CC26X2R1_LAUNCHXL/ble5stack/simple_peripheral_oad_offchip/tirtos/ccs/cc13x2_cc26x2_app.cmd

    Have you made any other changes to your linker file?

    Regards,

    Daniel

  • Hello Daniel,

    Yes, linker cmd file is referenced as expected.

    I did not do any changes, just import the example and compile it out of the box.



    Regards,
    Tobias

  • Tobias,

    I'm able to recreate this issue on my end as well so I've filed a bug report. I'll let you know when I get an update on that.

    Can you clarify what issues you are seeing with the ccfg? Note that for this project the ccfg is defined by the BIM project, not the application project.

    Regards,

    Daniel

  • Hello Daniel,

    Thank you for the info.

    My usecase was to take the example project and adapt it to my custom board as suggested by TI.
    On my custom bord no LF oscillator is available so I tried to modify settings in syscfg file.
    I used the default BIM to be able to run the application but I expected changes I do in applications syscfg will take effect.

    It tooks me a while to recognize the linker automatically generates the .ccfg section but places it not at the right place.

    Regards,
    Tobias

  • Tobias,

    Thanks for bringing this to our attention. I've filed a bug report and I will update you on the status as soon as I can.

    Regards,

    Daniel

  • Tobias,

    Thank you for reporting this issue. I worked with Daniel and did some analysis on this issue. I found out your workaround works fine on the final size calculation.

    The reason this happens is due to the subtraction operation that is not applied to the entire FLASH_START definition - i.e., when length is calculated, the linker preprocessor replaces this symbol with the hierarchy of symbols (and ultimately their numeric values) and therefore its calculation becomes:

      FLASH (RX) : origin = FLASH_START, length = (FLASH_END - FLASH_START + 1) 

      FLASH (RX) : origin = FLASH_START, length = (FLASH_END - ENTRY_START + ENTRY_SIZE - 1 + 1)

    By adding the parenthesis as you did, the calculation becomes correct.

    An alternative is to also define the FLASH_START (line 174) with the parenthesis, which is similar to the definition of FLASH_END (lines 183 and 185)

    #define FLASH_START                (ENTRY_END + 1)

    Just one aspect: since this linker .cmd file is included only on the linker properties, this does not trigger a new build from CCS. You need to issue a Rebuild Project in order for CCS to properly pick up the changes.

    I apologize for the inconvenience,

    Rafael

  • Hi Rafael,

    Thank you for investigation and well detailed feedback.

    To be consequent I suggest all calculated defines should have this parantesis to avoid any calculation misstakes...

    Regards,
    Tobias