Skip to content

Debugging with nSIM

Anton Kolesov edited this page Dec 18, 2014 · 20 revisions
  1. Creating C project

![C Project for nSIM debugging](images/C Project for nSIM debugging.png)

_C Project for nSIM debugging_
  1. Choosing nSIM gdbserver under Debug Configuration

    ![Choosing nSIM on debug tab](images/Choosing nSIM on debug tab.png)

    Choosing nSIM on debug tab

    In this tab, user need to indicate correct properties file/TCF file for current CPU core. In general it is recommended to use TCF files, because they are generated from the Build Configuration Registers and thus most reliably describe target core. nSIM Properties files contain list of key-values for nSIM properties which allow to describe target core and additional simulation features, full list of properties is documented in the nSIM User Guide. It is possible to specify both TCF and properties file, with properties file being able to override parameters set in TCF. For example, if you have a TCF for a little endian core, but would like to simulate it as a big endian, it is possible to create an properties file that will set only a single property for big endian, then in IDE GUI in nSIM GDBserver settings specify bath to both TCF and properties file and that will give a desired results.

    ![Choosing proper properties file for nSIM](images/Choosing proper properties file for nSIM.png)

    To see output from the target application, go to Common tab and check "Allocate console (necessary for input)".

    ![Check “Allocate console” in Common Tab] (images/Check “Allocate console” in Common Tab.png)

    Check “Allocate console” in Common Tab

    Choosing proper properties file for nSIM

  2. Debugging an ARC EM C project

To debug application using nSIM, press "Debug" button of IDE.

![Start nSIM gdbserver debugging](images/Start nSIM gdbserver debugging.png)

Start nSIM gdbserver debugging.jpg

![Debugging with nSIM gdbserver](images/Debugging with nSIM gdbserver.png)

Debugging with nSIM gdbserver

![Debug Window](images/Debug Window.png)

Debug Window

![Open nSIM gdbserver properties](images/Open nSIM gdbserver properties.png)

Open nSIM gdbserver properties

![nSIM gdbserver properties](images/nSIM gdbserver properties.png)

nSIM gdbserver properties

![nSIM gdbserver output in console](images/nSIM gdbserver output in console.png)

nSIM gdbserver output in console

Clone this wiki locally