I am having some debugging issues with Keil uVision5 eval (free) version. Now the STM32F030F4P6 has 16K bytes, and when I compile my program, it is approaching the memory limits. Below is the code size:
Program Size: Code=15524 RO-data=300 RW-data=540 ZI-data=2460
Here is my specific problem. I have two functions:
double GetSingleCellVolt(int cell);
void GetCellVoltArray(double *pa_volt)
call GetSingleCellVolt(int cell);
Now when I call GetCellVoltArray() by itself, then it always returns 0 regardless.
But if I call GetCellVoltArray() which calls GetSingleCellVolt(), then it works fine.
Now when I step inside the function GetSingleCellVolt(), to debug, the codes seem
to be executed in wrong order. For example, line 4 gets executed before line 3 ....
And there are variables inside GetSingleCellVolt() cannot be viewed because the
debugger complains that the variable is "not in scope" but clearly the variables are
inside the function.
I don't know if this problem is specific to my case since my guess is my memory
limit is right up to the uC limit or it's something else.