Getting Started

Use this guide to get started with your ARC labs development.

Software Requirement

  • ARC Development Tools

    Select MetaWare Development Toolkit or GNU Toolchain for ARC Processors from the following list according to your requirement.

    • MetaWare Development Toolkit
      • Premium MetaWare Development Toolkit (2018.06). The DesignWare ARC MetaWare Development Toolkit builds upon a 25-year legacy of industry-leading compiler and debugger products. It is a complete solution that contains all the components needed to support the development, debugging, and tuning of embedded applications for the DesignWare ARC processors.
      • DesignWare ARC MetaWare Toolkit Lite (2018.06). A demonstration or evaluation version of the MetaWare Development Toolkit is available for free from the Synopsys website. MetaWare Lite is a functioning demonstration of the MetaWare Development Toolkit with restrictions such as code-size limit of 32 Kilobytes and no runtime library sources. It is available for Microsoft Windows only.
    • GNU Toolchain for ARC Processors
  • Digilent Adept Software for Digilent JTAG-USB cable driver. All the supported boards are equipped with on board USB-JTAG debugger. One USB cable is required and external debugger is not required.

  • Tera Term or PuTTY for serial terminal connection. The serial configurations are 115200 baud, 8 bits data, 1 stop bit, and no parity (115200-8-N-1) by default.

Note

If using embARC with GNU toolchain on Windows, please install Zadig to replace FTDI driver with WinUSB driver. See How to Use OpenOCD on Windows for more information. If you want to switch back to Metaware toolchain, make sure you switch back the usb-jtag driver from WinUSB to FTDI driver.

Install Software Tools

Install MetaWare Development Toolkit

Installing MetaWare Development Toolkit (2017.09).

  1. Double click the mw_dekit_arc_i_2017_09_win_install.exe and click Next.
../_images/mwdt_1.png
  1. Select I accept and click Next.
../_images/mwdt_2.png
  1. Select Typical installation and click Next.
../_images/mwdt_3.png
  1. Set the install path (make sure you use English letters without any space) and click Next until the installation is complete.
../_images/mwdt_4.png
  1. Set the license file (SNPSLMD_LICENSE_FILE) for MetaWare Development Toolkit. It can be a real file containing license or a license server.
  • For Windows, go to Computer > Properties > Advanced > Environment Variables > System Variables > New.
../_images/mwdt_5.png
  • For Linux, add SNPSLMD_LICENSE_FILE into your system variables.
  1. Test the MetaWare Development Toolkit and the license

At the command prompt, compile and link in one step.

For example, find the queens.c in the demos folder of MetaWare Development Toolkit installation directory.

# On Windows
cd  C:\ARC\MetaWare\arc\demos
ccac queens.c

If you get the following message without any error, then the MetaWare Development Toolkit is successfully installed.

MetaWare C Compiler N-2017.09 (build 005)       Serial 1-799999.
(c) Copyright 1987-2017, Synopsys, Inc.
MetaWare ARC Assembler N-2017.09 (build 005)
(c) Copyright 1996-2017, Synopsys, Inc.
MetaWare Linker (ELF/ARCompact) N-2017.09 (build 005)
(c) Copyright 1995-2017, Synopsys, Inc.

Install GNU Toolchain for ARC Processors

Click (https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases) to get the latest version of GNU Toolchain for ARC Processors.

To use and install GNU Toolchain for ARC Processors, please see (http://embarc.org/toolchain/ide/index.html).

It is recommended to install GNU Toolchain for ARC Processors in the path (windows: C:\arc_gnu\, linux: ~/arc_gnu/) and add arc_gnu/bin into $PATH variable.

Install embARC OSP

The embARC OSP source code is hosted in a GitHub repository that supports cloning through git. There are scripts in this repo that you are need to set up your development environment, and Git is used to get this repo. If you do not have Git installed, see the beginning of the OS-specific instructions below for help.

Using Git to clone the repository anonymously

# On Windows
cd %userprofile%
# On Linux
cd ~

git clone https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_osp.git embarc_osp

You have successfully checked out a copy of the source code to your local machine.

Install ARC labs code

The source codes of ARC labs are assumed to work with embARC OSP. Please use git to clone or download the ARC labs to the root folder of embARC OSP. If the download is successful, the following folder structure is displayed:

cd path/to/embarc_osp
git clone https://github.com/foss-for-synopsys-dwc-arc-processors/arc_labs.git arc_labs
embarc_osp
├── arc
├── board
├── device
├── doc
├── example
├── arc_labs
├── inc
├── library
├── middleware
├── options
└── os

Final Check

Check the following items and set development environment.

  • Make sure the paths of MetaWare Development Toolkit or GNU Toolchain for ARC Processors are added to the system variable PATH in your environment variables.
  • It is recommended to install GNU Toolchain for ARC Processors to default location. Otherwise, you need to make additional changes as described.
    • If running and debugging embARC applications using arc-elf32-gdb and OpenOCD for ARC, make sure the path of OpenOCD is added to the PATH in your environment variables and modify OPENOCD_SCRIPT_ROOT variable in <embARC>/options/toolchain/toolchain_gnu.mk to your OpenOCD root path.
    • If running GNU program with using the GNU toolchain on Linux, modify the OpenOCD configuration file as Linux format with LF line terminators. dos2unix can be used to convert it.

Note

Check the version of your toolchain. The embARC OSP software build system is makefile-based. make/gmake is provided in the MetaWare Development Toolkit (gmake) and GNU Toolchain for ARC Processors (make)

Learn More

For more details about embARC OSP, see online docs