• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » Receive error message when trying to debug RDK-S2E application.
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS

Receive error message when trying to debug RDK-S2E application.

Receive error message when trying to debug RDK-S2E application.

This question is answered
john hoffman
Posted by john hoffman
on May 07 2012 13:54 PM
Intellectual440 points

I receive the error message below when trying to debug the RDK-S2E application.

I am using CC 5.1.1 and the BlackHawk USB-100v2-ARM emulator.

I have not modified the application that came with the SDK. I am still trying do basic stuff.

BlackHawk indicates that the problem is on TI end as their "test connection" diags pass.


 

CORTEX_M3_0: GEL Output:

Memory Map Initialization Complete

CORTEX_M3_0: GEL Output: Watchdog Timer Enabled

CORTEX_M3_0: GEL Output: UARTs Enabled

CORTEX_M3_0: Can't Run Target CPU: (Error -1268 @ 0x1090001) Device is locked up in Hard Fault or in NMI. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 5.0.569.0)

JTAG RDK-S2E CodeComposer
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Erick Macias
    Posted by Erick Macias
    on May 08 2012 16:40 PM
    Intellectual1860 points

    Hello John,

     I have programmed both CCS projects included in the RDK-S2E with the Blackhawk USB-100v2-ARM Rev 3.1.

    These are the steps I followed to succesfully program the Serial to Ethernet Kit:

    1) Import the boot_eth CCS project from C:/Stellarisware/boards/rdk-s2e/boot_eth

    2) Make sure the target configuration in CCS is the following:

    3) Provided USB power to the Blackhawk XDS100v2 Emulator and to the RDK-S2E.

    4) Download the application. (Click on debug)

    Note: Make sure you have the latest XDS100v2 drivers. To check if there are avaiable BlackHawk drivers click on Help->Check for Updates and the available updates will appear.

    There are a few questions I would like you for you to provide more information on.

    1) When you connect an Ethernet cable and provide power to the RDK-S2E, do the lights on the Ethernet connector turn on?

    2) Have you been done a bootloader update using the LM Flash Programmer tool?

    3) Which CCS project are you downloading to the board ?

    4) What revision of the Blackhawk XDS100v2 emulator are you using?

    Let me know if you have additional questions.

    Regards,

    -Erick

     

     

    ---------------------------------------------------------------------------------------------------------
    Please click the Verify Answer
    button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

    LM3s6432 RDK-S2E Blackhawk XDS100v2
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • john hoffman
    Posted by john hoffman
    on May 09 2012 05:38 AM
    Intellectual440 points

    Erick,

    1) Yes, power is on and the application is working. I am able to start debugging, I get the error message after a couple of step over debug commands. The debugger starts in main and then after I step or run to line, I get the error message every time. I have never been able to set breakpoints outside main.

    2) I have not done a bootloader update. I have the application as it came from TI.

    3) The project is the ser2enet

    4) I just got the blackhawk emulator.They had to get it directly from Blackhawk who was mfging to order.

     

     

     

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Erick Macias
    Posted by Erick Macias
    on May 09 2012 18:12 PM
    Intellectual1860 points

    Hello John,

    I want you to perform some tests to check if the Blackhawk emulator is programming the RDK-S2E correctly.

    When you connect the Ethernet cable from a router to the RDK-S2E the LEDs should be on. When you click on debug in CCS :

    1) Does the Loading Program window appear (similar to the one below):

    2) Before you hit run, enable a breakpoint in line 245:

    3) Click Resume (F8)

    4) Does it stop in the breakpoint or does it give an error in the console?

    5) Reset the power on the RDK-S2E board, does the application work as expected?

    6) If the application works correctly, add a while(1); at the beginning of main().

    7) Click debug to download the software to the board.

    8) Click Resume (F8)

    9) If you pause the debugger, does it give you an error?

    10) Reset the power, do the Ethernet LEDs turn on? 

    There is another test you can run if you have a Stellaris Evaluation Kit. Instead of using the Blackhawk to program the RDK-S2E, connect the 20 pin connector on the Evaluation kit to the adapter included in the RDK-S2E which connects to the JTAG connector (10 pin) on the board. This will require to change the CCS Target configuration shown below:

    Regards,

    - Erick

     

    ---------------------------------------------------------------------------------------------------------
    Please click the Verify Answer
    button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • john hoffman
    Posted by john hoffman
    on May 16 2012 03:08 AM
    Intellectual440 points

    I have switched gears a bit. I am now evaluating IAR Workbench and JLink debugger instead of CodeCompoaer and Blackhawk.

    Interestingly the code fails about in the same spot but using JLink the debugger shows Undefined Instruction (UDF) .

    I have commented out the call to

     lwIPInit(pucMACAddr, g_sParameters.ulStaticIP, g_sParameters.ulSubnetMask,    g_sParameters.ulGatewayIP, ((g_sParameters.ucFlags & CONFIG_FLAG_STATICIP) ? IPADDR_USE_STATIC : IPADDR_USE_DHCP));

    and things progress much further.

    I kept digging and it seems that once this line executes, the debuggers are not functioning as I would expect them:

    EthernetIntEnable(ETH_BASE, ETH_INT_RX | ETH_INT_TX);

    I have also observed that the finder utility and telnet ports stop working when debugging. It this expected or should everything work normally when debugging?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Erick Macias
    Posted by Erick Macias
    on May 16 2012 15:09 PM
    Verified Answer
    Verified by john hoffman
    Intellectual1860 points

    Hello John,

    The application is not running properly because the CCS and IAR IDEs are not executing the bootloader start up code prior to main as it normally does when the device's power is  reset. The application is trying to execute the code inside the Ethernet interrupt handler but since the NVIC table has the incorrect offset it jumps to a wrong address instead.

    The Stellaris Boot Loader User's Guide provides more detail to the Startup code in page 9.

    Boot Loader User's Guide : http://www.ti.com/litv/pdf/spmu134n#page=9

    When the board's power is reset the Nested Vectored Interrupt Controller (NVIC) table resides in the code memory region and  has an offset of 0x00000000, assuming the application is written in address 0x00000000. The ser2enet application starts at address 0x00001000, therefore the NVIC table's offset should be 0x00001000. The line of code which sets the NVIC table's offset to 0x00001000 is part of the bootloader start up code which is not being executed when debugging the application in IAR or CCS.

    I recommend to add the following line of code to the ser2enet code example to debug your application:

    Let me know if you have additional questions.

    Regards,

    Erick

    ---------------------------------------------------------------------------------------------------------
    Please click the Verify Answer
    button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • john hoffman
    Posted by john hoffman
    on May 17 2012 06:36 AM
    Intellectual440 points

    Erick,

     

    Thanks for the post. That absolutely resolved my issue.

     

    I had read the doc you mentioned. It does not describe how to use the debugger in this situation.

     

    Our intent for the S2E module is to use the S2E code as a starting point for our new  product. We are going to make our own board with the Stellaris micro. The ability to upgrade FW in the field is a requirement. Being able to debug in the lab is also very attractive. No one finds new use cases like QA. So my question is this. Is it possible to have one set of code that can be used for production and be able to debug?

     

    IAR has a feature where you can attach the debugger without flashing. Is this what I am looking for?

     

     

    John

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Erick Macias
    Posted by Erick Macias
    on May 17 2012 10:12 AM
    Intellectual1860 points

    Hello John,

    Glad to hear that you got to debug thecode and that you are moving forward.

    john hoffman

     Is it possible to have one set of code that can be used for production and be able to debug?

    The ser2net code you modified can be used for both production and debugging, in this case you would have an extra line of code to debug your firmware when the application is at address 0x00001000. The binary image created by IAR/CCS will work properly when you upgrade the firmware in the field.

    You can also debug your application by removing the line of code I recommended, and moving the start of the application code to 0x0000000 in the linker file.

    The following changes are required to start the application at 0x00000000 ( Files located in C:\StellarisWare\boards\rdk-s2e\ser2enet):

    IAR linker file (extension .icf) :

     //
    // Define a region for the on-chip flash.
    //
    define region FLASH = mem:[from 0x00001000 to 0x000177ff]; change to 0x00000000

    CCS linker file (extension .cmd):

    #define APP_BASE 0x00001000 change to 0x00000000
    #define RAM_BASE 0x20000000

    /* System memory map */

    MEMORY
    {
        /* Application stored in and executes from internal flash */
        FLASH (RX) : origin = APP_BASE, length = 0x00016800 change to 0x00017800

    The previous changes would allow you to debug your application without having to add the line of code to initialize the NVIC table, but when you want to do a field update the changes would have to be reversed.

    john hoffman

    IAR has a feature where you can attach the debugger without flashing. Is this what I am looking for?

     This feature will not allow you to run the start up code required to initialize the NVIC table, instead you can run the unmodified version of the ser2enet project in CCS (I'm currently running CCSv5.2.0.00044) and download the firmware to the board, click the reset button and then click run your application. The feature to reset and then run does not work in IAR.

    Let me know if you have additional questions.

    Regards,

    - Erick

    ---------------------------------------------------------------------------------------------------------
    Please click the Verify Answer
    button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

    ser2enet
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use