embARC users are welcome to make contributions to embARC, including examples, source code (bug fixes and/or new packages), and documentation. This document is intended to help you contribute to embARC Applications quickly.
- Prerequisites
- Getting Start with Existing Application
- Creating a New Application in embARC
- Developing Your Application Using Git
- Committing Your Work
- Copyright Notice
The hardware we used during development is EM Starter Kit(aka EMSK). We need to download and install the following tools:
-
Download and install Development Tools.
- Here we use GNU Toolchain in windows host.
- For using GNU or other tools in different host, see Getting Started with embARC OSP for reference.
-
Download and install Digilent Adapt Software, driver for Digilent JTAG-USB cable.
-
Download and install Zadig, replacing a driver for Windows host.
- Before you can start using OpenOCD, you have to download WinUSB driver and replace with it one of FTDI drivers for your hardware development system.
- See How to Use OpenOCD on Windows for reference.
- For more information, see ARC GNU Toolchain Wiki Home.
Notices: To do that, you have to connect EMSK to PC using JTAG-USB cable. Then click on the Options - List all devices, and you can find Digilent USB Device(Interface 0/1). Just replacing Digilent USB Device(Interface 0) to WinUSB driver, it helps PC to load executable file into EMSK.
You can see Digilent USB Device in the Device Manager if the driver has been installed successfully.
-
Get embARC OSP and embARC Applications source code.
- Get a Github Account. Download and install Git,and you have to learn how to develop projects using git. See Git Book for reference.
- Download the embARC OSP and rename it to embarc_osp.
- Fork the embarc_applications to your own repo. You will develop the project based on that in your host.
-
Goto the folder
./embarc_osp
. Run the Git Bash and type the following commands to clone embARC Applications source code to./embarc_osp/application
folder:cd embarc_osp git clone https://github.com/foss-for-synopsys-dwc-arc-processors/embarc_applications.git application
Then, you can see there are serval applications existing in this folder, such as aws_iot_smarthome, aws_iot_smarthome_multinode, etc.
- See embARC Applications README for reference.
-
Download and install Doxygen for building embARC document.
Goto the path:
./embarc_osp/doc
, run the Command Line and use the following commands to make embARC document.A few minutes later, you can open the embARC_Document.html using browser.
-
Download and install Tera Term.
We provided some examples and applications in embARC, user can take reference from them.
- Access to the examples: source code of embARC examples
- Access to the applications: source code of embARC applications
Here we take bootload example using GNU and EMSK 2.2, EM11D for example. Goto the path: .\embarc_osp\example\baremetal\bootloader
, run the Command Line and type commands for building and running.
Run the Tera Term:
For more detail information, see Getting Started with embARC Using GNU on Windows for reference. And see Getting Started with embARC OSP to learn how to get start with embARC using different toolsets or hosts.
See the document Example Usage Guide - ./embarc_osp/doc/embARC_Document/html/page_example_usage.html
in the embarc_osp for more detail information. It will help you to create a Hello World application using ARC GNU quickly.
-
Make sure you have installed Git,and know how to use it.
-
Goto the folder
./embarc_osp/application
, create a new folder for your own application, like smart_device. Please notice that your application projects should be placed under the folder./embarc_osp/application
, not./embarc_osp/example
. -
Copy example.makefile and main.c.tmpl in
./embarc_osp/example
folder to the newly created smart_device folder.- Rename example.makefile to makefile.
- Rename main.c.tmpl to main.c.
- Change the configurations in makefile according to your hardware configuration.
- Modify your main.c.
- Compile this application on the command line.
- Run or debug this application. See the document Example Usage Guide in the embARC OSP documentation for more information.
Notices: All C source code must adhere to Linux Kernel Coding Style. The source-code files in embARC are documented with C-style code comments and Doxygen-based comments. A Doxygen comment example is shown below:
/** * \defgroup EMBARC_APP_TMPL embARC Template Example * \ingroup EMBARC_APPS_TOTAL * \ingroup EMBARC_APPS_BOARD_EMSK * \ingroup EMBARC_APPS_BAREMETAL * \brief embARC Example for template * \details * ### Extra Required Tools * ### Extra Required Peripherals * ### Design Concept * ### Usage Manual * ### Extra Comments */ /** * \file * \ingroup EMBARC_APP_TMPL * \brief main source of template example */ /** * \addtogroup EMBARC_APP_TMPL * @{ */ /* embARC HAL */ #include "embARC.h" #include "embARC_debug.h" /** main entry */ int main(void) { EMBARC_PRINTF("Hello embARC from template example\r\n"); return E_SYS; } /** @} */
- See Contributing to embARC OSP for more information about Coding-Style, Document-Style and Git Commit Message Guide, etc.
-
Developing your application using Git. See Git Book for learning how to use it.
You can contribute your work by submitting Pull Request to embarc_applications in github after finishing your project development. Creating a new Pull Request:
Choose to compare across forks:
Choose compare changes:
Create the new pull request:
Copyright (c) 2017, Synopsys, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
Neither the name of the Synopsys, Inc., nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. NY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
For complete embARC license information, please refer to the embARC FOSS Notice License.