This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

whether the keil software and embedded c are platform independent or dependent

hi guys

i m an ece student and i have done my project in embedded systems. in that i have AT89S52 micro controller and the software used is keil micro vision. now i have a question whether the keil software and embedded c is platform independent or dependent. please help me

  • Hello JAHNAVI,
    Tools like this are always designed to operate on as many processors as possible, so they're platform-independent, but at some point they need to be able to support specific processors, so they include libraries to support these specifics. The C language, if it's ANSI C, is absolutely platform independent, but many compilers add processor-specific things, or deviate from ANSI-C as needed to make embedded work more efficient.
    Dan

  • With compilers, there are (at least) two platforms involved:

    1. The Host plaform = the platform on which the compiler itself runs;

    2. The Target plaform = the platform on which the generated code runs.

    When the Host & Target platforms are the same, the compiler is called a Native compiler;
    When the Host & Target platforms differ, the compiler is called a Cross-compiler.

    Keil compilers are all cross-compilers: they run on Windows hosts, and generate code for other Targets.

    As they don't run on non-Windows platforms, they are platform-dependent in that sense.

    Similarly, each Keil compiler generates code for only a specific "family" of target architectures - so they are also platform-dependent in that sense.

    But Keil C51 generates code for any Target using the 8051 architecture; it is not confined to any specific 8051-based target - so it is platform-independent in that sense! Similarly for the other toolsets.

  • It depends on how broad (or narrow) your definition of "platform" is...

  • Without the Jargon.

    The Compiler you used will Only work with 8052 based chips. Not AVR, Not ARM, Not PIC, ect.
    The Code you used will Most likely not compiler on a Compiler targeting a different CPU. The Core C parts are compatible. The Rest will not be.
    The Process of converting the non compatible parts to work on the new compiler is called "Porting".