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.

CC1352R: The CCS IDE generated off-chip OAD image size is not right

Part Number: CC1352R


Software: Code Composer Studio 10.0.0 and simplelink_cc13x2_26x2_sdk_4_20_00_35

Harware: CC1352R

In the example application project simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL, I want to use byte array of big large size 87KB or more larger like as follows:

const uint8_t flash[] =
{
//0x5c00
0x6F, 0x14, 0xA2, 0x93, 0xDE, 0x05, 0xBA, 0x20,
0x5F, 0x42, 0xCC, 0x05, 0x5E, 0x42, 0x09, 0x4D,
0xCE, 0x4F, 0xBE, 0x48, 0x7F, 0x90, 0x0A, 0x00,
0xAD, 0x24, 0x7F, 0x90, 0x0D, 0x00, 0x04, 0x24,
0xF2, 0x90, 0x0E, 0x00, 0x09, 0x4D, 0xA3, 0x28,
0x5F, 0x42, 0x09, 0x4D, 0x1F, 0x53, 0xCF, 0x43,
0xBE, 0x48, 0xC2, 0x43, 0x09, 0x4D, 0xC2, 0x43,
0x20, 0x48, 0xC2, 0x43, 0x30, 0x48, 0xC2, 0x93,
0xBE, 0x48, 0x32, 0x24, 0x4A, 0x43, 0xCF, 0x0A,
0x0D, 0x43, 0x4B, 0x43, 0x6B, 0x93, 0x2C, 0x24,
0x4E, 0x4A, 0xAE, 0x00, 0xBE, 0x48, 0x69, 0x4E,
0x79, 0x90, 0x20, 0x00, 0x11, 0x24, 0x4D, 0x4B,
0x5D, 0x0E, 0x79, 0x90, 0x0D, 0x00, 0x07, 0x24,
0x4C, 0x4F, 0x0C, 0x5D, 0xCC, 0x49, 0x20, 0x48,
......
......
......
}
// Then use above array in init
Display_print1(dispHandle, 0, 0, "%02x", flash[0]);

The build information from CCS is as follows:

Huge arrays:

"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .image_header ==> .image_header
"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .resetVecs ==> .resetVecs
"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .const ==> .const
"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .text.2 ==> .text
"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .rodata ==> .rodata
"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .cinit ==> .cinit

Bigger Huge arrays:

"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .image_header ==> .image_header
"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .resetVecs ==> .resetVecs
"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .const ==> .const
"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .text.1 ==> .text.1
"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .text.2 ==> .text.2
"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .rodata ==> .rodata
"simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .cinit ==> .cinit

But I use our own custom off-chip OAD application with big array based on application example simple peripheral project, then get the following build information:

"simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .image_header ==> .image_header
"simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .resetVecs ==> .resetVecs
"simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .text ==> .text
"simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .const.1 ==> .const.1
"simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .rodata ==> .rodata
"simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .ccfg ==> .ccfg
"simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .cinit ==> .cinit
"simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .const.2 ==> .const.2

And I found the size of generated oad images are almost the same with big huge array or without big huge array but their hex file size are big different, as following tables

Please our hex file, map file and bin file with big array or without big array.

simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs_with_big_array.hex.txt

simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs_without_big_array.hex.txt

simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs_oad_with_big_array.bin.txt

simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs_oad_without_big_array.bin.txt

simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs_with_big_array.map.txt

simple_peripheral_CC13X2R1_LAUNCHXL_tirtos_ccs_without_big_array.map.txt

Any good suggestions?

Thanks.

BRs.

  • Hi,

    Can you use the map file to compare the memory usage of the files instead of the bin/out/hex files? Because then you will see the actual difference in memory usage. 

    Thanks, 
    Elin

  • Hi,

    Yeah, you are right and I have compared the map file and resolved this problem. I want to ask another problem I have come across. I have done the off-chip OAD but when I build the project and output the following information including .ccfg:

    In my understanding, in off-chip OAD application, the BIM will include .ccfg and the application shouldn't include .ccfg. And how can I remove the .ccfg ? Thank you very much.

    BRs.

  • Hi, 

    You are correct, the BIM should include the CCFG, not the application image. You don't have to make any modifications to the project to generate the correct files, you just have to use the OAD file that's generated by the OAD Image Tool and you should be good to go. 

    Thanks, 
    Elin

  • Hi,

    Although I can still use the generated OAD file and everything is OK, it seems that it includes .ccfg in this OAD file. And I found that when I build the TI oad offchip example appliation, I got the following build output information and it can't include .ccfg:

    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .image_header ==> .image_header
    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .resetVecs ==> .resetVecs
    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .const ==> .const
    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .text.2 ==> .text
    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .rodata ==> .rodata
    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .cinit ==> .cinit

    But I build our own cutcom offchip application based on simple peripheral example application and its build output information as I have posted including .ccfg. At same time, I suspect that this problem can be related to link file but I use the same link file in our custom appliation as the same as link file in the TI OAD off-chip example application. Any suggestions to solve this problem?

    Thanks.

    BRs.

  • Hi,

    Why do you want to include the ccfg in the OAD off-chip application? 

    user6319636 said:
    At same time, I suspect that this problem can be related to link file but I use the same link file in our custom appliation as the same as link file in the TI OAD off-chip example application.

    I'd recommend you to copy the files to the project, not link the same file to multiple projects. Which files is it that you are linking to the OAD off-chip project and from where? 

    user6319636 said:
    Any suggestions to solve this problem?

    What kind of problem are you referring to here, not being able to add ccfg or the size of the files? 

    Thanks, 
    Elin

  • Hi,

    I am sorry about confusing you.

    Why do you want to include the ccfg in the OAD off-chip application? 

    No. I don't want to include the ccfg in our custom application. Note When I say OAD off-chip application, this is referred to TI oad offchip example appliation. When I say custom application, this is referred to our custom oad application based on TI original simple peripheral example application(not including OAD function). 

    I want to clarify the ccfg problem as follows:

    When I use TI OAD off-chip application project and build it, I get the following build output information:

    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .image_header ==> .image_header
    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .resetVecs ==> .resetVecs
    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .const ==> .const
    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .text.2 ==> .text
    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .rodata ==> .rodata
    "simple_peripheral_oad_offchip_CC13X2R1_LAUNCHXL_tirtos_ccs.out" .cinit ==> .cinit

    When I use our own custom application and built it, I get the following build output information:

    It includes ccfg. But in my opinion, it shouldn't include ccfg in application. How to solve this problem? 

    What kind of problem are you referring to here, not being able to add ccfg or the size of the files? 

    I have solved the problem about the size of the files. Here I just refer to the ccfg problem.

    Thanks.

    BRs.

  • Hi, 

    Thanks for clarifying. 

    So the ccfg problem that you are referring to is not a problem at all as described in my previous post. The projects in the IDE (either CCS or IAR) include the ccfg to create a valid file to program on a device and the OAD image tool creates a valid OAD file that doesn't include the ccfg. 

    Thanks, 
    Elin