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