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

no FPU in memset

How can I tell the linker/compiler not to use memset/memcpy function which use FPU registers?

For example: SCIOPTA allows to limit the use of the FPU for certain tasks (to improve task-switching). Tasks without FPU may not use FPU registers. But the compiler/linker uses optimized versions of memset() which results in an exception.

I tried to compile C files with --fpu none, but this produces link-timer errors.

Parents
  • Mat,

    the point is our RTOS allows users to disable FPU usage for certain processes (mostly for all but a few) to save context-switch time and stack space. The user is aware that they cannot use printf() or floating point mathematics in these tasks.

    _But_ he is certainly not aware that the compiler uses FPU registers for a memcpy(). So the -no_allow.. option is surely something he needs to apply when compiling those processes. But since 99% of our customers have a single binary, they must link in the FPU version of the library since they use math functions in a few tasks.
    So I see the only way is to remove the optimized function from the library.

    Cheers,

    42Bastian

Reply
  • Mat,

    the point is our RTOS allows users to disable FPU usage for certain processes (mostly for all but a few) to save context-switch time and stack space. The user is aware that they cannot use printf() or floating point mathematics in these tasks.

    _But_ he is certainly not aware that the compiler uses FPU registers for a memcpy(). So the -no_allow.. option is surely something he needs to apply when compiling those processes. But since 99% of our customers have a single binary, they must link in the FPU version of the library since they use math functions in a few tasks.
    So I see the only way is to remove the optimized function from the library.

    Cheers,

    42Bastian

Children