[SOLVED]Problem of debugging TMS470 board using IAR J-link

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED]Problem of debugging TMS470 board using IAR J-link

    Hi guys
    I use IAR J link to program my TMS470 board, however, there are always following errors when debugging :( . Anyone can tell me what might be the reason resulting those errors and how can i solve them? Thanks a lot


    Errors:

    'Memory access timed out @ 0040FFE0 -> JTAG speed too high?
    Unexpected CPU core mode : 13 (Expected 0x17, CPSR=000000D3), ReadMem: Words @ Addr 0x5F0'

    Log file shows:

    Tue Sep 14 15:20:02 2010: Loaded macro file: C:\Programme\IAR Systems\Embedded Workbench 4.0 Kickstart\arm\src\examples\TexasInstruments\Configuration_Files\B1M_Files\RAMTMS470R1B1M.mac
    Tue Sep 14 15:20:02 2010: J-Link firmware: V1.20 (J-Link compiled Nov 09 2005 19:32:24 -- Update --)
    Tue Sep 14 15:20:02 2010: JTAG speed is initially set to: 32 kHz
    Tue Sep 14 15:20:03 2010: Halting CPU core
    Tue Sep 14 15:20:03 2010: Initial reset was performed
    Tue Sep 14 15:20:03 2010: J-Link found 1 JTAG device. ARM core Id: 3100E02F(ARM7)
    Tue Sep 14 15:20:03 2010: Device at TAP0 selected
    Tue Sep 14 15:20:03 2010: Executing memory setup macro B1M RAM
    Tue Sep 14 15:23:49 2010: Error in C:\Programme\IAR Systems\Embedded Workbench 4.0 Kickstart\arm\src\examples\TexasInstruments\Configuration_Files\B1M_Files\RAMTMS470R1B1M.mac at line 61, col
    18: Operation error.
    Tue Sep 14 15:23:49 2010: Error while calling macro execUserPreload.
    Tue Sep 14 15:23:49 2010: Auto JTAG speed: 2000 kHz
    Tue Sep 14 15:23:49 2010: Target read failed at memory address 0x0000017C
    Tue Sep 14 15:23:49 2010: Target inconsistency detected at memory address 0x0000017C
    ....

    Tue Sep 14 15:23:49 2010: Target read failed at memory address 0x00000650
    Tue Sep 14 15:23:49 2010: Target inconsistency detected at memory address 0x00000650
    Tue Sep 14 15:23:50 2010: 1804 bytes downloaded and verified (4.91 Kbytes/sec)
    Tue Sep 14 15:23:50 2010: There were warnings during download, see Log Window
    Tue Sep 14 15:23:51 2010: Loaded debugee: C:\Programme\IAR Systems\Embedded Workbench 4.0 Kickstart\arm\src\examples\TexasInstruments\TMS470R1B1M\ADC_LCD_Demo\RAM\Exe\ADC_LCD.d79
    Tue Sep 14 15:23:51 2010: Halting CPU core
    Tue Sep 14 15:23:51 2010: Target reset
    Tue Sep 14 15:23:51 2010: Executing memory setup macro B1M RAM
    Tue Sep 14 15:25:02 2010: Driver does not support code coverage.
  • Hi,

    it seems your macro file is not performed correctly after the reset has been performed:
    Tue Sep 14 15:20:03 2010: Executing memory setup macro B1M RAM
    Tue Sep 14 15:23:49 2010: Error in C:\Programme\IAR Systems\Embedded Workbench 4.0 Kickstart\arm\src\examples\TexasInstruments\Configuration_Files\B1M_Files\RAMTMS470R1B1M.mac at line 61, col
    18: Operation error.
    Tue Sep 14 15:23:49 2010: Error while calling macro execUserPreload.

    So, there might be some commands in the macro file which have to be executed after reset but the macro file execution was aborted before this could happen.

    Would it be possible to post your macro file content?


    Best regards
    Alex
  • Thanks for your reply, Alex

    Actually the EVB (TMS470 kickstart kit ) works well with the exactly the same setting, but not with my board, which has the same controller as EVB. Here is the code of macro file:



    SetupRAM()
    {
    __message "Executing memory setup macro B1M RAM\n";

    //__emulatorStatusCheckOnRead(1);

    __emulatorStatusCheckOnRead(0);

    // Disable reset at illegal address and access violation to
    // avoid resetting the CPU when debugging.
    __writeMemory32(0x00004007, 0xffffffe0, "Memory"); // SYSECR

    /* activate Flash at 0x00000000 1M that is connected to memory select 0 */
    __writeMemory32(0x000000b0, 0xfffffe04, "Memory"); // MFBALR0
    __writeMemory32(0x00000040, 0xfffffe00, "Memory"); // MFBAHR0

    /* activate Flash at 0x00000000 0k that is connected to memory select 1 */
    __writeMemory32(0x00000000, 0xfffffe08, "Memory"); // MFBALR1
    __writeMemory32(0x00000000, 0xfffffe0c, "Memory"); // MFBAHR1


    /* activate RAM at 0x00000000 64k that is connected to memory select 2 */
    __writeMemory32( 0x00000000, 0xfffffe10, "Memory" ) ; // MFBAHR2
    __writeMemory32( 0x00000070, 0xfffffe14, "Memory" ) ; // MFBALR2 8K


    /* activate RAM at 0x00000000 0k that is connected to memory select 3 */
    __writeMemory32( 0x00000000, 0xfffffe18, "Memory" ) ; // MFBAHR3
    __writeMemory32( 0x00000000, 0xfffffe1c, "Memory" ) ; // MFBALR3 0K


    // HET RAM static memory control register, use 7 wait states and
    // 32-bit access
    __writeMemory32(0x00000072, 0xFFFFFD04, "Memory"); // SMCR1

    // Map 1k HET RAM connected to memory select 4 at 0x00800000, size 2k
    __writeMemory32(0x00000080, 0xfffffe20, "Memory"); // MFBAHR4
    __writeMemory32(0x00000020, 0xfffffe24, "Memory"); // MFBALR4

    // Trailing wait states controlled by TWS bits, use write buffer for
    // expansion bus access
    __writeMemory32(0x00000003, 0xFFFFFD2C, "Memory"); // WCR0

    // Map 256k flash connected to memory select 0 at 0x00400000, size 2048k
    // and activate new mapping by writing 1 to MFBALR0.8.
    __writeMemory32(0x000000b0, 0xfffffe04, "Memory"); // MFBALR0
    __writeMemory32(0x00000040, 0xfffffe00, "Memory"); // MFBAHR0
    __writeMemory32(0x000001b0, 0xfffffe04, "Memory"); // MFBALR0

    __writeMemory32(0x80000000, 0xfffff724, "Memory");
    __readMemory32(0x0040ffe0, "Memory"); Error
    __readMemory32(0x0040ffe4, "Memory");
    __readMemory32(0x0040ffe8, "Memory");
    __readMemory32(0x0040ffec, "Memory");

    __emulatorStatusCheckOnRead(1);


    __writeMemory32( 0x00000000, 0xffffffdc, "Memory" ) ; // GCR SYSCLK *8 and /4 = SYSCLK /1

    // Setup clock ICLK = SYSCLK/16.
    __writeMemory32(0x0000000b, 0xfffffd30, "Memory"); // PCR - set CLKDIV

    }


    execUserPreload()
    {
    SetupRAM();

    }


    execUserReset()
    {
    SetupRAM();
    }



    Thanks



    Rui

    The post was edited 1 time, last by Possessed ().

  • Hi Rui,

    >>Actually the EVB (TMS470 kickstart kit ) works well with the exactly the same setting, but not with my board
    Sounds like there is a difference between the eval board and your custom board which causes the macro file to fail.

    Could you please check your custom board against the eval board regarding differences that might
    have influence on the steps which are performed in the macro file


    Best regards
    Alex
  • Thanks for your reply, Alex



    I've checked the datasheet of the controller and the schematics of TMS470R1AXX EVB to compare with mine. It seems that everything is correct. Besides, power supply is ok too. Is it possible for you to tell me what might be the problems when those errors show up? I can further check my board if i have a direction. Perhaps the chip is broken, as the memory can not be read? Thanks in advance.



    Rui

    The post was edited 1 time, last by Possessed ().

  • darkleo wrote:

    Hi
    Your problem in this line
    __readMemory32(0x0040ffe0, "Memory");
    __readMemory32(0x0040ffe4, "Memory");
    __readMemory32(0x0040ffe8, "Memory");
    __readMemory32(0x0040ffec, "Memory");

    change this symblos "4" on "0" and you'll get full access to memory and flash

    Thanks for your reply, darkleo

    However, it still doesnt work after i change the numbers. Can anyone help me?? ?(