Part Number: MSP432P401R
Tool/software: Code Composer Studio
Hello,
I am measuring the usage of STACK segment at SRAM.
For the test, a program was designed to have the various number of local variables, such as 10, 100 or 1000.
(My experiment was on MSP432P401R evaluation board using Code Composer Studio v7.)
As the experiments proceeded, however, something strange happened.
That is, the number of local variables affects the assembly code of the program.
If the number of local variables is 10, LDM or STM assembly codes were used to store on the STACK.
But, as the number of local variables is larger than 100, another function was called.
The name of the function is "__aebi_memcpy(), __aebi_memcpy4(), __aebi_memcpy8(), memcpy() ", specified with '.asmfunc stack_usage(0)' containing PUSH and POP codes.
(All of the assembly codes and function callings were checked on the debugging mode of CCS v7.)
1. I concluded this situation happened because of the optimization of the arm compiler (such as inlining of function).
Is this a proper guess? or Is there any other reasons for this?
2. If so, I would like to make compiler not to use the function arbitrarily.
Which means, I would like to make my program use only assembly codes like LDM or STM, not memcpy().
I already used one of the compiler option named --disable_inlining, but nothing worked.
Is there any way to do?
Thank you