Compiling 'Test' for 'Generic STM32F103C series'
ld.exe: C:\Users\[USER]\AppData\Local\Temp\VMicroBuilds\Test\Arduino_STM32_genericSTM32F103C\Test.ino.elf section .text will not fit in region rom
ld.exe: region rom overflowed by 35592 bytes
libnosys.a(sbrk.o)*: In function _sbrk
sbrk.c*: (.text._sbrk+0x30): warning: undefined reference to end
collect2.exe*: error: ld returned 1 exit status
Error compiling for board Generic STM32F103C series
But the entire project is 32K, and STM32103C8 has 65K flash. What is going on ?
But the entire project is 32K, and STM32103C8 has 65K flash. What is going on ?
And yes I read somewhere that C8 also have 128KB and it works. But problem remains how a 32K sketch became 100K sketch?
One possible thing could be the Adafruit libraries using int.
This has been posted about elsewhere on the forum and can’t be avoided as we use the normal ARM libraries
Can you post the arduino IDE error? Maybe it provides some more useful information..
Can you post the arduino IDE error? Maybe it provides some more useful information..
C:\Users\Banana\Documents\Arduino\hardware\Arduino_STM32\STM32F1\libraries\Adafruit_ILI9341_STM
I haven’t used it but it says it is modified to work for the STM
32K? Isn’t it the size for the Mega2560?!
32K? Isn’t it the size for the Mega2560?!
You can also try to optimize yourself some library commenting unneeded code.
Only you know your code so only you can decide what you need and what you don’t..
You can try playing with the compiler options in order to try to optimize the code size.
Finally you can go back to AVR..
No magics as far as I know.
Edit: you can also buy ARMs with bigger flash, 128k for an arm seems to me a very minimum and you were using an avr with 256k…
You may just need to modify a linker file and the boards.txt file
103xC: 48k ram – 256k flash
103xE: 64k ram – 512k flash

![[SOLVED] Discovery STM32F100RB — Trouble with timers and library structure](https://sparklogic.ru/wp-content/uploads/2019/11/st-stm32vl-discovery-90x90.jpg)
