1.. _iotdk: 2 3DesignWare(R) ARC(R) IoT Development Kit 4######################################## 5 6Overview 7******** 8 9The DesignWare(R) ARC(R) IoT Development Kit is a versatile platform that 10includes the necessary hardware and software to accelerate software 11development and debugging of sensor fusion, voice recognition, and face 12detection designs. The ARC IoT Development Kit includes a silicon 13implementation of the ARC Data Fusion IP Subsystem running at 144 MHz on 14SMIC's 55-nm ultra-low power process, and a rich set of peripherals commonly 15used in IoT designs such as USB, UART, SPI, I2C, PWM, SDIO, and ADCs. 16 17.. image:: ./iotdk.jpg 18 :width: 442px 19 :align: center 20 :alt: DesignWare(R) ARC(R)IoT Development Kit (synopsys.com) 21 22For details about the board, see: `ARC IoT Development Kit 23(IoTDK) <https://www.synopsys.com/dw/ipdir.php?ds=arc_iot_development_kit>`__ 24 25 26Hardware 27******** 28 29For hardware feature details, refer to : `ARC IoT Development Kit 30<http://embarc.org/embarc_osp/doc/build/html/board/iotdk.html>`__ 31 32 33Programming and Debugging 34************************* 35 36Required Hardware and Software 37============================== 38 39To use Zephyr RTOS applications on the IoT Development Kit board, a few 40additional pieces of hardware are required. 41 42* A micro USB cable provides power to the board; however, if the 43 board is to run standalone, the universal switching power adaptor (110-240V 44 AC to 5V DC), provided in the package, can be used to power the board. 45 46* :ref:`The Zephyr SDK <zephyr_sdk>` 47 48* Terminal emulator software for use with the USB-UART. Suggestion: 49 `Putty Website`_. 50 51* (optional) A collection of Pmods, Arduino modules, or Mikro modules. 52 See `Digilent Pmod Modules`_ or develop your custom interfaces to attach 53 to the Pmod connector. 54 55Set up the ARC IoT Development Kit 56================================== 57 58To run Zephyr application on IoT Development Kit, you need to 59setup the board correctly. 60 61* Connect the digilent usb cable from your host to the board. 62 63* Connect the 5V DC power supply to your board (optional). 64 65Set up Zephyr Software 66====================== 67 68Building Sample Applications 69============================== 70 71You can try many of the sample applications or tests, but let us discuss 72the one called :ref:`hello_world`. 73It is found in :zephyr_file:`samples/hello_world`. 74 75Configuring 76----------- 77 78You may need to write a prj_arc.conf file if the sample doesn't have one. 79Next, you can use the menuconfig rule to configure the target. By specifying 80``iotdk`` as the board configuration, you can select the ARC IoT Development 81Kit board support for Zephyr. 82 83.. zephyr-app-commands:: 84 :board: iotdk 85 :zephyr-app: samples/hello_world 86 :goals: menuconfig 87 88 89Building 90-------- 91 92You can build an application in the usual way. Refer to 93:ref:`build_an_application` for more details. Here is an example for 94:ref:`hello_world`. 95 96.. zephyr-app-commands:: 97 :board: iotdk 98 :zephyr-app: samples/hello_world 99 :maybe-skip-config: 100 :goals: build 101 102Connecting Serial Output 103========================= 104 105In the default configuration, Zephyr's IoT Development Kit images support 106serial output via the USB-UART on the board. To enable serial output: 107 108* Open a serial port emulator (i.e. on Linux minicom, putty, screen, etc) 109 110* Specify the tty driver name, for example, on Linux this may be 111 :file:`/dev/ttyUSB0` 112 113* Set the communication settings to: 114 115 116========= ===== 117Parameter Value 118========= ===== 119Baud: 115200 120Data: 8 bits 121Parity: None 122Stopbits: 1 123========= ===== 124 125Debugging 126========== 127 128Using the latest version of Zephyr SDK(>=0.9), you can debug and flash IoT 129Development Kit directly. 130 131One option is to build and debug the application using the usual 132Zephyr build system commands. 133 134.. zephyr-app-commands:: 135 :board: iotdk 136 :app: <my app> 137 :goals: debug 138 139At this point you can do your normal debug session. Set breakpoints and then 140'c' to continue into the program. 141 142The other option is to launch a debug server, as follows. 143 144.. zephyr-app-commands:: 145 :board: iotdk 146 :app: <my app> 147 :goals: debugserver 148 149Then connect to the debug server at the IoT Development Kit from a second 150console, from the build directory containing the output :file:`zephyr.elf`. 151 152.. code-block:: console 153 154 $ cd <my app> 155 $ $ZEPHYR_SDK_INSTALL_DIR/arc-zephyr-elf/bin/arc-zephyr-elf-gdb zephyr.elf 156 (gdb) target remote localhost:3333 157 (gdb) load 158 (gdb) b main 159 (gdb) c 160 161Flashing 162======== 163 164If you just want to download the application to the IoT Development Kit's CCM 165and run, you can do so in the usual way. 166 167.. zephyr-app-commands:: 168 :board: iotdk 169 :app: <my app> 170 :goals: flash 171 172This command still uses openocd and gdb to load the application elf file to 173IoT Development Kit, but it will load the application and immediately run. If 174power is removed, the application will be lost since it wasn't written to flash. 175 176Most of the time you will not be flashing your program but will instead debug 177it using openocd and gdb. The program can be download via the USB cable into 178the code and data memories. 179 180When you are ready to deploy the program so that it boots up automatically on 181reset or power-up, you can follow the steps to place the program on SPI-FLASH 182or internal eFlash. 183 184For instructions on how to write your program to FLASH, refer to the 185documentation on the IoT Development Kit at the `embARC website`_. 186 187Release Notes 188************* 189 190References 191********** 192 193.. _embARC website: https://www.embarc.org 194 195.. _Designware ARC IoT Development Kit website: <https://www.synopsys.com/dw/ipdir.php?ds=arc_iot_development_kit>`_ 196 197.. _Digilent Pmod Modules: http://store.digilentinc.com/pmod-modules 198 199.. _Putty website: http://www.putty.org 200