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
  • we want to include ansi c library functions like fread, fwrite, ...

    To add support for fread, fwrite, and so on you must...

    1. Decide on what kind of mass storage device you will use (floppy drive, IDE hard drive, FLASH memory, bubble memory, ...).

    • Create low-level routines to read and write sectors and to format your medium. This would be similar to the BIOS Int 13h routines.

    • Obtain, license, or create your own file system based on DOS, NTFS, HPFS, FAT12, FAT16, FAT32, or whatever else that works with your low-level drivers.

    • Write the fread, fwrite, etc. functions that will work with your file OS services.
    • It's probably a good idea to include error detection (like if the floppy or hard drive is full) and display diagnostic messages on the screen or LCD. That assumes that you have a screen or LCD.


    Jon

Reply
  • we want to include ansi c library functions like fread, fwrite, ...

    To add support for fread, fwrite, and so on you must...

    1. Decide on what kind of mass storage device you will use (floppy drive, IDE hard drive, FLASH memory, bubble memory, ...).

    • Create low-level routines to read and write sectors and to format your medium. This would be similar to the BIOS Int 13h routines.

    • Obtain, license, or create your own file system based on DOS, NTFS, HPFS, FAT12, FAT16, FAT32, or whatever else that works with your low-level drivers.

    • Write the fread, fwrite, etc. functions that will work with your file OS services.
    • It's probably a good idea to include error detection (like if the floppy or hard drive is full) and display diagnostic messages on the screen or LCD. That assumes that you have a screen or LCD.


    Jon

Children
  • so on you must...
    specify the hardware platform in detail.

    I am sure it will make a lot Of Keil customers ecstatic if Keil specified a hardware design as a requirement for using theit compiler for embedded processors.

    It is so amazing how many thinkjj C is C. The difference between PC C and embedderd C is huge.

    Erik