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.

TMS320F2800137: data writing issue for the low 32bit for a int64 data

Part Number: TMS320F2800137
Other Parts Discussed in Thread: C2000WARE

Customer found an urgent issue when they tried to write value into a int64(long long) data, with the below codes. As shown in the watch window, lower 32 bit was not written with the expected data.

    static long long s_i64test = 0;
    long long  i64testData;
    for(;;)
    {
        i64testData = 0x12345678987;
        s_i64test = i64testData;
   }

However, they copied the same codes into our example project, "led_ex1_blinky", it worked as below

I checked the complier versions is the same. 

Could you please help check the possible reasons for their project?  Since their project is required to deliver next Monday, we do expect your support today. Thank you!

Their project link:

tidrive.ext.ti.com/.../36f0a855-7eba-42cc-9c18-8b777f68e8aa

  • Hi Aki,

    The link provided doesn't seem to work. Can you please resend?

    Can you view the dissemble to see what is different between the two projects?

    Best,

    Ryan Ma

  • Hi Ryan,

    Please check https://tidrive.ext.ti.com/a/aN51W6redSR63nVd/36f0a855-7eba-42cc-9c18-8b777f68e8aa?l 

  • Hi Aki,

    Are you sure all the compiler options are the same for both the projects? Can you show the dissembly difference between both projects?

  • I used the example of led_ex1_blinky in C2000WARE. You can also check it in your side.

    Compiler summary for customer project:

    -v28 -ml -mt --cla_support=cla2 --float_support=fpu64 --tmu_support=tmu0 -Ooff --opt_for_speed=5 --fp_mode=relaxed --include_path="C:/Users/a0224194/Downloads/TMS280013x for TI/Code/Device/driverlib" --include_path="C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --include_path="C:/Users/a0224194/Downloads/TMS280013x for TI/Code/Device/driverlib/inc" --include_path="C:/Users/a0224194/Downloads/TMS280013x for TI/Code/Device/include" --include_path="C:/Users/a0224194/Downloads/TMS280013x for TI/Code/Device/IQmath/include" --include_path="C:/Users/a0224194/Downloads/TMS280013x for TI/Code/User/Drv/include" --include_path="C:/Users/a0224194/Downloads/TMS280013x for TI/Prj" --advice:performance=all --define=DEBUG --define=_FLASH --c99 --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi

    Compiler summary for example project

    -v28 -ml -mt --cla_support=cla2 --float_support=fpu32 --tmu_support=tmu0 -Ooff --include_path="C:/Users/a0224194/workspace_v12/ccs12_4/F280015_HHC/led_ex1_blinky" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f280013x/common/include" --include_path="C:/ti/c2000/C2000Ware_4_03_00_00/device_support/f280013x/headers/include" --include_path="C:/ti/ccs1240/ccs/tools/compiler/ti-cgt-c2000_22.6.0.LTS/include" --define=_FLASH --diag_suppress=10063 --diag_warning=225 --diag_wrap=off --display_error_number --gen_func_subsections=on --abi=eabi

  • hi Aki, 

    It looks like they have optimized for speed, if you optimize for speed does it have the same behavior? In addition they also have --fp_mode=relaxed set.

  • i did not have the board to test it now. Could you please help check it?

    I don't think it might be the reason, since the optimization level is off for both projects. 

  • Hi Aki,

    I had spoken to our compiler expert on this, seems not to be from the compiler but could be a CCS display issue.

    What version of CCS are they using?

  • Hi Ryan,

    We finally figured out the root cause, that customer selected FPU64 support. 

  • Hi Aki,

    Glad to hear.

    Best,

    Ryan Ma