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