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

Initialize a const floating point with an raw binary value

Hello,

is there a way to initialize a floating point constant (code memory) with a raw binary value? Because we use a few special NAN flags and I cant initialize them using the CX51 compilier. With the IAR compilier I used a union and specified if the value should be interpreted as integer or floating point but with the CX51 compilier this is not possible for constant values because the compilier does not support this kind of initialization. It is part of C99 Standard but CX51 is C90. Maybe there is another way to do this.

Best regards

Parents
  • If copy is a real copy than I have no problem. The code is already running on an Cortex M0+ which has also no FPU.

    I only miss a compilier which supports C99. Maybe sdcc or iar is a better solution for future if the ARM company is not interested in the further development of the tool chain. Given the age of the C99 standard, this can be assumed.

Reply
  • If copy is a real copy than I have no problem. The code is already running on an Cortex M0+ which has also no FPU.

    I only miss a compilier which supports C99. Maybe sdcc or iar is a better solution for future if the ARM company is not interested in the further development of the tool chain. Given the age of the C99 standard, this can be assumed.

Children