Learn with SHAKTI

Using Arty-7 100T with SHAKTI


STEP 1: Prerequisites


Note: Please ensure SHAKTI C Class is programmed onto the Arty-7 100t board

1. Install the required packages.

If you face any error while running any command, Please refer FAQ section.

2. Please ensure SHAKTI toolchain is installed successfully.

3. Please connect Arty-7 100t board to the system using the microUSB cable.

Board connected to system

Step 2: Write a simple C program to print Hello world


Copy paste the below content in it and save it as first.c


STEP 3: Compile and Build


1. Move inside the spiking folder and update it.

2. In the spiking folder, Run the below commands to compile first.c for SHAKTI. The necessary header and linker files are included in the spiking repository.

  • To generate crt.o from crt.S which is available in spiking folder.
  • To generate syscalls.shakti from syscalls.c which is available in spiking folder.
  • To generate uart.o from uart.c which is available in spiking folder.
  • To generate first.o from first.c which is the file created in the earlier step.
  • To link all the object files (.o, .shakti) using the linker file link.ld.

STEP 4: Debugging


The Arty-7 100T board is programmed with SHAKTI C class SoC. Please ensure Arty-7 100T board is connected to the the Host PC.

The following steps list out the actions to be taken,

If you face any error while running any command, Please refer FAQ section.

  • TERMINAL 1: Open a serial port in this terminal, Here the output of the program is displayed.

    Note: "/dev/ttyUSB0" - ttyUSB means "USB serial port adapter" and the "0" ( "0" or "1" or "2") is the USB device number to which the board is connected and 19200 is the default baud rate.

  • TERMINAL 2: Open a new terminal and move to spiking folder. Here, run OpenOCD with the ftdi.cfg.

  • TERMINAL 3: Open a new terminal and move to spiking folder. Now start the gdb debugging session by running below command. What are the most used RISC-V GDB Commands?

  • Switch to TERMINAL 1 to view the output of the C program.