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.

F021 library debug symbol isues

Other Parts Discussed in Thread: TMS570LS3137

Hello,

We have problems with F021 Flash API (http://www.ti.com/tool/f021flashapi). Problem is somewhere in debug symbols inside this library. 

We already found this problem with GCC tool some time ago (http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/275196/962765.aspx#962765). Final ELF file after compilation can't pass throw objdump tool (crash) and also have problem when GDB will try to show any code close this library (crash). Because GCC is not product with any warranty we are found workaround and problem thread was closed.

But now we are able to repeat problem with "reference" platform ARM DS-5. When binary is compiled with F021 API. Debugger will fail to load debug symbols from final ELF. 

This mean, that we are two independent tools touched by problem with this library.

Workaround (for both cases) is strip debug symbols from library with "strip -g" tool.

Have nice weekend, 
Jiri

ARM DS-5 error:

ERROR(CMD685-COR11-IMG55):
! Failed to load symbols for "xy.elf"
! Failed to read the symbols from C:\......\xy.elf
! Failed while reading from the file {0}

  • Hello Jiri,

    Our tools team has requested if it would be possible for you to deliver a test case that crashes GCC.  They also want to know what version of GCC you are using. 

    Their goal is to have our DWARF work in other toolchains and therefore want to look into this issue.

  • We are using this GCC https://launchpad.net/gcc-arm-embedded with patch for big-endian (http://pastebin.com/9LVFz8vn) I can send you patched installation package if you want, but I thing that problem can be possible repeat with little endian default  installation also. We was try all four releases from 2013 with same result.

    And similar problem we have with ARM DS-5 Version: 5.17.0

  • Jiri,

    What they are looking for is source/makefile (project) set of files that links in the F021 Flash Library and causes the crashes you are seeing.

  • Hello John,

    please let me add a post on behalf of my fellow Jiri - may you provide your colleagues with the attached project? 7587.1258.GCC_FlashApi.zip

    The Flash library functions are called from the module /rtos/process.c - please ignore nonsense and unuseble calling sequence..

    For an experiment purpose  the lines 46 and 47 of Makefile can be switched. 

    objdump is called by the make target "debug" - all parameters work properly except -S (case-sensitive). This causes a crash of objdump if non-stripped Flash library is linked into the final ELF.

    The screenshot below of comparison between dump results with the non-stripped (left side) and the stripped library - the dump of the non-stripped one is being fallen down "in the middle" of a line. But honestly I am not sure whether this information is valuable - I have tried similar procedure with another (more complex) project and it has fallen down "somewhere" without obvious relation with the linked library variant. But maybe I am wrong...

    Used platform and tools:

    TMS570LS3137

    GCC 4.8 2013q4

    Flash API v2.00.00 Build(000809) - Beta

    Thanks, 

    Best regards, Jiri

  • Hello John and other TI guys,

    please may I ask you for providing us with some news regarding the objdump crash? May I gve you further inputs for your analysis?

    Many thanks in advance,

    Best regards, Jiri

  • Dear TI support,

    have you tried to discover a root cause of the described issue?

    Please let me know a current state of this issue if you can.

    Thanks a lot,

    Best regards, Jiri

  • Both TI armofd (version 5.1.5) and RVDS fromelf (ARM FromELF, RVCT4.0 [Build 400]) are able to read the file TI_F021_API_CortexR4_BE_V3D16_complete.lib with no errors.  I strongly suspect that the bug is in objdump.  I don't have any expertise with objdump, so I can't say when or if it might be fixed.  I'll ask around to see if I can get someone to comment on this issue.

  • I was able to simplify things a bit further.  If you build a simple executable file with the TI ARM compiler then try to disassemble it with GCC ARM objdump -S, the objdump tool crashes.  It remains unclear whether this is a problem with the TI tools or the GCC tools.  I filed SDSCM00049805 in the SDOWP system to have this investigated.  Feel free to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George

  • Problem is not locked to "objdump". We have similar problem to load final executable with non-stripped flashAPI library into DS-5 debbuger.

    We wrote about objdump, because it is easy to repeat this behavior.

    Frankly spoken we don't like to use this library. Reason is, that TMS570 has 61508 SIL 3 safety standard and using the library without this standard makes troubles to certify a final product. But for write to flash we don't have another choice, because F021 has hidden mandatory settings without documentation

    Jiri

  • Dear George,

    thank you for submitting the change request in your tracking system!

    Please may you disclose when a new version CGT (5.1.5) will be released? Unfortunately I have not found a roamap for this tool package. Also a website regarding CCS has not provided more info.

    I assume that this release will be followed by a new version of the re-built flash API, am I right?

    Thanks,

    Best regards,

    Jiri

  • Jiri Janacek said:
    Please may you disclose when a new version CGT (5.1.5) will be released? Unfortunately I have not found a roamap for this tool package.

    You can find that roadmap here.

    As of right now this bug is not committed to be fixed in the next release.

    Jiri Janacek said:
    I assume that this release will be followed by a new version of the re-built flash API, am I right?

    That flash library is released by a different development team.  I'll let them know of your concern.

    Thanks and regards,

    -George

  • Dear George,

    please have you received some feedback by the development team working on the flash library?

    By the way, check this forum thread and John's comments:

    "Our tools team is suspecting this issue is due to the TI compiler not setting the symbol size field for function symbols."

    Thanks,

    Best regards,

    Jiri

  • Jiri Janacek said:
    have you received some feedback by the development team working on the flash library?

    No.  But the bug has not been fixed yet.  

    Thanks and regards,

    -George

  • Hello George,

    thanks for your reply!

    OK, I will be tracking the defect report SDSCM00049805 and checkig its status. Until we get further investigation results I would keep this forum thread active/pending.

  • Hello,

    if any user cannot accces to Pastebin website to get a patch as mentioned above:

    Jiri Dobry said:
    We are using this GCC https://launchpad.net/gcc-arm-embedded with patch for big-endian (http://pastebin.com/9LVFz8vn) .

    Please use this alternate resource and download the attached patch. 

    0576.big-endian_patch.123

    Instruction: replace the dummy extension .123 by the correct .patch

    Further information can be found at

    https://answers.launchpad.net/gcc-arm-embedded/+question/235372

    https://answers.launchpad.net/gcc-arm-embedded/+question/236505

     

    Best regards,

    Jiri

  • This is caused by a bug in GNU bintuils.  For a patch, see

    https://sourceware.org/bugzilla/show_bug.cgi?id=16822

    SDSCM00049805 and SDSCM00050016 are the same issue; see

    https://e2e.ti.com/support/development_tools/compiler/int-compiler/f/85/t/334866.aspx