Running Program on Target Board

Setting Up Serial Device

We are using Linux application minicom for serial communication. You could use any other serial communication applications like python-serial.

Note

Make sure that the board is connected to the host PC via micro USB cable. Also ensure that you use the correct serial device! In most cases it would be /dev/ttyUSB0.

minicom -h will give you an idea of options avilable in minicom.

To setup minicom :

sudo minicom aries

Resetting Target Board

You could reset target board by pressing the reset button. You should reset the Board every time before you upload programs to the Board. You could find reset button of your target board from Board pin mapping. If your reset was correct you will see something like this in terminal :


 +-----------------------------------------------------------------------------+
 |           VEGA Series of Microprocessors Developed By C-DAC, INDIA          |
 |     Microprocessor Development Programme, Funded by MeitY, Govt. of India   |
 +-----------------------------------------------------------------------------+
 | Bootloader, ver 1.0.0 [  (hdg@cdac_tvm) Tue Dec  15 16:50:32 IST 2020 #135] |
 |                                                                             |
 |  ___    _________________________          ISA  : RISC-V [RV32IM]           |
 |  __ |  / /__  ____/_  ____/__    |                                          |
 |  __ | / /__  __/  _  / __ __  /| |         CPU  : VEGA ET1031               |
 |  __ |/ / _  /___  / /_/ / _  ___ |                                          |
 |  _____/  /_____/  \____/  /_/  |_|         SoC  : THEJAS32                  |
 +---------------------------------------+-------------------------------------+
 |         www.vegaprocessors.in         |             vega@cdac.in            |
 +---------------------------------------+-------------------------------------+

 Transfer mode  : UART XMODEM
 
 IRAM           : [0x200000 - 0x23E7FF] [250 KB]
 
 Please send file using XMODEM and then press ENTER key.
 CCCCCCCCCCCCC

Uploading Program to Target Board

While uploading, we are transferring the .bin file to the target board and executing that file on target board. VEGA SDK supports many methods for uploading program. Follow the method supported by your target board. Upload mode is set using BOOT SEL Switch. Find BOOT SEL Switch from Board pin mapping.

ARIES Board

BOOT SEL OPEN

Uploading Using UART

BOOT SEL CLOSE

Boot from Flash

Uploading Using UART

Uploading using UART method uses XMODEM protocol to upload program.

  1. Open minicom, reset board and make sure Transfer mode is UART XMODEM.

  2. Use CTRL+A S to enter file sending menu and select xmodem by pressing Enter.

    +-[Upload]--+
    | zmodem    |
    | ymodem    |
    |>xmodem<   |
    | kermit    |
    | ascii     |
    +-----------+
    
  3. In the next window, with space bar select the .bin file to be transferred, by pressing Enter, transfer process starts.

  4. Wait until the process is completed. The screen should display how much data has been transferred.

  5. After completing transfer the Program will start to execute.