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.

CCS 4.2 Watch windows cannot deference double variable correctly when using VFP

Other Parts Discussed in Thread: OMAPL138, MSP430F2619

I am using the OMAPL138 and trying to convert the ARM9 (in little endian mode) core to use EABI. It seems to me the EABI standard can only run with the VFPLIB floating point library (can't run with FPA). However, when I use the JTAG to look at double precision variables in the watch window, CCS keeps deferencing the pointer using the FPA format. Does anyone knows how to tell CCS to use the VFP little endian format to show the 64-bit double instead of the FPA format?

Thanks.

Oscar

  • Oscar,

    Can you provide an example of how the variable is declared, what you see in the watch view and what you expect to see?

    Are you using the TI compiler or gcc?

    Regards,

    John

     

  • It was simply declared as: "double per_burst_usecs = 1.5" as a global variable.

    This is what I see. The highlighted line is all garbage.

    However, if you look at the hex value. It is correct if the dereferencing put the "3FF80000" part first and the 0's after that.

    In fact, I am worry about the communication between DSP and ARM core if they are not using the same double precision definition. 

  • Hi John,

    Were you able to reproduce the problem I am seeing? It's getting to be quite troublesome since I can't debug anything data type double. Thanks.

  • Sorry Oscar, I dropped this over the holidays.  I will take a look tomorrow (later this morning actually).

    Regards,

    John

  • Oscar,

    I am looking at this now.  I tried this on another ISA and it was displaying ok.  I am attempting to get something running on an ARM926 target right now but I have a few questions.

    1. Just wanted to confirm that you are using the TI ARM compiler.
    2. Which VFP build option are you using?  VFPv2, vfplib...

    I think I have got it reproduced but want to double check that my options are the same.  I set the float support option to vfplib for my project.

     

    Regards,

    John

  • I have filed a defect to track this: SDSCM00039721 

    I reproduced on a DM6467 which also has an ARM926 on it.

    John


  • I am using the TMS470 v4.6.4 compiler with the EABI, and VFPLIB. Here is the option copied from CCS build properties:

    Compiler: 

    -mv5e -g --exceptions --fp_mode=strict --define=__TMS470__ --include_path="C:/ti4x/ccsv4/tools/compiler/TMS470 Code Generation Tools 4.6.4/include" --include_path="C:/mystuff/projects/SW/Hawk/hawk_main_motor/source" --quiet --display_error_number -me --gen_func_subsections --abi=eabi -k --asm_listing

    Linker:

    -z -m"shell.map" --display_error_number --issue_remarks --diag_remark=10063 --warn_sections -i"C:/ti4x/ccsv4/tools/compiler/TMS470 Code Generation Tools 4.6.5/lib" -i"C:/ti4x/ccsv4/tools/compiler/TMS470 Code Generation Tools 4.6.4/include" --reread_libs --generate_dead_funcs_list="deadFuncs.txt" --entry_point=_c_intOMAP --retain=arm_intvect.obj(*) --rom_model --trampolines=on --zero_init=off

    In the compiler, floating-point library is not specified, but the deafult showing the ASM listing file shows vfplib.

  • Oscar,

    You could also switch to "Legacy COFF" output format as a workaround

    Mandeep

  • Mandeep,

    I thought the COFF is not compatible with EABI. That's what I am using now.

    Oscar.

  • Oscar,

    You are correct if you use EABI you cannot be using COFF.

    John

  • Hi,

    What is the status of SDSCM00039721 ?

    I see wrong double watch on MSP430F2619 , CCS Ver. 5.2.1.00018

    void main(void)
    {
        volatile float f = 1.5;
        volatile double d = 5.36;

        volatile int s_f;
        volatile int s_d;

        s_f = sizeof(f);
        s_d = sizeof(d);

        f = d;
    }

    This is what I see at the end of the execution:

    Note that the HEX format shows only 4 bytes for the double, while I'm expecting to see 8 bytes.

    The Location column implies that 8 bytes are allocated for the double variable.

  • Yoram,,

    SDSCM00039721 was fixed a while back and included in the verision of CCS you are using. Your issue is unrelated to particular CQ.

     Nevertheless, I was able to reproduce your issue on CCS 5.2 and verify it has been fixed in CCS 5.3. Therefore, you need to update to 5.3 to resolve this issue.

    Regards,
    Mandeep