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.

TMS320F28388D: Linker error with Flash API liibrary

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

I am trying to use the Flash API on a TMS320F28388D with the TI Clang v.2.1.2.LTS compiler.
On the C28 core everything worked out well, I was quickly able to erase and write flash sectors.

The CM/M4 core is where the problems start. Using include and lib from C2000Ware_4_03_00_00 looked good, substituting the M4 variant for C28. But - when building, the linker complains:
error: file
"C:/[...]/driverlib_cm4/Debug/driverlib_cm4.lib<ethernet.o>" has a Tag_ABI_VFP_args attribute value of "0" that is different than one previously seen ("1"); combining incompatible files
There are two more errors, quite similar to that.


I found out that this tag corresponds to CCS project setting CCS Build/Arm Compiler/Processor Options/-mfloat-abi (hard or soft).
The armofd tool does not reveal where a 1 may come from, all our modules explicitly set 0 (" soft" in CCS project settings). The tool does however show that the Flash API has the tag set to 3, meaning it should match everything. (armofd output can be confusing, since usually 0 isn't explicitly written, since it's the default)
We use a couple of 3rd party libraries (driverlib_cm4.lib, FreeRTOS.lib, lwip.lib) and some of our own libs. But even on those, armofd shows no 1 setting, including all *.o.
Sadly, even setting linker to verbose diagnostics doesn’t tell where it has seen a 1 tag.

We found out that omitting the extern "C" declaration around the #include "F021_F2838x_CM.h" gets rid of the linker Tag_ABI_VFP_args error.
But as soon as I actually *use* a function from Flash API, nothing from the Flash API is found ("unresolved symbols remain"), not even the simplest Fapi_getFsmStatus(). And, since we are using C++, I’d expect the C linkage to be required (and C++ name mangling surely can interfere with symbol resolution).
Modifying the flash lib or path string to an invalid setting makes the linker cry about lib not found - so both appear to be correct, and it opens the right file. (And yes, I'm not linking with the C28 lib ;-)


It's quite bizarre – linking without using a flash API function is enough for the linker to see something it doesn’t like. But when it is told to use a flash API function it can’t find any functions.

Someone had the same problem with both flash API and lwip:
TMS320F28388D: LWIP Issues - C2000 microcontrollers forum - C2000Tm︎ microcontrollers - TI E2E support forums
But there hasn’t been a resolution in the end.

Can anyone shed some light on this?

  • Hi Christian,

    We will be able to review this and get back to you on July 14th.

    Thanks and regards,

    Vamsi

  • Hi Christian,

    Our compiler team is reviewing this.  I will get back to you by mid next week with their comments.

    Thanks and regards,

    Vamsi

  • Hi Christian,

    Please send me a friend request by hovering over my name.  We would like to discuss this with you offline to understand further.

    Thanks and regards,
    Vamsi

  • Hi Christian,

    Please note: E2E forum will not be available up to July 24th due to maintenance. 

    Thanks and regards,
    Vamsi

  • Hi Christian,

    I am closing this post since I did not hear from you in the last 3 weeks.

    Please open a new post if you have further questions.

    Thanks and regards,

    Vamsi

  • Hi Vamsi,

    This has been on hold, since I had to look after a different top priority customer problem, and until the end of this week I'm on summer vacation.

    I didn't have any progress on this linker error yet. I'm still looking for any kind of help.

    kind regards

    Chris

  • Hi Christian,

    Ok, you can come back here when you are back to office.

    Thanks and regards,

    Vamsi    

  • Hi Vamsi,

    now I came back to the TMS320F28388D flash library problem on the M4 core.

    In the meantime, I updated to CCS 12.4, but even with the newer TI Clang v2.1.3.LTS compiler there has been no change in behavior.
    -----
    The problem still is that linking a project with the M4 TI flash library and some other libraries makes the ARM linker emit an error message:

    error: file
    "C:/[...]/driverlib_cm4/Debug/driverlib_cm4.lib<ethernet.o>"
    has a Tag_ABI_VFP_args attribute value of "0" that is different than one previously seen ("1");
    combining incompatible files

    The nasty thing is that it won't tell me *where* it saw a "1".
    I analyzed everything else thrown at the linker using the armofd tool, and it shows "0" (or nothing at all, as "0" is the default), which is intended.

    My question is: how can I find out where the linker sees that "1" attribute?
    Could it be simply a reporting error, where the linker is confused about the "3" attribute coming from the flash library, which formally is different compared to all the others ("0")?

    Could there be some twist with "0" not actually being shown by armofd?
    It is "said" to be the default, so the compiler may refrain from setting it explicitly (and indeed it does).
    If for some reason it is not the default, armofd output showing no Tag_ABI_VFP_args attribute value at all could mean anything.
    -----
    Strangely, the same linker also emits three warnings, where it *does* indicate both participants that are clashing:

    warning: object files have incompatible wchar_t types
    ("C:/ti/C2000Ware_4_03_00_00/libraries/flash_api/f2838x/cm/lib/F2838x_CM_FlashAPI.lib<Init.obj>" = --wchar_t=16,
    "./ChannelUpdater.o" = --wchar_t=32)
    (ChannelUpdater.o is one of our own modules)
    I wish it would do so for the error too.

  • Hi Christian,

    As mentioned previously, please send me a friend request by hovering over my name.  I can provide the suggestions that I received from our compiler team.

    Thanks and regards,
    Vamsi

  • Hi Christian,

    As discussed offline, I am closing this post for now.  You can send me the project when ready.

    Thanks and regards,
    Vamsi