cancel
Showing results for 
Search instead for 
Did you mean: 

what keil c do for me firmware?

wade
Associate II
Posted on April 07, 2006 at 10:57

what keil c do for me firmware?

2 REPLIES 2
jdaniel
Associate II
Posted on May 17, 2011 at 12:10

Wade,

I don't entirely understand what you mean. Was your code written in C? If so, do you just mean that you see symbols in the assembly that didn't exist in your C code? There are a number of reasons for this. The first is, obviously, that Keil will pull in it's libraries for any standard C function calls you make that are part of the c-runtime.

Also, Keil automatically generates code for things you normally take for granted in a C program. For instance, if you have a function:

void foo(void) {

static char i = 10;

...

}

that static variable needs to get initialized somewhere. Keil's compiler generates an init segment that gets initialized before your main() function is called.

There are myriad other reasons that code would be inserted into the assembly that you don't understand.

-Phaze426

wade
Associate II
Posted on May 17, 2011 at 12:10

Hi:

I use keil c compiler my firmware.

I found Keil increase some code in my firmware. Why?

I found ''C?CLDOPTR'' somewhere in my hex code.

what is it doing?

thank you :