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.

CC3235MODS: CC3235sf to CC3235 code porting size issue

Part Number: CC3235MODS
Other Parts Discussed in Thread: CC3235SF, CC3235S, CC3200

Hi,

I have developed an entire application code for cc3235modsf launchpad and it is completely working fine. Now we have a custom hardware designed with cc3235 microcontroller which does not have 1mb flash. When I try to build the same code for cc3235 controller, I am getting compilation error regarding code size. I want to know about the maximum possible partition for code. Bin file generated for cc3235sf is 170kb. I have found that in cc3235.cmd file, there is a SARM partition is declared. I want to modified this partition for maximum code size. 

Thanks

  • Hi,

    There is no exact answer to your question. It depends on size of RAM used by your project. CC3235S have 256kB RAM only. Into this memory need to fit your code and data (variables, buffers, stack, heap) as well.

    At first step provide results from memory allocation tool from your SF project. From that results we will see if your data and code fit into 256kB RAM. If not, you will need do some optimization (e.g. enable optimisation in compiler, decrease size of buffers/variables, remove some features from your code).

    Jan

  • Hi,

    Here I have attached the memory allocation for CC3235SF controller.

  • Hi,

    Memory requirements of your application are too high and your application cannot fit into CC3235S (your application needs 305kB of RAM but CC3235S have only 256kB RAM). You have options:

    • stay with SF device
    • reduce memory requirements of your application

    As optimization you can try:

    • enable optimisation in compiler. This will save few kB of code, but it will be harder to debug your code via JTAG/SWD
    • you can consider to decrease size of heap section depending on dynamic memory allocation requirements
    • decrease size of bss section (remove some variables and buffers)
    • decrease size of code - by removing features of optimization of your code

    Jan

  • Hi,

    After removing the local ota portion from the code, It is compliable for CC3235, but the size of bin file generated for CC3235 is about 232kb. If I compile the same code without removing local ota, the size of generated bin file is 170kb. can you please help me to understand, why this different size of bin generated ? memory allocation for cc3235 after removing local ota,

     

  • Hi,

    At image above 233kB is not code only. It is sum of code + data.

    Jan

  • Hi, 

    In that case, can we use 4MB flash for programming purposes? 

  • Hi,

    No. SPI flash cannot be used for execution of code at CC32xx devices. It is used as primary storage for application code, storage for NWP ServicePack, storage for NWP configuration, storage for webpages, etc.

    At boot time is file with application code loaded by ROM bootloader into RAM at CC3235S device. Application code is executed from RAM only. It may to exist some advanced techniques how to split code into more parts and load them into RAM separately when needed. This is demonstrated at example "dynamic_lib_loader" inside CC3200 SDK. This SDK is for 1st generation devices and is not compatible with CC3235. But you can use this as inspiration. Implementation will be up to you only. But without deep knowledge of CC32xx devices, Cortex-M4 cores and linker scripts, you will not be able manage this way.

    Jan

  • Hi, 

    Thanks for your support to understand this memory related issue.

    Thanks