Page 1 of 1

most storage is full before compile, why?

Posted: Sun Oct 17, 2021 1:33 pm
by emid
Hi everyone,

I use stm32f030f4 in Arduino, i made a blankproject and compile it, but it uses 7992 bytes (48%) of program storage space and Global variables use 824 bytes (20%) of dynamic memory!!! why?

how can i reduce it?

Best regards.

Code: Select all

sourcecode:
void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}
end Export:

"Sketch uses 7992 bytes (48%) of program storage space. Maximum is 16384 bytes.
Global variables use 824 bytes (20%) of dynamic memory, leaving 3272 bytes for local variables. Maximum is 4096 bytes."

Re: most storage is full before compile, why?

Posted: Sun Oct 17, 2021 1:54 pm
by mrburnette
This question has been asked and answered so many times...

viewtopic.php?t=1071

viewtopic.php?t=986

... and more times that I can count on the old forum and on Arduino.cc.

https://forum.arduino.cc/t/why-does-eve ... bytes/5735

Ray

Re: most storage is full before compile, why?

Posted: Mon Oct 18, 2021 3:02 am
by ag123
for very small storage / memory systems, some resort to assembly language to save every byte