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.

CC3200: Program Memory Issue

Part Number: CC3200
Other Parts Discussed in Thread: CC3220SF

Dear team,

Currently I'm getting an linking error as shown below

Error:- #10099-D: program will not fit into available memory.

This error occurs when I use a structure with roughly 200kb of size. If I remove the structure and build the code, it does not throw any errors.

I guess this structure does not fit in the data section, if so can you please provide with a proper solution? 

Looking for a quick response.

Thanks in advance.

  • Hi,

    CC3200 have 256kB RAM only. Into this RAM you need to fit your code, variables, structures, stack, heap. It is unlikely that you will be able use structure with size 200kB with some other bigger code.

    In case of that CCS IDE is used, you can use memory allocation tools to see memory requirements of your application.

    Jan

  • Hi,

    As Jan pointed out, the CC3200 only has 256KB of RAM, in which you need to fit all of your program's code and data memory.

    If you need that struct in your program there are a few options to explore:

    1. Try turning on compiler optimization to max settings. Depending on your code, it may or may not provide large space savings, but it is worth trying as a first step.

    2. Instead of statically declaring the struct as 200KB from the start, see if you can keep it stored elsewhere until it is needed for use. The CC3200 has a persistent serial flash that you can use for file storage, and if you have const data for example that you only need to access infrequently, then you can simply store this data as a file on the serial flash, and then read chunks of it at a time when needed. If your struct is more of a scratch buffer, see if you can rework your program to use smaller chunks, possibly even dynamically allocated from the heap so that you don't need all 200KB allocation at the same time.

    3. Change to the CC3220SF device. This device has 1MB of on-die flash that can be used for code memory, thus offloading all of the memory taken up by your code from the RAM and letting use it for your struct. While you will still need to see if all of your non-code data can fit into RAM, it will be much easier to do so if you have the extra 1MB for code.use.

    Using the memory allocation tool of CCS or your IDE to see what the current allocation is would be a good first step, so that you can understand how much memory you need to free up and what options might be useful. You can use the view->memory allocation interaction to show the memory footprint of your program.

    Please review the memory allocation as well as the options above and let us know the details of your struct and mem allocation so that we have a better understanding of your use case.

    Regards,

    Michael