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.

PROCESSOR-SDK-AM62X: How to optimize M4F program memory?

Other Parts Discussed in Thread: SYSCONFIG

Ok, thanks Nick.

In that case, I will remove the endpoints used to run the echo test to conserve the program memory.

By the way, what do we do if we run out of program memory while developing the application on M4F core ?

rgds,

kc Wong

  • For future readers, 
    This thread is a continuation of the discussion at 
    https://e2e.ti.com/support/processors-group/processors/f/791/t/1345892

    Hello KC Wong,

    The M4F does not have a cache like R5F cores do, so you generally want to store your instruction code locally. For more information about running instruction code that is NOT stored within the M4F subsystem, refer to https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1187962/faq-sk-am62-how-to-execute-code-from-external-memory-using-m4f-core

    In terms of optimizing code size, there are several tricks I am aware of.

    For one, disable all the drivers that you are not actually using - so for example, if you were NOT using RPMsg to communicate with Linux, you could reduce the size of your code by removing all the RPMsg drivers and code from your project & SysConfig project.

    Symbols are EXTREMELY useful for debugging your code (that's how CCS is able to map a project's source code to the actual code running on the M4F). However, symbols also take up space (at least in the binary). I know stripping out symbols can reduce the size of the binary file, but I am not sure if it also reduces the amount of data used in memory.

    I am sending your thread to another team member to see if they have any additional feedback on how to optimize code size, or how storing data or instructions outside of the M4F memory could impact your program's execution speed.

    Regards,

    Nick

  • Hi Nick,

    Ok, I am thinking to remove this UART to further conserve the program memory.

    Just to check, what is the purpose of this UART in "ipc_rpmsg_echo_linux" example application?

    rgds,

    kc Wong