• 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 » Digital Signal Processors (DSP) » OMAP™ Processors » OMAP-L13x, AM1x and C674x Processors Forum » Using LDR instruction in Cortex A8 with CCSv4
Share
OMAP™ Processors
  • Forums
  • Announcements
Options
  • Subscribe via RSS
Resources
  • OMAP-L1x DSP+ARM9™-based Processors Product Folder
  • OMAP3525/30 DSP+ARM Cortex™-A8-based SOCs Product Folder

  • Top OMAPL Wiki Links
  • OMAPL3x Schematic Review Checklist
  • OMAPL13x Boot resources

  • OMAPL Document Resources
  • OMAPL137 Technical reference manual
  • OMAPL138 Technical reference manual
  • OMAPL Boot loader App Notes
  • Using LDR instruction in Cortex A8 with CCSv4

    Using LDR instruction in Cortex A8 with CCSv4

    This question is answered
    Vinay Kumar37373
    Posted by Vinay Kumar37373
    on Jan 12 2010 00:54 AM
    Intellectual315 points

    Hi all,

    Iam using some Assembly instructions for my application where iam using LDR instrcution and RBIT (reverse bit) instruction.

    these are not compiling when i use code generation tools latest version 4.6.1 and all other instructions are fine, if any one had idea of these instructions uasege please suggest me how to use.......?

    ERROR : giving illegal mnemonic.

    for LDR when i load direct constant value it is giving problem..

    ex : LDR r0, =#0x1000.

    Thanks in Advance,

    Vinay.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Jon Hunter
      Posted by Jon Hunter
      on Jan 16 2010 12:47 PM
      Expert3245 points

      Can you try without the "="? For example...

      LDR r0, #0x1000

      For more information checkout the Assembler User Guide found in:

      C:\Program Files\Texas Instruments\ccsv4\tools\compiler\tms470\docs\SPNU118G.pdf

       

       
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Vinay Kumar37373
      Posted by Vinay Kumar37373
      on Jan 22 2010 06:25 AM
      Intellectual315 points

      Yes, I tried to use with LDR r0, #0x1000

      but it is giving error again. another problem is with RBIT instruction.

      when i use RBIT r7,r8. giving error illegal mnemonic.

      as in some documents it said that RBIT instruction is not available in armv6 and above.

      but it is working when i compile with rvds3.0 setting armv7a option.

      can any one suggest me to use this instruction in CCSv4?

       

      Thanks,

      Vinay.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Brad Griffis
      Posted by Brad Griffis
      on Jan 25 2010 20:02 PM
      Guru57415 points

      Are you using the -mv7A8 compiler switch to tell the compiler that you're using a Cortex A8?

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

      Please click the Verify Answer button on this post if it answers your question.
      --------------------------------------------------------------------------------------------------------- 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Vinay Kumar37373
      Posted by Vinay Kumar37373
      on Jan 26 2010 05:43 AM
      Intellectual315 points

      yes, iam using -mv7a8 compiler switch.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Arkady Miasnikov
      Posted by Arkady Miasnikov
      on Mar 29 2011 09:41 AM
      Prodigy160 points

      Similar problem here.

      I am trying following lines in the assembler

          RBIT    R2, R0         ; R2 := reversed low  32 bits of input = high 32 bits of result.
          RBIT    R3, R1         ; R3 := reversed high 32 bits of input = low  32 bits of result.

      My toolchain is 4.6.5 

      Compiler output

      "C:\Program Files\Texas Instruments\TMS470 Code Generation Tools 4.6.5\bin\cl470.exe"  -q -g -s -mv7R4 -al --elf -me -mv7R4 --abi=eabi --code_state=32  C:\arkady\work\wl9_base\firmware\asm_utils.asm
      2 Assembly Errors, No Assembly Warnings
      "C:\arkady\work\wl9_base\firmware\asm_utils.asm", ERROR!   at line 153:
       [E0002]
               Illegal mnemonic specified
              RBIT    R2, R0         ; R2 := reversed low  32 bits of input = high 32 bits of result.

      "C:\arkady\work\wl9_base\firmware\asm_utils.asm", ERROR!   at line 154:
       [E0002]
               Illegal mnemonic specified
              RBIT    R3, R1         ; R3 := reversed high 32 bits of input = low  32 bits of result.

      Thank you, Arkady

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Arkady Miasnikov
      Posted by Arkady Miasnikov
      on Apr 26 2011 07:56 AM
      Prodigy160 points

      Anyone? Is it a bug in the toolchain or there is another mnemonic for RBIT? Should I use machine code as a workaround?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Brad Griffis
      Posted by Brad Griffis
      on Apr 26 2011 13:47 PM
      Verified Answer
      Verified by Brad Griffis
      Guru57415 points

      RBIT is a Thumb2 instruction.  Did you use a .thumb directive in your assembly code?

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

      Please click the Verify Answer button on this post if it answers your question.
      --------------------------------------------------------------------------------------------------------- 

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Arkady Miasnikov
      Posted by Arkady Miasnikov
      on Apr 27 2011 01:08 AM
      Prodigy160 points

      .thumb did the trick

       

      Thank you.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Vinay Kumar37373
      Posted by Vinay Kumar37373
      on Oct 28 2011 01:32 AM
      Intellectual315 points

      Hi Brad Griffis & Arkady Miasnikov,

       

      I have the code with both RBIT instructions and CortexA8 instructions (i.e., thumb2 instruction and cortexA8 instructions).

      I followed with .thumb directly in the code it is giving errors with the arm instructions.

      ex: .thumb

      RBIT R2, R3          ----> now it does not have any error

      BNE next         ----> but this instruction is getting error with .thumb directive

      so can any one give me the example of code to write both cortexa8 instructions and thumb2 instructions in single function of code.

      2. can i use .arm assembler directive in cortexa8 device to work below lines of code in single function.

       

      Thanks,

      Vinay

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Brad Griffis
      Posted by Brad Griffis
      on Oct 28 2011 09:32 AM
      Verified Answer
      Verified by Brad Griffis
      Guru57415 points

      You cannot switch instruction sets on an instruction-by-instruction basis.  For a given function you must write the entire thing in ARM instruction set or Thumb instruction set.

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

      Please click the Verify Answer button on this post if it answers your question.
      --------------------------------------------------------------------------------------------------------- 

      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