I have been successfully uploading code to a Nucleo-32 board until a little while ago. Now sometimes when I compile the code I get this error saying the flash has been exceeded. I compiled Blink and it worked, but it said it used 97% of the program storage space. It seems like every time I compile a new sketch, the program storage of the previous sketches gets added to the compiler's calculations.
Here is what I'm using:
Nucleo-32 STM32L031K6
Arduino IDE 2.1.0
Windows 11
Arduino_Core_STM32 v2.5.0
Here is the part of the compiler output for blink
Code: Select all
Using library SrcWrapper at version 1.0.1 in folder: C:\Users\64204\AppData\Local\Arduino15\packages\STMicroelectronics\hardware\stm32\2.5.0\libraries\SrcWrapper
"C:\\Users\\64204\\AppData\\Local\\Arduino15\\packages\\STMicroelectronics\\tools\\xpack-arm-none-eabi-gcc\\12.2.1-1.2/bin/arm-none-eabi-size" -A "C:\\Users\\64204\\AppData\\Local\\Temp\\arduino\\sketches\\43FC912ACB8ECD750B945ECE697AA47A/Blink.ino.elf"
Sketch uses 31876 bytes (97%) of program storage space. Maximum is 32768 bytes.
Global variables use 1412 bytes (17%) of dynamic memory, leaving 6780 bytes for local variables. Maximum is 8192 bytes.
1 File(s) copied
Upload complete on NODE_L031K6 (F:)
Code: Select all
c:/users/64204/appdata/local/arduino15/packages/stmicroelectronics/tools/xpack-arm-none-eabi-gcc/12.2.1-1.2/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\64204\AppData\Local\Temp\arduino\sketches\2835662659F8FBB1FB8069AC10B587E7/Fade.ino.elf section `.text' will not fit in region `FLASH'
c:/users/64204/appdata/local/arduino15/packages/stmicroelectronics/tools/xpack-arm-none-eabi-gcc/12.2.1-1.2/bin/../lib/gcc/arm-none-eabi/12.2.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 6540 bytes
collect2.exe: error: ld returned 1 exit status
exit status 1
Compilation error: exit status 1
Any help would be greatly appreciated:).