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

What is ?C?LIB_CODE

I found ?CO?LIB_CODE occupy a large address space in
every bank in my project.
What is ?C?LIB_CODE? I've search this keyword on web but I can't find any explanation. Would any one please explain this to me? It looks like I've used some library codes provided by Keil? what kind of codes would occupy this section?
Thank you.

Parents
  • I found some sin, cos, ceil, floor and sqrt operations in my project. Also some floating point operations like
    tmp = (float)x + r * cos(angle);

    Well, as the saying goes: "Don't do that, then!"

    Floating-point arithmetic is just about the last thing on earth you should use an 8051 for. Particularly if you're worried about code size, speed or anything else relating to general efficiency of the code.

    The price for violating this rule is a massive amount of run-time support code. Every single operation involving floating-point numbers will have to be delegated to a library routine. Library functions like sin() and cos() will probably end up outside the specialized library segment, but the implementations of '+', '-', '*', '/' and '=' will be in it.

Reply
  • I found some sin, cos, ceil, floor and sqrt operations in my project. Also some floating point operations like
    tmp = (float)x + r * cos(angle);

    Well, as the saying goes: "Don't do that, then!"

    Floating-point arithmetic is just about the last thing on earth you should use an 8051 for. Particularly if you're worried about code size, speed or anything else relating to general efficiency of the code.

    The price for violating this rule is a massive amount of run-time support code. Every single operation involving floating-point numbers will have to be delegated to a library routine. Library functions like sin() and cos() will probably end up outside the specialized library segment, but the implementations of '+', '-', '*', '/' and '=' will be in it.

Children