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.

CCS/AM3354: GNU Compiler Issue

Part Number: AM3354


Tool/software: Code Composer Studio

hello expert

since I use GNU(v7.2.1) to compiler my project,and I write some code in .s document, but found have some problems.

If I write code

LDR     R1, =uipNextRunningTaskTCBPtr

the compiler will compile it like 

ldr        r1, [pc, #0x3c]

and I found the address of 'pc + 0x3c' is not the address of uipNextRunningTaskTCBPtr,

so the program run into error.

What should I modified to fix this problem?

Best Regards

Jack

  • Please see if this blog post from ARM titled How to Load Constants in Assembly for Arm Architecture is helpful.  Note the Cortex-A8 CPU core on the AM3354 supports the instructions MOVW and MOVT.  

    If the blog post isn't helpful, then I need a test case which allows me to reproduce the problem. I presume the assembly file includes no other files.  Zip up the assembly file and attach it to your next post.  Show the version of the assembler.  By copy-and-paste and not a screen shot, show the full text of the command which invokes the assembler on the assembly file.  If the assembly file includes other files, that is more difficult.  Then the zip file must contain those include files, and any other files included by those files.  

    While I cannot guarantee it, I am confident I can understand the cause of the problem with that test case.

    Thanks and regards,

    -George