Skip to content
Huaqi Fang edited this page Jul 18, 2018 · 11 revisions

Getting Started

Use this guide to get started with your embARC BSP.

Checking Out the embARC BSP Code

The embARC BSP source code is hosted in a github repository that supports cloning via git. There are scripts and such in this repository that you'll need to set up your development environment, and we'll be using git to get this repository. You can download the zip file to get the code in the github as alternative.

We'll begin by using git to clone the repository anonymously.

# On Windows
cd %userprofile%
# On Linux
cd ~
# embARC BSP for EMSK
git clone https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_emsk_bsp.git embarc_bsp

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

Building a Sample Application

Using the hello world as a base model, the following section will describe how to build a embARC BSP application. The following sections contain the commands with using ARC GNU toolchain and MetaWare toolkit in a Windows environment. Please use the appropriate commands for your OS.

Follow these steps to build a sample application.

  1. Make sure the ARC GNU toolchain is installed in your environment.

  2. Generate board configuration files and move them to the application folder. Use following commands for the EMSK 2.3 board and ARC EM7D as an example.

    # EMSK 2.3, ARC EM7D
    cd embarc_bsp\board\emsk\configs\23
    # MetaWare
    tcftool arcem7d.tcf -q -x C_defines,arc_core_config.h -x ccac.arg
    # ARC GNU
    tcftool arcem7d.tcf -q -x C_defines,arc_core_config.h -x gcc.arg
  3. Move linker script and copy arc_core_config.h and .arg to the application folder.

    # MetaWare
    mv arc_core_config.h ccac.arg ../../../../example/hello/mwdt
    cp ld\linker_mw.ld ../../../../example/hello/mwdt
    cd ..\..\..\..\example\hello\mwdt
    mv linker_mw.ld arc_core.ld
    # ARC GNU
    mv arc_core_config.h gcc.arg ../../../../example/hello/arcgnu
    cp ld\linker_gnu.ld ../../../../example/hello/arcgnu
    cd ..\..\..\..\example\hello\arcgnu
    mv linker_gnu.ld arc_core.ld
  4. Build the hello world example for the EMSK 2.3 board and ARC EM7D.

    make

    Note

    make for ARC GNU toolchain, gmake for MetaWare toolkit

Clone this wiki locally
You can’t perform that action at this time.