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-CC26X2R1: Bluetooth® forum

Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: SIMPLELINK-CC13X2-26X2-SDK, CCSTUDIO, SYSCONFIG

Hey

How can i generate output bin file (from ProjectZero for example)  that is padded to be same size as my flash  (0x58000  =  360448 Bytes) 

in order to burn it  with  serial bootloader   library (sblAppEx) .

I am porting my project to SDK 4.30.00.54, CCS 10.1.1.00004

from SDK 3.20.00.68 , CCS  9.0.1.00004 and i used to have post build step :

${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}.out;${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.bin ${CG_TOOL_ROOT}/bin/armofd ${CG_TOOL_ROOT}/bin/armhex ${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin;

as one line.

I believe that this post build step  makes the trick in CCS  9.0.1.00004 but it does not in CCS 10.1.1.00004 .

I verified that tiobj2bin from ....ccs1011/ccs/utils/tiobj2bin is executed.

How this should be done in new SDK/CCS.

BR

Alik

  • Hey Alik,

    I was able to create the bin file after adding the following post-build step in CCSTUDIO v10.0.0 using the SIMPLELINK-CC13X2-26X2-SDK:

    ${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin ${BuildArtifactFileName} ${BuildArtifactFileBaseName}.bin ${CG_TOOL_ROOT}/bin/armofd ${CG_TOOL_ROOT}/bin/armhex ${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin

    Note that this was on the second post-build step line after:

    ${CG_TOOL_HEX} -order MS --memwidth=8 --romwidth=8 --intel -o ${ProjName}.hex ${ProjName}

    Can the same not be said for your project?  Is the bin file generated but faulty or not produced at all?

    Regards,
    Ryan

  • Hey Ryan,

     

    Bin file is generated indeed, but it's size is 117208 Bytes .

    The flash size on our CC26x2 MCU is 360k (360448 Bytes exactly) , and in order to burn bin file via serial boot loader 

    I need it (bin file) to be precisely  the same size as my flash, i .e . 360448 Bytes , with CCFG section at the end,

    So, some kind of padding must be done..

    At least this is how stuff worked for us before ,in previous SDK/CCS.

    How can i achieve it?

    BR

    Alik

  • Hello Alik,

    The OAD Image Tool provides padding, did you use this in the past?  I'm not aware of any changes to the CCS tools.  Padding is not a requirement for the ROM serial bootloader so I assume this is for a specific project application need.  There is external hex2bin software you also may be able to consider.

    Regards,
    Ryan

  • Hello Ryan

    The OAD Image Tool provides padding, did you use this in the past?

    We do not use  OAD Image Tool  at all .

    Padding is not a requirement for the ROM serial bootloader.

    True , but i am talking about seral bootloader library (sblAppEx) ,   provided by TI, it communicates with ROM serial bootloader.

    We use it to burn images to flash via serial interface in our product.  Is it still supported?

    The missing part that i found just now and did not mention earlier is that we used cc13x2_cc26x2_app.cmd linker file (may be it helps).

    BR

    Alik

     

  • sblAppEx is still supported, SWRA466, but I haven't known it to require padding.  Do you find anything if you compare the difference in linker files?

    Regards,
    Ryan

  • Well,

    We used simplelink_cc13x2_26x2_sdk_3_10_00_53/examples/rtos/CC26X2R1_LAUNCHXL/ble5stack/simple_peripheral/tirtos/ccs/CC26X2R1_LAUNCHXL_TIRTOS.cmd

    linker file in previous project ,beccause it does not contain OAD defines to reserve flash size.

    And we use the same file in new SDK:

    simplelink_cc13x2_26x2_sdk_4_30_00_54/examples/rtos/CC26X2R1_LAUNCHXL/ble5stack/simple_peripheral/tirtos/ccs/cc13x2_cc26x2_app.cmd

    the only significant  difference  is this:

    /*******************************************************************************
    * ROV
    * These symbols are used by ROV2 to extend the valid memory regions on device.
    * Without these defines, ROV will encounter a Java exception when using an
    * autosized heap. This is a posted workaround for a known limitation of
    * RTSC/rta. See: bugs.eclipse.org/.../show_bug.cgi
    *
    * Note: these do not affect placement in RAM or FLASH, they are only used
    * by ROV2, see the BLE Stack User's Guide for more info on a workaround
    * for ROV Classic
    *
    */
    __UNUSED_SRAM_start__ = RAM_BASE;
    __UNUSED_SRAM_end__ = RAM_BASE + RAM_SIZE;

    __UNUSED_FLASH_start__ = FLASH_BASE;
    __UNUSED_FLASH_end__ = FLASH_BASE + FLASH_SIZE;

    /*******************************************************************************

    It appears in new file (SDK sdk_4_30_00_54), not sure what are those .

    I tried to remove this section and it did not seem to  affect anything... , 

    But i am still digging in..

    Thanks

    BR

    Alik 

  • This is a good investigation path to continue on.  Given the large amount of changes between the v3.10 and v4.30 SDKs (including major CCS version transition), I recommend that you reference the BLE5-Stack Migration Guides and observe the build output behavior of the out-of-box simple_peripheral example.

    Regards,
    Ryan

  • Thanks Ryan

    I am comparing simple_peripheral.syscfg  and project_zero.syscfg

    and it seems like i am comparing apples to oranges since the format / syntax  of those   files seems different to me

    For example:

    from simple_peripheral.syscfg:

    /* ======== Device ======== */
    var device = scripting.addModule("ti/devices/CCFG");
    const ccfgSettings = system.getScript("/ti/common/lprf_ccfg_settings.js").ccfgSettings;
    for(var setting in ccfgSettings)
    {
    device[setting] = ccfgSettings[setting];
    }

    from project_zero.syscfg:

    const CCFG        = scripting.addModule("/ti/devices/CCFG");

    My questions is:

    Have both of those files been generated with the same tool (sysconfig) from the first place?

    What are the differences and how can i add  extra logic  that is present in simple_peripheral,

    sysconfig gui tool does not seem to provide these ability..

    Documentation of xdctools (xdctools_3_61_02_27_core)  provided with ccs1011 , talking about   "Using RTSC with CCStudio v4 "..

    Obviously ,it is out of date,  i am using   ccs10.

    Any help is appreciated.

    Thanks

    Alik

  • These files are not generated with SysConfig, rather they include the instructions for generating output files using SysConfig.  It seems that simple_peripheral is referencing CCFG settings from another location, /ti/common/lprf_ccfg_settings.js.  You can try modifying the file manually inside a text editor if desired.  Note that OAD projects like project_zero and simple_peripheral_oad have device.enableCodeGeneration = false; since the CCFG is maintained by the BIM project.

    Regards,
    Ryan

  • Thank you Ryan,

    It was very helpful

    BR

    Alik