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.

LAUNCHXL-CC1312R1: How to manage flash memory, got error after change linker command file

Part Number: LAUNCHXL-CC1312R1
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I want to use flash memory from 0x0 until 0x2FFFF for my program, 0x30000 until 0x31FFF for time value, 0x32000 until 0x57FFF for log value.

i already set the NVS:

but i got error while change linker command file (ccc13x2_cc26x2_tirtos7.cmd) for change the flash size from 0x58000 to 0x30000.

my program suddenly error in half of program running, then can't be reboot again. but the program can run normally while i used 0x58000 flash size.

i did this condition because in the future i want to used 0x0 until 0xFFFF for bootloader and 0x10000 until 0x2FFFF for my program

  • Hi Muhammad,

    from what I can see you adjusted the settings correctly. To help you debugging I need some more information:

    1. Which example project are you running on?
    2. Which SDK version are you using?
    3. Did you verify that your program fits in the NVS area that you are generating?
    4. Do you write data to the flash outside of your new defined ranges?

    Kind regards,
    Theo

  • 1. i develop program base on rfUARTBridge example, but i also did test on another example (nvsinternal example) and change the FlashSize in linker command file (ccc13x2_cc26x2_tirtos7.cmd). it make the program error.

    2. v.7.40.0.77

    3. yes, the program not more large than the flash size (33% flash used, 65,751 out of 196,608 unit used)

    4. i don't know how to write data by set flash area if not from FLASH_BASE and FLASH_SIZE in ccc13x2_cc26x2_tirtos7.cmd? i only set in that file.

  • Hi Muhammad,

    I set up the rfUARTBridge using the latest SDK v.7.41.00.17 and made the changes that you described.
    Running the project works completely fine here.

    Can you give me more details about your code:
    1. Did you try to run the rfUARTBridge example with only changing the memory as you explained above?
    2. Which other changes did you make to the code?
    3. Please give me steps to reproduce the error.

    Kind regards,
    Theo

  • try below:

    • SDK v.7.41.00.17
    • import rfUARTBridge (TI-RTOS7, TI Clang Compiler)
    • project properties - debug - flash settings - program load settings - erase settings during program load - all unprotect sectors - apply and close
    • open file cc13x2_cc26x2_tirtos7.cmd, change #define FLASH_SIZE              0x58000 to #define FLASH_SIZE              0x30000
    • flash to board
  • Hi Muhammad,

    I configured the memory in sysconfig as shown by you and also changed the flash size define.

    When I start the serial terminals I can use the programs functionality without experiencing any issues.

    Can you please start with a fresh project and only change the flash sections using sysconfig?

    Another note to changing the flash size: When you define different flash sections in sysconfig you don't need to change the flash size define as it is overwritten by the changes you make in sysconfig.

    Kind regards,
    Theo

    1. do you already doing "project properties - debug - flash settings - program load settings - erase settings during program load - all unprotect sectors - apply and close"? because the program will be error while the flash memory is empty before.
    2. can you take screenshot where did you do the flash sections in syscfg? and do you change FLASH_SIZE in cc13x2_cc26x2_tirtos7.cmd as well?
  • Hi Muhammad,

    1. I changed the settings and it works completely fine flashing the board.

    2. I defined the two nvs sections as follows:

    And I also changed the .cmd file define.

    Please load again the unmodified example from the sdk, only perform the described changes and let me know if it works.

    Kind regards,
    Theo

  • there only run once time, i don't received any response while click reset button (beside micro usb port), usually the program will restart when i press that button

  • Hi Muhammad,

    if you press the reset button while you have an open debug session you will end the session so everything is not connected anymore.

    Instead you need to use the microcontroller icon on the top bar next to "run" to reset the device without interrupting the debug session.

    Kind regards,
    Theo

  • i also did in another case as well, serial monitor only. but the program only run in the first program running, while i do board reset the program is not running as expected. i tried also in example empty project.

  • Hi Muhammad,

    you must use the option "reset board" in the debug window of CCS to keep the debug session running. Please see the screenshot below:


    Otherwise you need to use an external terminal emulator like Tera Term: https://teratermproject.github.io/index-en.html 

    Kind regards,
    Theo

  • Hi Theo,

    I have done everything as you explained above but the program still doesn't run properly when restarted/reset/whatever.

    Regards,
    Juan

  • Hi Muhammad,

    I tested the UART bridge example with the changed memory sections and all works fine.
    Also I tested the erasing and reset the board using CCS and all works.

    To assist you further you need to give me more details so that I understand what you are exactly doing.
    Please answer the following two points in detail.

    1. Please give me detailed steps to reproduce your issue.
    2. Please explain in detail the issue that you're experiencing.

    Thank you,
    Theo

  • Hi Theo,

    1.

    • Default example SDK 7.41.00.17, project TI Drivers - empty.
    • properties empty_CC1312R1_LAUNCHXL_tirtos7_ticlang, Restore Defaults. Debug menu  - Flash settings - Erase Settings during Program Load (All Unprotect Sector), Apply and Close.
    • cc13x2_cc26x2_tirtos7.cmd file, change #define FLASH_SIZE              0x58000 to #define FLASH_SIZE              0x30000.
    • Flash into board, after flash completed the program run normally. then click reset button, the program not run normally (can't blink).

    2.

    • the program not running normally while i change flash size  in the linker file.

    thank you.

    Regards,
    Juan

  • Hi Juan,

    please do not change the linker .cmd file.

    Instead change the flash as described in my previous post (quoted below) in sysconfig.

    2. I defined the two nvs sections as follows:


    Kind regards,
    Theo

  • Hi Theo,

    I defined the two nvs sections as follows:

    if i only do this and don't change the linker .cmd file, the program run normally. is it enough to manage the flash memory?

    Regards,
    Juan

  • Hi Juan,

    yes it is.

    Kind regards,
    Theo