Skip to content

Debugging with nSIM

Anna Pologova edited this page Jan 13, 2016 · 20 revisions

It is expected that you have already built your application and created a debug configuration for it. About how to do it you can read on the following pages:

Specifying nSIM properties

Choosing nSIM on debug tab

Choosing nSIM on debug tab

In this tab, user needs 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.

Other available options:

  • JIT checkbox enables Just-In-Time compilation. You can also specify a number of threads to use in JIT mode.
  • GNU host I/O support, if checked, enables nSIM GNU host I/O support. It means that input/output requests from application will be handled by nSIM and redirected to the host system. This could be used, for example, to enable functions in the C library, such as printf() and scanf(). This option works only if the application is compiled with the ARC GCC compiler.
  • Enable Exception, Memory Exception and Invalid Instruction Exception options, if checked, tell nSIM to simulate all exceptions, memory exceptions and invalid instruction expections, respectively. If one of these options is unchecked and corresponding exception happens, nSIM will break with an error instead.

Debugging an application

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

Debugging with nSIM gdbserver

Debugging with nSIM gdbserver

Debug Window

Debug Window

nSIM gdbserver output in console

nSIM gdbserver output in console

Clone this wiki locally