Keil Logo Arm Logo

ARMCC: PRINTF OUTPUTS 0.000000 FOR FLOAT VARIABLES


Information in this article applies to:

  • RealView C Compiler Version 3
  • RTX Real-Time Operating System

QUESTION

I am using the RTX Kernel in my project. When I use printf (or a derivative such as sprintf, snprintf) in my source code together with float number, the only 0.000000 is printed.

What can be wrong?

ANSWER

This problem is caused by a mis-aligned stack (R13) register at the start of the task. It is important that the stack is 8-byte aligned.

Most likely you have an older version of the RTX_CONFIG.C file. Make sure that include a current version of the RTX_CONFIG.C file in your project.

Another reason for this problem might be that you have used the function os_tsk_create_user_ex or os_sys_init_user with an stack that is not 8-byte aligned.

MORE INFORMATION

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Tuesday, December 11, 2007


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

ARM’s Privacy Policy has been updated. By continuing to use our site, you consent to ARM’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.

Acquisition of ARM Holdings plc. by SoftBank Group Corp.

We are pleased to inform you that on 5 September 2016, SoftBank Group Corp. acquired ARM Holdings Plc. ARM will continue to operate as an independent business within the SoftBank group.

Any current agreements between ARM Ltd (or other ARM group companies, as applicable) you / your company remain in effect as between the parties, and the parties will continue to be bound by and perform the obligations in such agreements. If you have any queries please direct these to ARMSoftbank-Notifications@arm.com.