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

ansi c library support

we are using cypress fx-2 development
board which has an evaluation version of c-51
compiler (for 8051 microcontroller).

we want to include ansi c library functions like fread, fwrite , malloc etc and compile
the code and port it into the target board.

bcause the above mentioned ansi c library
is not supported by c-51, is there any other
way of acheiving the ansi c library porting?
if so, then please explain how..

also, will it run on the 8051 microcontroller?
Urgent reply is appreciated.

Regards,
mahesh

Parents
  • I think Keil does provide an (at least partial) implementation of malloc(), but I'd strongly recommend *not* using malloc() in an 8051 environment unless you have a very good reason.

    "bcause the above mentioned ansi c library
    is not supported by c-51, is there any other
    way of acheiving the ansi c library porting? if so, then please explain how.."

    Any way other than what? If you need functions that Keil doesn't provide you'll have to write them, in exactly the same way you'll have to write the rest of the code for your project.

    "also, will it run on the 8051 microcontroller?"

    That's the general idea.

    Stefan

Reply
  • I think Keil does provide an (at least partial) implementation of malloc(), but I'd strongly recommend *not* using malloc() in an 8051 environment unless you have a very good reason.

    "bcause the above mentioned ansi c library
    is not supported by c-51, is there any other
    way of acheiving the ansi c library porting? if so, then please explain how.."

    Any way other than what? If you need functions that Keil doesn't provide you'll have to write them, in exactly the same way you'll have to write the rest of the code for your project.

    "also, will it run on the 8051 microcontroller?"

    That's the general idea.

    Stefan

Children