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.

build project in CCSv5 using gcc

Genius 5785 points
Other Parts Discussed in Thread: DM36XCODECS

Hello,

I'd like to build project in CCSv5 using gcc. It's CodeSourcery arm-2009q1-161-arm-none-eabi. I referred to the site below.
http://processors.wiki.ti.com/index.php/Building_Starterware_projects_in_CCSv5_using_GCC
http://www.ti.com/tool/dm36xcodecs

I saw the warning about unmatched enumeration. I understood that I have to link some object files using 32-bit enumeration. These object files are DM36x codec from TI.

C:\Program Files\CodeSourcery\Sourcery G++ Lite\bin\arm-none-eabi-ld.exe: warning: '/cygdrive/d/soft/test_project/libjpgenc.a'(jpegenc_ti_ires.o) uses 32-bit enums yet the output is to use variable-size enums; use of enum values across objects may fail

So, I added compiler option with -fno-short-enums. Then it's OK to link these object files correctly. But libgcc.a has similar warning.

C:\Program Files\CodeSourcery\Sourcery G++ Lite\bin\arm-none-eabi-ld.exe: warning: C:/Program Files/CodeSourcery/Sourcery G++ Lite/lib/gcc/arm-none-eabi/4.3.3/libgcc.a(_divdi3.o) uses variable-size enums yet the output is to use 32-bit enums; use of enum values across objects may fail

I can resolve this warning by adding linker option with --no-enum-size-warning. But I don't know whether cpu semantics are correct. Should I rebuild gcc library with 32-bit enums?

Regards,
Kazu

  • In this forum we only support the Linaro ARM gcc compiler which ships with CCS.  That is not the ARM compiler you are using.  Nonetheless, I can make some general comments that might be helpful.

    This is not a CCS issue.  I suppose you could say this is a gcc issue, but I don't agree with that.  I think it is a library documentation issue.

    Everything in the link must agree on how enumerated types are handled.  Either -fshort-enums or -fno-short-enums.  Every library you link with should have documentation which indicates how it handles that issue.  I expect you would find something about how the library is supplied.  If it doesn't supply both forms, then I expect you would see how to rebuild the library for the other form.  I would be surprised if a library can only ever be used in one way, but that is possible.

    Thanks and regards,

    -George