Forum : ARM
Original Post
Post Information | Post |
---|---|
November 4, 2008 - 5:03pm
|
Hi all, i'm new to the STM32 AND new to the RIDE-Environment. There is actual one short question: How can i figure out what is the code size of the generated code. Additional: Is there any possiblility to genereate a checksum or similiar as i knwo this from IAR? Please help me on this topics! Thanks |
You should find blue text in your project manager window next to each file e.g. text=xxxx data=xxx bss=xxx. The same text is written next to name of a project and this is size of a project.
Download latest version of Ride 7 it used to disappear sometimes before.
Thanks,
i have seen this data, but couldn't believe that i have to take the number after the word "text" as as code size!
Hi Socrates,
Can you verify it? I post this information but I have never test it in reliable manner ...
yes, it is common for software tools to refer to the section containing the executable code as "TEXT"
no doubt there is some historical reason for this - it is left as an exercise for the reader to pursue this if so inclined...
Hi jaroslwa.oska,
yes it seems to be the correct code size!
Thanks again
I noticed that if the initialization structure (for example):
GPIO_InitTypeDef GPIO_InitStructure;
is declared outside main() and all the other functions, the code is smaller than declaring it inside a function:
void GPIO_Configuration(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
.....;
.....;
}
But why? Shouldn't it be the opposite?
You can't conclude that on a general note - It depends on many things, like if the Compiler is able to assign the locally defined variables to a register without having to generate extra code to handle it, or if the compiler is creating the variable on the stack. You will have to look at the list files and find your answer.. This is an important step when trying to generate optimal code, on a side note the gcc compiler is not as efficient as Keil's ARM compiler when it comes to generate efficient code without twiddling a bit with your source, however you can't beat the price!
/Henrik