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/TM4C129XNCZAD: Debugging Without Restarting MCU

Part Number: TM4C129XNCZAD


Tool/software: Code Composer Studio

It's been a while, but I'm certain I've been able to debug the TM4C using an XDS200 cable without restarting the MCU, however, I've not been able to do so on my current project.  If I remember right, all I should have to do is set the loading options to "Load symbols only" (as shown below) and then start debugging as usual...  However, every time I do this, it resets the MCU before starting the debug session.  I spent a couple of hours searching the forum and trying some things, but I can't figure it out.  Can anyone remind me what I'm missing?

  • Hello Terence,

    A few other places to check:

    Make sure you have the option to reset on target connection disabled.

    Also check your loaded GEL files and make sure a CPU reset is not being done on one of the GEL call back functions (OnTargetConnect(), OnFileLoaded(), etc).

    Thanks

    ki

  • Hi Ki - Thanks for the reply.  Yes, "Reset the target on a connect" is disabled.  Still, when debugging, a reset occurs.  As far as I know, my project does not have a GEL file.  I'm on Windows, and from a command prompt from the root directory of my project I searched recursively by using "dir /s *.gel" and found no files.  I also searched all files for "OnTargetConnect" and "OnFileLoaded" and found nothing.  Any other ideas?

  • Terence D said:
    As far as I know, my project does not have a GEL file.

    After you start a debug session, check the GEL view to see if you have any GEL files are loaded:

  • Ah, okay, I wasn't aware of this at all.  Here's what I've got:

    Though, looking through both files, I'm not seeing anything that appears to be an issue.  The contents:

    /* tm4c129xnczad.gel
     *
     * Revisions:
     *  June-10-2014 3rd revision
     *
     * This is derived from revision 15071 of the TivaWare Library.
     *
     */
    
    menuitem "StartUp"
    
    hotmenu StartUp()
    {
        /* Load the CortexM3_util.gel file */
        GEL_LoadGel("$(GEL_file_dir)/CortexM3_util.gel");
    
        GEL_MapOff();
        GEL_MapReset();
        GEL_MapOn();
        memorymap_init();
    }
    
    OnTargetConnect()
    {
    }
    
    memorymap_init()
    {
        /*
         * Syntax for GEL_MapAddStr.
         * GEL_MapAddStr(address, page, length, "attribute", waitstate);
    
        Basic Attribute Types           Derived Attribute Types
        String      Description         String      Description
        R           Read                NONE        No memory/protected
        W           Write               RAM         Read and write
        P           Port                ROM         Read only
        EX          External            WOM         Write only
        EM          Emulator            INPORT      Port read only
        PR          Programmable        OUTPORT     Port write only
        ER          Erasable            IOPORT      Port read and write
        DA          Dual access         SARAM       Single access RAM
        ASn         Access size         DARAM       Dual access RAM
        SHnC        Shared              FLASH       Flash ROM
        CACHE       Cache               EXRAM       External RAM
        TX          Text                EXROM       External ROM
        MN          Monitor             EPROM       Erasable write-able EPROM
        SA          Single access       MONITOR     Monitor ROM
        FL          Flash               PRAM        Program RAM
        MR          Memory mapped       PROM        Program ROM
        NULL        NULL                NULL        NULL
    
        */
    
        GEL_MapAddStr(0x00000000, 0, 0x00100000, "R", 0);  /* Flash */
        GEL_MapAddStr(0x01000000, 0, 0x00008c00, "R", 0);  /* ROM */
        GEL_MapAddStr(0x20000000, 0, 0x00040000, "R|W", 0);  /* SRAM */
        GEL_MapAddStr(0x40000000, 0, 0x00001000, "R|W", 0);  /* WATCHDOG0 */
        GEL_MapAddStr(0x40001000, 0, 0x00001000, "R|W", 0);  /* WATCHDOG1 */
        GEL_MapAddStr(0x40008000, 0, 0x00001000, "R|W", 0);  /* SSI0 */
        GEL_MapAddStr(0x40009000, 0, 0x00001000, "R|W", 0);  /* SSI1 */
        GEL_MapAddStr(0x4000A000, 0, 0x00001000, "R|W", 0);  /* SSI2 */
        GEL_MapAddStr(0x4000B000, 0, 0x00001000, "R|W", 0);  /* SSI3 */
        GEL_MapAddStr(0x4000C000, 0, 0x00001000, "R|W", 0);  /* UART0 */
        GEL_MapAddStr(0x4000D000, 0, 0x00001000, "R|W", 0);  /* UART1 */
        GEL_MapAddStr(0x4000E000, 0, 0x00001000, "R|W", 0);  /* UART2 */
        GEL_MapAddStr(0x4000F000, 0, 0x00001000, "R|W", 0);  /* UART3 */
        GEL_MapAddStr(0x40010000, 0, 0x00001000, "R|W", 0);  /* UART4 */
        GEL_MapAddStr(0x40011000, 0, 0x00001000, "R|W", 0);  /* UART5 */
        GEL_MapAddStr(0x40012000, 0, 0x00001000, "R|W", 0);  /* UART6 */
        GEL_MapAddStr(0x40013000, 0, 0x00001000, "R|W", 0);  /* UART7 */
        GEL_MapAddStr(0x40020000, 0, 0x00001000, "R|W", 0);  /* I2C0 */
        GEL_MapAddStr(0x40021000, 0, 0x00001000, "R|W", 0);  /* I2C1 */
        GEL_MapAddStr(0x40022000, 0, 0x00001000, "R|W", 0);  /* I2C2 */
        GEL_MapAddStr(0x40023000, 0, 0x00001000, "R|W", 0);  /* I2C3 */
        GEL_MapAddStr(0x40028000, 0, 0x00001000, "R|W", 0);  /* PWM0 */
        GEL_MapAddStr(0x4002C000, 0, 0x00001000, "R|W", 0);  /* QEI0 */
        GEL_MapAddStr(0x40030000, 0, 0x00001000, "R|W", 0);  /* TIMER0 */
        GEL_MapAddStr(0x40031000, 0, 0x00001000, "R|W", 0);  /* TIMER1 */
        GEL_MapAddStr(0x40032000, 0, 0x00001000, "R|W", 0);  /* TIMER2 */
        GEL_MapAddStr(0x40033000, 0, 0x00001000, "R|W", 0);  /* TIMER3 */
        GEL_MapAddStr(0x40034000, 0, 0x00001000, "R|W", 0);  /* TIMER4 */
        GEL_MapAddStr(0x40035000, 0, 0x00001000, "R|W", 0);  /* TIMER5 */
        GEL_MapAddStr(0x40038000, 0, 0x00001000, "R|W", 0);  /* ADC0 */
        GEL_MapAddStr(0x40039000, 0, 0x00001000, "R|W", 0);  /* ADC1 */
        GEL_MapAddStr(0x4003C000, 0, 0x00001000, "R|W", 0);  /* COMP */
        GEL_MapAddStr(0x40040000, 0, 0x00001000, "R|W", 0);  /* CAN0 */
        GEL_MapAddStr(0x40041000, 0, 0x00001000, "R|W", 0);  /* CAN1 */
        GEL_MapAddStr(0x40050000, 0, 0x00001000, "R|W", 0);  /* USB0 */
        GEL_MapAddStr(0x40058000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTA AHB */
        GEL_MapAddStr(0x40059000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTB AHB */
        GEL_MapAddStr(0x4005A000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTC AHB */
        GEL_MapAddStr(0x4005B000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTD AHB */
        GEL_MapAddStr(0x4005C000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTE AHB */
        GEL_MapAddStr(0x4005D000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTF AHB */
        GEL_MapAddStr(0x4005E000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTG AHB */
        GEL_MapAddStr(0x4005F000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTH AHB */
        GEL_MapAddStr(0x40060000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTJ AHB */
        GEL_MapAddStr(0x40061000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTK */
        GEL_MapAddStr(0x40062000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTL */
        GEL_MapAddStr(0x40063000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTM */
        GEL_MapAddStr(0x40064000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTN */
        GEL_MapAddStr(0x40065000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTP */
        GEL_MapAddStr(0x40066000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTQ */
        GEL_MapAddStr(0x40067000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTR */
        GEL_MapAddStr(0x40068000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTS */
        GEL_MapAddStr(0x40069000, 0, 0x00001000, "R|W", 0);  /* GPIO PORTT */
        GEL_MapAddStr(0x400AF000, 0, 0x00001000, "R|W", 0);  /* EEPROM */
        GEL_MapAddStr(0x400B6000, 0, 0x00001000, "R|W", 0);  /* ONEWIRE0 */
        GEL_MapAddStr(0x400B8000, 0, 0x00001000, "R|W", 0);  /* I2C8 */
        GEL_MapAddStr(0x400B9000, 0, 0x00001000, "R|W", 0);  /* I2C9 */
        GEL_MapAddStr(0x400C0000, 0, 0x00001000, "R|W", 0);  /* I2C4 */
        GEL_MapAddStr(0x400C1000, 0, 0x00001000, "R|W", 0);  /* I2C5 */
        GEL_MapAddStr(0x400C2000, 0, 0x00001000, "R|W", 0);  /* I2C6 */
        GEL_MapAddStr(0x400C3000, 0, 0x00001000, "R|W", 0);  /* I2C7 */
        GEL_MapAddStr(0x400D0000, 0, 0x00001000, "R|W", 0);  /* EPI0 */
        GEL_MapAddStr(0x400E0000, 0, 0x00001000, "R|W", 0);  /* TIMER6 */
        GEL_MapAddStr(0x400E1000, 0, 0x00001000, "R|W", 0);  /* TIMER7 */
        GEL_MapAddStr(0x400EC000, 0, 0x00001000, "R|W", 0);  /* EMAC0 */
        GEL_MapAddStr(0x400F9000, 0, 0x00001000, "R|W", 0);  /* SYSEXC */
        GEL_MapAddStr(0x400FC000, 0, 0x00001000, "R|W", 0);  /* HIB */
        GEL_MapAddStr(0x400FD000, 0, 0x00001000, "R|W", 0);  /* FLASH CTRL */
        GEL_MapAddStr(0x400FE000, 0, 0x00001000, "R|W", 0);  /* SYSCTL */
        GEL_MapAddStr(0x400FF000, 0, 0x00001000, "R|W", 0);  /* UDMA */
        GEL_MapAddStr(0x44030000, 0, 0x00001000, "R|W", 0);  /* CCM0 */
        GEL_MapAddStr(0x44034000, 0, 0x00002000, "R|W", 0);  /* SHAMD5 */
        GEL_MapAddStr(0x44036000, 0, 0x00002000, "R|W", 0);  /* AES */
        GEL_MapAddStr(0x44038000, 0, 0x00002000, "R|W", 0);  /* DES */
        GEL_MapAddStr(0x44050000, 0, 0x00001000, "R|W", 0);  /* LCD0 */
        GEL_MapAddStr(0xE000E000, 0, 0x00001000, "R|W", 0);  /* NVIC */
    
        GEL_TextOut("\nMemory Map Initialization Complete\n");
    
    }
    
    

    ...and the other file Cortex_M3_util.gel:

    /*******************************************************************/ 
    /* This GEL file is loaded on the command line of Code Composer    */
    /*                                                                 */
    /* History:                                                        */
    /* Version  Author         Date        Comments                    */
    /* 1.0      Kamal Nehal    Unknown     Initial Version AEC/Aries   */
    /* 1.1      Krishna Allam  11/30/2009  Removed use of GEL_WatchAdd */
    /*                                     It is not supported in CCSv4*/
    /*******************************************************************/
    
    #define MPU_ON    0x00000001
    #define MPU_OFF   ~MPU_ON
    
    
    menuitem "MPU"
    
    hotmenu Enable_MPU()
    {
       int status;
    
        status =  MPU_CONTROL;
        status |= MPU_ON;
        MPU_CONTROL = status;
    
        status = MPU_CONTROL;
    
        if ( (status & MPU_ON) == MPU_ON )
        {
            GEL_TextOut("MPU is ON. \n\n");
        }
       else
       {
           GEL_TextOut("MPU is OFF. \n\n");
       }
    }
    
    hotmenu Disable_MPU()
    {
        int status;
    
        status =  MPU_CONTROL;
        status &= MPU_OFF;
        MPU_CONTROL= status;
    
        status = MPU_CONTROL;
    
        if ( (status & MPU_ON) == MPU_ON )
        {
            GEL_TextOut("MPU Is ON. \n\n");
        }
        else
        {
           GEL_TextOut("MPU Is OFF. \n\n");
        }
    }
    

  • I don't see anything in the GEL files that would trigger a reset. Can you try starting a project-less debug session and see if a reset is triggered also?

  • Ki said:

    I don't see anything in the GEL files that would trigger a reset. Can you try starting a project-less debug session and see if a reset is triggered also?

    Hi Ki - Before we spend any more time on this, let me try in the office with another machine (a laptop I'm nearly certain this has worked with).  I've been working from home this week but plan to go into the office within the next few days to address some tasks and will give it a try then.  I very much appreciate your quick responses and willingness to help.  I'll make a note to reply back after I try with this laptop.

  • Sure, keep me posted.

    Thanks

    ki