11
\$\begingroup\$

I am using TM4C1230C3PMI controller from Texas instrument in one of my project. It has 32KB of internal flash, which is not sufficient for my application. Higher flash sized micro-controller are available in the market which can be used but I want to go with this micro-controller only. As per my knowledge external EEPROM can be used to increase the total flash size (Program memory).

Is my thinking is correct?

If not please suggest how can I increase the total flash memory size of the controller?

\$\endgroup\$
22
\$\begingroup\$

You cannot extend the program memory (flash). TI produces the same chip with double the flash and RAM, but nothing else changed: TM4C1230D5PMI.

If you cannot use a chip with larger flash, you will have to reduce your code size:

  • Disable debugging, such as the expensive printf function. A printf that supports floating point output will typically set you back around 5KB-10KB.
  • Make sure you compile with optimization enabled - typically the compiler flag is -Os.
  • Modern compilers can do link time optimization (LTO). With gcc, you get this with -flto. You have to pass -flto to both compilation and link stages, for all files. This typically reduces the produced code size by 30%-50%.
\$\endgroup\$
2
\$\begingroup\$

You might get the smallest software footprint by using assembler and a Forth-like language designed for your purpose. Another is compressed machine code if there is a lot of almost identical code.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.