Hi,
We are using KL03 chip with KDS 3.1.0 and PE , "debug console" and "fsl-i2c" components from PE are used, In the code when I am adding some mathematical calculations of float values, the memory is getting overflowed and showing errors as
make: *** [test.elf] Error 1
region `m_text' overflowed by 1092 bytes
region m_text overflowed with text and data
test.elf section `.text' will not fit in region `m_text'
已解决! 转到解答。
Hi syed idris
The problem is because of the code size in .text is too big to fit in m_text section. Unfortunately Processor expert comes with overhead due to the implement of code that is no used, it will increase your size code and it’ll be a little difficult to reduce 1092 bytes your size code.
You can try the -Os in the settings options
Can you share your project? if you are no using OSA components other options are; Instead of using Peripheral Driver, use just HAL APIs. PD functions have OSA support and it's not suitable for optimum code size, but sure, this highly depends in your application, when HAL APIs are used, the OSA can be removed then to reduce size. Also you can remove utilities under platform, the debug utility can be removed to reduce size.
You can also check the post: https://mcuoneclipse.com/2012/11/11/optimizing-the-kinetis-gcc-startup/
Hope this information help you
Have a great day,
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi syed idris
The problem is because of the code size in .text is too big to fit in m_text section. Unfortunately Processor expert comes with overhead due to the implement of code that is no used, it will increase your size code and it’ll be a little difficult to reduce 1092 bytes your size code.
You can try the -Os in the settings options
Can you share your project? if you are no using OSA components other options are; Instead of using Peripheral Driver, use just HAL APIs. PD functions have OSA support and it's not suitable for optimum code size, but sure, this highly depends in your application, when HAL APIs are used, the OSA can be removed then to reduce size. Also you can remove utilities under platform, the debug utility can be removed to reduce size.
You can also check the post: https://mcuoneclipse.com/2012/11/11/optimizing-the-kinetis-gcc-startup/
Hope this information help you
Have a great day,
Jorge Alcala
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------