Getting an error message "region m_text overflowed with text and data" in MCUXpresso IDE

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Getting an error message "region m_text overflowed with text and data" in MCUXpresso IDE

跳至解决方案
2,456 次查看
oswaldo-153
Contributor III

HI, I´ve found the same problem on a previous topic, but it didn´t include the solution.

I am working with MCUXpresso, and lvgl.
I am developing a graphical interface with the OM13098 development board: LPCXpresso54628 when adding an event or adding two images generates the error region m_text overflowed with text and data, in MCUXpresso modify in C / C ++ Build- Settings- Optimization-optimization level and change None for optimization for size, but I did not get any results, I also modified the PROGRAM FLASH size value in MCU settings and I did not generate any error but the program did not run correctly.

 

标签 (1)
标记 (1)
0 项奖励
回复
1 解答
2,441 次查看
converse
Senior Contributor V

IIRC, the LPC54628 has 512kb of flash. From your description, it looks like you are trying to place images into the same area as your code (and initailised data) - this is known as text and gets placed into the text region of your application, which by default get placed into on-chip flash. Images are typically very large and can quickly fill the on-chip flash. You will need to place the images into off-chip memory, and I see the LPCXpresso54628 board has a 128Mb of off-chip (QSPI) flash - this is the idea location for your images.

在原帖中查看解决方案

0 项奖励
回复
5 回复数
2,442 次查看
converse
Senior Contributor V

IIRC, the LPC54628 has 512kb of flash. From your description, it looks like you are trying to place images into the same area as your code (and initailised data) - this is known as text and gets placed into the text region of your application, which by default get placed into on-chip flash. Images are typically very large and can quickly fill the on-chip flash. You will need to place the images into off-chip memory, and I see the LPCXpresso54628 board has a 128Mb of off-chip (QSPI) flash - this is the idea location for your images.

0 项奖励
回复
2,417 次查看
oswaldo-153
Contributor III

Is there an example of how to save to QSPI?

0 项奖励
回复
2,411 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello oswaldo-153,

You need first config the SPIFI module before use it,  refer to SPIFI demo under SDK.

 

BR

Alice

0 项奖励
回复
2,444 次查看
frank_m
Senior Contributor III

> m_text: 954880 B 511 KB 182.49%

That looks quite bad. Almost twice the amount of flash you have available.

If you cannot reduce the size of your application, try external Flash, as suggested. Most GUI resources are not required at startup, and can be loaded on demand during runtime. But this will require some extra effort to adapt linkage, and probably additional code.

I think you are already on the device with maximal available (internal) flash.

0 项奖励
回复
2,449 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

 

Hello oswaldo-153,

From log we can see your code overflowed, you can try to reduce code size, if still can't work, add

external flash.

 

m_text: 954880 B 511 KB 182.49%

0 项奖励
回复