This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cortex M0 get error Trace HW Not Present

I am getting a error when I try to enable trace on a LPC1114 Cortex M0 on a Keil
MCB1000 board. I am using a ULINK2. One thing is I am looking for a good ini file to
use with the debug setup. I found one after a search of keil install directory

Dbg_Ext_Flash.ini

containing the function:

FUNC void MTB_Setup (void) {
// <e0.0> Trace: MTB (Micro Trace Buffer)
// <o1.0..5> Buffer Size
// <5=> 256B
// <6=> 512B
// <7=> 1kB
// <8=> 2kB
// <9=> 4kB
// <10=> 8kB
// <11=> 16kB
// <12=> 32kB
// <o2> Buffer Position
// Buffer position in RAM. Must be a multiple of the buffer size.
// <o3.0> Stop Trace when buffer is full
// <o3.1> Stop Target when buffer is full
// </e> unsigned long _mstr; unsigned long _mask; unsigned long _position; unsigned long _flow; _mstr = 0x01; _mask = 12; _position = 0x1EFF0000; _flow = 0x00;

_position &= 0xFFFFFFFC; // Mask MASTER.POINTER field _flow = _flow | (_position + ((8<<_mask) - 32));

_WDWORD(0x1EFF8000, 0x00000000); // MASTER _WDWORD(0x1EFF8004, _mask); // RANGE _WDWORD(0x1EFF8008, _flow); // FLOW _WDWORD(0x1EFF8000, _mstr | _position); // MASTER
}

MTB_Setup();

I tried to include this one.

But have not been able to get rid of the error

TRACE HW NOT PRESENT

Thanks, Gary

Parents
  • I was able to see trace work on a Cortex M3 board using the example program

    Blinky_ULp provided trace output

    the INI file is like this

    /******************************************************************************/
    /* LPC17xx_TP.ini: LPC17xx Trace Port Initialization File */
    /******************************************************************************/
    // <<< Use Configuration Wizard in Context Menu >>> //
    /******************************************************************************/
    /* This file is part of the uVision/ARM development tools. */
    /* Copyright (c) 2005-2012 Keil Software. All rights reserved. */
    /* This software may only be used under the terms of a valid, current, */
    /* end user licence from KEIL for a compatible version of KEIL software */
    /* development tools. Nothing else gives you the right to use this software. */
    /******************************************************************************/

    /* Note: Trace pins are: TRACECLK P2.6 TRACEDATA0 P2.5 4 bit trace data TRACEDATA1 P2.4 TRACEDATA2 P2.3 TRACEDATA3 P2.2 do not use these pins in your application! */

    FUNC void TraceSetup (void) {
    // <h> Pin Function Select Register 10
    // <o1.3> GPIO/TRACE
    // TPIU interface enabled.
    //
    TPIU signals are available on the pins hosting them regardless of the PINSEL4 content.
    // </h>
    _WDWORD(0x4002C028, 0x00000008); // Pin Function Select Register 10 (PINSEL10 - 0x4002 C028)
    }

    // Executed after reset via uVision's 'Reset'-button
    FUNC void OnResetExec (void) { TraceSetup();
    }

    TraceSetup(); // Debugger Setup

Reply
  • I was able to see trace work on a Cortex M3 board using the example program

    Blinky_ULp provided trace output

    the INI file is like this

    /******************************************************************************/
    /* LPC17xx_TP.ini: LPC17xx Trace Port Initialization File */
    /******************************************************************************/
    // <<< Use Configuration Wizard in Context Menu >>> //
    /******************************************************************************/
    /* This file is part of the uVision/ARM development tools. */
    /* Copyright (c) 2005-2012 Keil Software. All rights reserved. */
    /* This software may only be used under the terms of a valid, current, */
    /* end user licence from KEIL for a compatible version of KEIL software */
    /* development tools. Nothing else gives you the right to use this software. */
    /******************************************************************************/

    /* Note: Trace pins are: TRACECLK P2.6 TRACEDATA0 P2.5 4 bit trace data TRACEDATA1 P2.4 TRACEDATA2 P2.3 TRACEDATA3 P2.2 do not use these pins in your application! */

    FUNC void TraceSetup (void) {
    // <h> Pin Function Select Register 10
    // <o1.3> GPIO/TRACE
    // TPIU interface enabled.
    //
    TPIU signals are available on the pins hosting them regardless of the PINSEL4 content.
    // </h>
    _WDWORD(0x4002C028, 0x00000008); // Pin Function Select Register 10 (PINSEL10 - 0x4002 C028)
    }

    // Executed after reset via uVision's 'Reset'-button
    FUNC void OnResetExec (void) { TraceSetup();
    }

    TraceSetup(); // Debugger Setup

Children
No data