We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
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
"I think Keil does provide an (at least partial) implementation of malloc()" It certainly does! Apart from being a generally Bad Thing on an 8051 (as already noted), be sure to also check out the knowledge base and review the overheads associated with dynamically-allocated memory
library functions like fread, fwrite files on a '51 ??????? Erik