This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMDS64EVM: ThreadX floating point issue.

Part Number: TMDS64EVM

Tool/software:

To whom it may concern,

I have downloaded threadx porting code from https://github.com/TexasInstruments/mcupsdk-core.git 

I've successfully ported threadx on TMDS64EVM board. 

After porting R5F core, I noticed that there is floating point print issue.

Before threads start in main function, if I put the following code, 

main()

  float a = 3.0f;
  DebugP_log("[R5_0] R50 float value %f !!!\r\n",a);

   /* Enter the ThreadX kernel. */
   tx_kernel_enter();

}

it printf "[MAIN_Cortex_R5_0_0] [R5_0] R50 float value 3.000000 !!!"  No issue on floating point print.

Buf after thread execute at thread entry function, the float variable prints weird value.

void tx_application_define(void* first_unused_memory)
{
UINT status;

status = tx_thread_create(&main_thread, /* Pointer to the main thread object. */
                                          "main_thread", /* Name of the task for debugging purposes. */
                                            threadx_main, /* Entry function for the main thread. */
                                            0, /* Arguments passed to the entry function. */
                                            main_thread_stack, /* Main thread stack. */
                                            MAIN_TASK_STACK_SIZE, /* Main thread stack size in bytes. */
                                            MAIN_TASK_PRI, /* Main task priority. */
                                            MAIN_TASK_PRI, /* Highest priority level of disabled preemption. */
                                            TX_NO_TIME_SLICE, /* No time slice. */
                                            TX_AUTO_START); /* Start immediately. */

}

void threadx_main()

{

    float a = 3.0f;
    DebugP_log("[R5_0] R50 float value %f !!!\r\n",a);

}

In threadx_main function, it prints the value as follows,

"[R5_0] R50 float value 32.000008 !!!"

I have enabled, FPU context switching by define TX_ENABLE_FPU_SUPPORT feature but no luck.

Please let us know what part of the code I have to modify.

Thank you,

Sangjoon