• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Development Tools » Code Composer Studio » Code Composer Forum » Unable to load GCC built executables from CCS 5.1
Share
Code Composer Studio
  • Forum
  • Announcements
Options
  • Subscribe via RSS
Common Questions
  • Code Composer Studio Forum Usage Guidelines

  • Resources
  • Code Composer Studio (CCStudio) Product Folder
  • Troubleshooting CCS
  • CCS Wiki
  • Download CCS
  • Order CCS
  • Tools Insider Blog
  • Bug Tracking
  • Forums

    Unable to load GCC built executables from CCS 5.1

    • Sudhanand Dayalan
      Posted by Sudhanand Dayalan
      on Apr 27 2012 16:29 PM
      Prodigy680 points

      Hi,

       I am using CodeSourcery (v 4.6.1) bare-metal (arm-none-eabi) to build an application on Windows. When I try to load the executable (simulator or device) I see that only the labels get loaded but none of the data or text. I am able to load the same executable if I use CCS v 5.0.3 correctly. I tried some applications that were built using the same version of the tool-chain and options on Linux and they seem to load correctly.

        Is there some flag that need to be enabled on the windows version for CCS5.1 to work?

      Regards,

      Sudhanand.

      CodeSorcery bare-metal CCSv5.1
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • JohnS
      Posted by JohnS
      on Apr 27 2012 16:52 PM
      Guru59095 points

      Sudhanand,

      Does the table below summarize what you are seeing?

      CCS

      gcc status
      5.0.3 Win 4.6.1 Win Loads fine
      5.1.0 Win 4.6.1 Win Only symbols load
      5.1.0 Win 4.6.1 Linux Loads fine
      5.1.0 Linux 4.6.1 Linux ?

      What error do you see when you try to load using CCSv5.1?  CCS should be doing a data verification test so it would give you data verification errors if it did not load properly.  During data verification we read back some of the locations that were written and verify them against what we were writing.  If it is not loading properly you should absolutely be getting errors.

      Any chance that you have it set to load symbols only?

      Can you provide the executable you are loading so that we can confirm this behavior.  If you don't want to attach it to a forum post you can send it via email if you want.

      Regards,

      John

       


      If my reply answers your question please mark the thread as answered

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sudhanand Dayalan
      Posted by Sudhanand Dayalan
      on Apr 27 2012 17:15 PM
      Prodigy680 points

      Hi John,

         Yes, the table summarizes what I am seeing.

        The odd part is that CCS does not report any errors. I verified that I am loading the program not symbols. I also had a colleague test it on him PC and saw the same result. 

        I am attaching the executable (renamed to txt). It is a simple memory read-write test.

      4118.ARMTest.txt

      Thank you,

      Regards,

      Sudhanand.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sudhanand Dayalan
      Posted by Sudhanand Dayalan
      on Apr 27 2012 17:17 PM
      Prodigy680 points

          Forgot to mention, the code is built for a Cortex-A8

      Regards,

      Sudhanand.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • JohnS
      Posted by JohnS
      on Apr 30 2012 09:31 AM
      Guru59095 points

      Which device?

       


      If my reply answers your question please mark the thread as answered

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • JohnS
      Posted by JohnS
      on Apr 30 2012 10:05 AM
      Guru59095 points

      I was able to reproduce this on DM8168.  When I load in CCSv5.1 I only get symbols, when I load in CCSv5.0.3 the program loads and I end up at main().  I will file a defect for this.

       


      If my reply answers your question please mark the thread as answered

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • JohnS
      Posted by JohnS
      on Apr 30 2012 10:13 AM
      Guru59095 points

      I filed SDSCM00043927 to track this.

       


      If my reply answers your question please mark the thread as answered

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sudhanand Dayalan
      Posted by Sudhanand Dayalan
      on Apr 30 2012 11:04 AM
      Prodigy680 points

      I tested it on TMS320TCI6614 simulator and Integra (DM816x) hardware.

      Sudhanand

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Mandeep Deol
      Posted by Mandeep Deol
      on Apr 30 2012 14:50 PM
      Prodigy745 points

      It looks like there is an issue with the program segment table generated by the linker.

       Program Segment Table

       

          id type                    load addr  run addr   file size mem size   flags align

          -- ----                    ---------  --------   --------- --------   ----- -----

          0  PT_UNKNOWN (0x70000001) 0x8000b0dc 0x8000b0dc 0x8       0x8        r--   4   

          1  PT_LOAD                 0x80000000 0x80000000 0xb9c8    0xba2c     rwx   32768

          2  PT_LOAD                 0x90000000 0x90000000 0x0       0x10000000 rw-   32768

      The PT_LOAD segment (index 1) for the executable code has a p_offset ( file offset to the data ) set as 0x00000000; which is obviously incorrect because this is right at the beginning of the file where the ELF header is located.

      Note: The there is slight difference in the behavior between older/newer versions of CCS. We used to load data from the offset regardless of weather it was incorrect or not; now we do not. Thus, in older versions you might actually see data getting loaded. However, it the loaded data is incorrect.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sudhanand Dayalan
      Posted by Sudhanand Dayalan
      on Apr 30 2012 21:02 PM
      Prodigy680 points

      Hi Mandeep,

         I have attached the linker command file I used (renamed from gcc_a8.cmd) and the generated map file (armTest_map.txt). Can you tell me what needs to be changed to correct the error.

      .

      Thank you.

      Regards,

      Sudhanand.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • JohnS
      Posted by JohnS
      on May 01 2012 09:31 AM
      Guru59095 points

      The attachments did not come through.  I am not sure how familiar our team is with gcc link files.

       


      If my reply answers your question please mark the thread as answered

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sudhanand Dayalan
      Posted by Sudhanand Dayalan
      on May 01 2012 12:50 PM
      Prodigy680 points

       John,

       I am going to try sending the file once more.

        Can you tell me what the possible reasons that could cause the p_offset to be incorrect. I am new to GCC world and could not find anything on this in any of the Codesourcery or GCC documents.

      6175.armTest_map.txt

      6253.gcc_a8.txt

      Regards,

      Sudhanand.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • JohnS
      Posted by JohnS
      on May 02 2012 08:11 AM
      Guru59095 points

      Sudhanand,

      I took a look at the file but unfortunately I don't know what is wrong with it.  You could try Code Sourcery however I believe they now charge for support, might want to see if anyone on your team has a support contract.  Or you could try posting in one of the public gcc forums that are available.

      Regards,

      John

       


      If my reply answers your question please mark the thread as answered

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use