I am using the STM32F103 (aka "Blue Pill") in the Arduino IDE (1.8.9 running Win 10). I've been using the STM32-patched Arduino IDE for several months now and it works well. However, I've had the following strange behavior:
int SWRValue;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int VSWR100 = SWRValue * 100;
// static float SWRValueOld = SWRValue;
// static int whichBandOption;
float SWRValueOld = SWRValue;
int whichBandOption;
}
The code above compiles to 13028 bytes of flash. When you uncomment the static versions of the data definitions and comment out the non-static definitions, the code size jumps to 78376 bytes. Does anyone have a reason why this might happen??