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.

OMAP-L138 ARM assembler error

Genius 5785 points
Other Parts Discussed in Thread: OMAPL138

Hello,

I get an assembler error below for ARM9. The compiler is TI v5.1.1. The #-2147483648 is 0x80000000 as the start address of shared ram. I seem that this number is used as offset address by assembler. Could you tell me how I resolve this? The program as C674x is working though. There is not an assembler error in TI v7.4.11. Then a particular address data is read correctly. -> 0x80000000 + (0x1000 + 3 * 2) * sizeof(short)

<console>
"test.asm", ERROR!   at line 145: [E0200] Offset out of range, must be [-4095,4095]
         LDR       V9, [V9, #-2147483648] ; [DPU_PIPE] |18|

<test.c>
#define OFFSET 0x1000
#define SHRAM ((volatile unsigned short *)(0x80000000))

void data_set(unsigned int index, int *data);

void main (void) {

 unsigned int Index = 3;
 int Data;

 data_set(Index, &Data);
}

void data_set(unsigned int index, int *data)
{
 *data = *((int *)&SHRAM[OFFSET+(index*2)]);
}

Regards,
Kazu

  • I cannot reproduce this result.  Please show the compiler build option you use.

    Thanks and regards,

    -George

  • Hello George,

    Thank you for your reply. My compiler option is below. Please give me some advice.

    -mv5e --code_state=32 --abi=eabi -me --include_path="C:/ti/ccsv5/tools/compiler/arm_5.1.1/include" -g --define=omapl138 --diag_warning=225 --display_error_number --diag_wrap=off -k

    Regards,
    Kazu

  • Thank you for notifying us about this problem.  I can reproduce your results.  I filed SDSCM00051412 in the SDOWP system to have this investigated. Feel free to follow it with the SDOWP link below in my signature.

    For workaround, consider compiling the problem function in Thumb mode.  You can either use the build option --code_state=16, or apply the CODE_STATE pragma like this ...

    #pragma CODE_STATE(data_set, 16)
    void data_set(unsigned int index, int *data)
    {
     *data = *((int *)&SHRAM[OFFSET+(index*2)]);
    }
    

    I hope this workaround is practical for you.

    Thanks and regards,

    -George

  • Hello George,

    Thank you for your support. I can confirm your workarounds. But I can't find out SDSCM00051412 in the SDOWP. Is it possible your typo?

    Regards,
    Kazu
  • Kazu Kon said:
    I can't find out SDSCM00051412 in the SDOWP

    I confirmed the bug is filed, but is not visible in the external view.  I have notified the right people about this problem.

    Thanks and regards,

    -George