Skip to content

Debugging Baremetal Applications Using nSIM

Yuriy Kolerov edited this page Jul 12, 2023 · 24 revisions

Building and Debugging Applications

nSIM supports running and debugging applications for all ARC families. Debugging is not supported for ARCv3 families yet.

Building and Running "Hello, World!"

Consider a simple example code (save it as main.c):

#include <stdio.h>

int main()
{
    printf("Hello, World!\n");
    return 0;
}

You need to use -specs=nsim.specs to use input/output features and to pass -on nsim_emt option to nSIM to use ARC GNU input/output protocol:

$ arc-elf32-gcc -mcpu=archs -specs=nsim.specs main.c -o main.elf
$ nsimdrv -tcf $NSIM_HOME/etc/tcf/templates/hs38_full.tcf -on nsim_emt main.elf
Hello, World!

Using nCAM Model and Profiling

Clone this wiki locally