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.

Error: EMIF: Access to 0x6ae0 is not expected in mode 1

i`m a beginner from china and i have the same trouble as this topic said. When I debug a project based on C6701 in CCS 3.3 ,it says that:"Error: EMIF: Access to 0x6ae0 is not expected in mode 1 ". This is a part of my code:

.global checkaddress
.data 
checkaddress .word 089ABCDEFh
.text
check1:
STW A5,*--B15(4)
STW A4,*--B15(4)
STW B4,*--B15(4)
MVKL checkaddress,A5
MVKH checkaddress,A5
LDW *A5,B4
MVK 0x0000,A4
MVKH 0x0000,A4
STW A1,*--B15(4)
NOP 2
CMPEQ A4,B4,A1
..........

the error originated from this instruction: "LDW *A5,B4", but I really don`t know how this problem occurs! 

I have checked the address in the .map file, it says:
.data 0 00006ae0 00000004 
00006ae0 00000004 checkblock.obj (.data)
it seems that everything is right.

if I run this project based on C6713 simulator, this error will disappear. I really confused!

How can I sovle this error in C6701?
thanks!

  • Hi,
    Where did you get this project ?
    Is it from TI or any books or your own ?
  • thanks for your help!
    the upper code is mine(~~~it`s so ugly~~)! I got a complete project from a institute, the project is absolutely OK. My job is to add some function to that project, but for some reason, I must realize my part with pure assembly language, so I write below code:(the core part, the code is unfinished ....)
    ........
    ........
    .global _c_int00
    .data
    checkaddress .word 00000000h
    .text
    check1:
    STW A5,*--B15(4)
    STW A4,*--B15(4)
    STW B4,*--B15(4)
    MVKL checkaddress,A5
    MVKH checkaddress,A5
    LDW *A5,B4
    MVK 0x0000,A4
    MVKH 0x0000,A4
    STW A1,*--B15(4)
    NOP 2
    CMPEQ A4,B4,A1
    [!A1] B _c_int00
    LDW *B15++(4),A1
    LDW *B15++(4),B4
    NOP 4
    [ B0] MVK 0x0000,A4
    [!B0] MVK 0x0000,A4
    [ B0] MVKH 0x0000,A4
    [!B0] MVKH 0x0000,A4
    STW A4,*A5
    LDW *B15++(4),A4
    LDW *B15++(4),A5
    [ B0] B back1
    [!B0] B next1
    NOP 5
    .........
    ........
    On C6713, this code works well! But on C6701, the error occurs!
    After some testing, I found that, every project I built on C6701 encountered the same error......

    Here is another test:

    C source file:
    #include<stdio.h>
    void main()
    {
    int a=1;
    int b=2;
    int c=3;
    char d='d';
    int e;
    int f;
    e=a;
    f=b+c;
    printf("data is%d:",e);
    }

    cmd file: link.cmd
    MEMORY
    {
    PMEM: o=0x0 l=0xf000
    DMEM: o=0x10000 l=0xf000
    }

    SECTIONS
    {
    .text:>PMEM
    .data:>PMEM
    .bss:>DMEM
    .cinit:>DMEM
    .system:>PMEM
    .stack:>PMEM

    }
    The two file added rts6700.lib form the test project. There exists many "Warning",but I think they matter a little.
    When I run the test, the same error ocurrs: Error: EMIF: Access to 0x80b8 is not expected in mode 1 !
    I have tried many methods, but all failed! I really don`t know how to configurate the CCS environment to solve the problem.
    Looking forward to your guide!
    thanks for your valuable time!
    thank you!
  • Hi,

    Try to use the following .cmd file for your C6701 projects ( hello world sample code and your own)and update.


    /****************************************************************************/
    /* C6701.cmd */
    /* Copyright (c) 2012 Texas Instruments Incorporated */
    /* Author: Rafael de Souza */
    /* */
    /* Description: This file is a sample linker command file that can be */
    /* used for linking programs built with the C compiler and */
    /* running the resulting .out file on a C6701 */
    /* device. Use it as a guideline. You will want to */
    /* change the memory layout to match your specific C6xxx */
    /* target system. You may want to change the allocation */
    /* scheme according to the size of your program. */
    /* */
    /****************************************************************************/

    MEMORY
    {
    VECS: o = 0x00000000 l = 0x00000200 /* Interrupt vector table */
    IRAM: o = 0x00000200 l = 0x0000FFE0 /* 64kB Internal RAM */
    SDRAM: o = 0x80000000 l = 0x01000000 /* 16MB External SDRAM */
    }

    SECTIONS
    {
    .intvecs > VECS /* Custom section for interrupt vector table */
    .text > IRAM
    .stack > IRAM
    .bss > IRAM
    .cio > IRAM
    .const > IRAM
    .data > IRAM
    .switch > IRAM
    .sysmem > IRAM
    .far > IRAM
    .args > IRAM
    .ppinfo > IRAM
    .ppdata > IRAM

    /* COFF sections */
    .pinit > IRAM
    .cinit > IRAM

    /* EABI sections */
    .binit > IRAM
    .init_array > IRAM
    .neardata > IRAM
    .fardata > IRAM
    .rodata > IRAM
    .c6xabi.exidx > IRAM
    .c6xabi.extab > IRAM
    }