Why do I keep getting "Flash region overflowed" error?
- January 18, 2019
- 2 replies
- 21504 views
Hi everyone)
I've attached project, that I refer further.
I'm trying to write program on my STM32F103(C8T6).
"From scratch" I've made CubeMX project, set all needed pins in modes I need to, generated it.
I've tried to flash a led on a couple of ports, it's ok.
So, next thing, I've converted project to C++, and this is part, when all the fun begins.
I've added function "my_main" to my_main.cpp file, used it from main.c, it worked, but when I tried to call some function from my_main() (HAL_Delay, or one of my class methods), I keep getting errors like "ld.exe: region `FLASH' overflowed by 17904 bytes", it can be caused by "stm32f103_lcd_board.elf section `.text' will not fit in region `FLASH'" or for example '.ARM' might not fit too (I've seen it on a project, that I used previously).
I can't understand, what's wrong, since earlier I've done projects like this with no trouble at all.
So, if someone have a clue, or can check attached project, I'll be grateful)