• 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 » TI C/C++ Compiler » TI C/C++ Compiler - Forum » 32bit code misalignment
Share
TI C/C++ Compiler
  • Forum
Options
  • Subscribe via RSS

32bit code misalignment

32bit code misalignment

This question is answered
Zuyuan Li
Posted by Zuyuan Li
on Mar 11 2012 21:21 PM
Prodigy150 points

Dear sir,

We use CCSV4.25 for TMS470MF066 application with SD-XDS510USB PLUS emulator. We try to debug the project, but CCSV4 can't write to target board. We checked the map file, and found the address of function start is not 32bit alignment. The following lines is from .map file. For example, the reset address is 0x00001969 (_c_int00). Could anyone give me some help? Is it abnormal? I flash the code to target board with nowFlash tool, and it runs correctly.

00000000   __TI_static_base__
00001745   __aeabi_memcpy
00001745   __aeabi_memcpy4
00001745   __aeabi_memcpy8
ffffffff   __binit__
ffffffff   __c_args__
00001969   _c_int00
0000165d   _init
00001935   _memoryInit_
000012a3   _mpuInit
00001701   _set_ecp_clk
0000139b   _switch_to_usermode
000011c3   _systemInit

 

 

Best Regards,

Li Zuyuan

 

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • George Mock
    Posted by George Mock
    on Mar 13 2012 11:50 AM
    Guru51445 points

    I don't know how any function built for Cortex-M3 can end up at an odd address.  Something unusual is going on.  We need to reproduce this error ourselves.  Unfortunately, for linker issues like this one, that can be difficult.  Are you willing to send us your entire project?

    Thanks and regards,

    -George


    TI C/C++ Compiler Forum Moderator
    Please click Verify Answer on the best reply to your question.
    The Compiler Wiki answers most common questions.
    Track an issue with SDOWP. Enter your bug id in the "Find Record ID" box.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Zuyuan Li
    Posted by Zuyuan Li
    on Mar 13 2012 21:52 PM
    Prodigy150 points
    Boot.rar

    Hello George,

    Thank you for your answer. I used CCSV4.25 wizard to create new project and HALCoGen v3.0 produced the code. Please see attached project. Even though the functions are located at odd address, it runs correctly. The PC shows the address-1 as the function start address. I really don't know what is wrong.

    Thank you!

    Best regards

    Zuyuan

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Archaeologist
    Posted by Archaeologist
    on Mar 14 2012 12:08 PM
    Suggested Answer
    Mastermind40800 points

    This is not a bug.  The code of the function is correctly aligned.  The LSB of the symbol is used to indicate whether it is an ARM or Thumb function.  If the LSB is 1, it is a Thumb function.  This helps the linker avoid the use of mode-switching veneers.

    TMS470 FAQ
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Zuyuan Li
    Posted by Zuyuan Li
    on Mar 20 2012 02:30 AM
    Verified Answer
    Verified by Zuyuan Li
    Prodigy150 points

    Thank all of you very much!

    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