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.

C5535 application larger than 320KB.

Hello All,

I'm using C5535 to develop our audio products. And I know the bootloader will load app into internal 320KB RAM and run it. But my application is too larger, estimate as 512 KB(Code + Data). 

My question is how can I make the 512 KB application running on C5535? ANY suggestion or links to help are very welcome.

Thanks and best regards,

Heming

  • Do you have external memory in your system? Can you give brief details of SW modules and HW memory components in your system. When the software size is more than 320 KB you have to use overlay mechanism by keeping some of your code in external memory. However, feasibility of defining overlays depends on your application. - Pratap.
  • I know the C5535 has no EMIF. So my hardware has no external RAM. I have a 8MB SPI flash for firmware.

    It only have 320KB internal RAM and 8MB SPI flash.

    Do I have to use some DSP with EMIF? 

    If there have a way to dynamic load? How it affect the DSP MIPS if yes?

    Thanks and best regards,

    Heming

  • Yes, there is no EMIF for C5535. I was asking if your system has memory modules like SD card or SPI/I2C flash. So you will be using SPI flash as your boot device.

    If you use DSP with EMIF, you can keep your code in external memories like SDRAM which will be much straight forward from the software design point of view. But this will increase power consumption and MIPS requirement of the system which is not recommended for commercial products in general.

    Defining the overlays for dynamic loading depends on your system design. At any point of time only 320KB of data/code section can reside in internal memory. If it is possible to split the system into multiple modules to fit active code/data section into 320KB, it is feasible to have overlays. When defining the overlays, memory should be divided into, at least but not limited to, two parts. One part to keep the code/data which always resides in internal memory and other to keep dynamically switching overlays. You need to identify which code should always reside in internal memory and which code can be placed in external memory to load dynamically into internal memory. Control code and frequently used modules should be always in internal memory and code which is rarely used can be part of overlay.

    For example consider an audio system having encoder and decoder. For normal audio usecases, either encoder or decoder will be active at any point of time. There will be some modules which will coordinate encode and decode operation. These modules should be always in internal memory and encoder/decoder code/data can be in overlay.  So 'control code + encoder' and 'control code + decoder' alone should fit in 320KB memory to have proper overlays.

    There is no mechanism supported at HW level for dynamic loading of code/data sections of memory. So it should be completely taken care by software. 

    Dynamic loading of overlays increase the MIPS requirement but it will be limited to the time during which overlay is loaded. So it is important to design the overlays to minimize the dynamic loading and MIPS requirement.

    You can refer below links which gives few details on memory management techniques but may not be suitable to your system as memory requirement is much higher

    http://processors.wiki.ti.com/index.php/How_to_Overlay_Initialization_Code_and_a_Heap?keyMatch=overlay&tisearch=Search-EN 

    http://www.ti.com/lit/an/spraa46a/spraa46a.pdf 

    - Pratap

  • You could consider placing less-performance-critical .text and constant data in FLASH, in which case you would not need an overlay.

  • Thank you very much.

  • Thank you,  ,

    Is there any link I can get more detail of it? Since I'm using SPI flash, not a parallel flash chip. I wonder how I can implement in this way?

    Thanks again,

  • I'm sorry, I'm not familiar with the properties of SPI.  The compiler usually considers FLASH as ROM.  If you were to use FLASH, the compiler would treat it just like any other area of memory.  You'd allocate it in the linker command file in the same way.

  • It is not possible to allocate code/data in SPI flash using linker command file. It is only allowed for memories which are interfaced using EMIF (not available on C5535).

    - Pratap.

  • Hi Hemming and Pratap,

    Finally what is the solution for this issue..? I too have a similar issue in my design. In this thread there is a mention of overlaying technique. But since 5535 doesn't have EMIF, how do we manage external memory..?

    Are you guys successful in using the SPI Flash to put the overflowing code/data memory..?

    Any inputs please..?

    Regards,

    Ashok