2021-05-04 03:19 AM
Hello everyone,
I am working with stm32f070c6 , I am developing an application of USB_CDC , When I build the project it is showing the error of
1. .text' will not fit in region `FLASH'
2. `FLASH' overflowed by 12480 bytes
actually I had increase the heap size to 0x400 and stack size 0x400, In my program I am using a buffer size of 64 bytes,
can you please help me out how to overcome flash overflow error.
Solved! Go to Solution.
2021-05-08 03:39 PM
A few things I do with every ARM Cortex:
If none of these do the trick, then there must be something in your project that allocates large chunks of FLASH. Any large static const arrays, by any chance?
2021-05-04 08:15 AM
Options:
2021-05-04 12:36 PM
Perhaps review what exactly you have sucking up all the resources, is it code, or static data?
You can perhaps tell the linker it has more memory to work with so it can get closure, and then inspect the .MAP to determine the resource hogs.
Bitmaps? Data Tables?
Are you using a lot of heap space? How much stack is actually being utilized?
2021-05-04 10:09 PM
Thanks for your reply @TDK is there any alternatives to overcome that flash overflow error, I reduced the static variables in my program but the problem is remains same
2021-05-04 10:18 PM
2021-05-08 03:39 PM
A few things I do with every ARM Cortex:
If none of these do the trick, then there must be something in your project that allocates large chunks of FLASH. Any large static const arrays, by any chance?
2024-05-17 01:50 AM
Can you elaborate on how to make these changes? I'm a newbie to CubeIDE. Thanks!