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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
2,494 Views
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.

 

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
2,479 Views
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.

View solution in original post

0 Kudos
Reply
5 Replies
2,480 Views
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 Kudos
Reply
2,455 Views
oswaldo-153
Contributor III

Is there an example of how to save to QSPI?

0 Kudos
Reply
2,449 Views
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 Kudos
Reply
2,482 Views
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 Kudos
Reply
2,487 Views
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 Kudos
Reply