|
| 1 | +.. _hsdk: |
| 2 | + |
| 3 | +DesignWare(R) ARC(R) HS Development Kit |
| 4 | +######################################## |
| 5 | + |
| 6 | +Overview |
| 7 | +******** |
| 8 | + |
| 9 | +The DesignWare(R) ARC(R) HS Development Kit is a ready-to-use platform for |
| 10 | +rapid software development on the ARC HS3x family of processors. It supports |
| 11 | +single- and multi-core ARC HS34, HS36 and HS38 processors and offers a wide |
| 12 | +range of interfaces including Ethernet, WiFi, Bluetooth, USB, SDIO, I2C, SPI, |
| 13 | +UART, I2S, ADC, PWM and GPIO. A Vivante GPU is also contained in the ARC |
| 14 | +Development System SoC. This allows developers to build and debug complex |
| 15 | +software on a comprehensive hardware platform |
| 16 | + |
| 17 | +.. image:: ./hsdk.jpg |
| 18 | + :width: 442px |
| 19 | + :align: center |
| 20 | + :alt: DesignWare(R) ARC(R) HS Development Kit (synopsys.com) |
| 21 | + |
| 22 | +For details about the board, see: `ARC HS Development Kit |
| 23 | +(IoTDK) <https://www.synopsys.com/dw/ipdir.php?ds=arc-hs-development-kit>`__ |
| 24 | + |
| 25 | +Hardware |
| 26 | +******** |
| 27 | + |
| 28 | +For hardware feature details, refer to : |
| 29 | +`Designware HS Development Kit website`_. |
| 30 | + |
| 31 | +Programming and Debugging |
| 32 | +************************* |
| 33 | + |
| 34 | +Required Hardware and Software |
| 35 | +============================== |
| 36 | + |
| 37 | +To use Zephyr RTOS applications on the HS Development Kit board, a few |
| 38 | +additional pieces of hardware are required. |
| 39 | + |
| 40 | +* A micro USB cable provides USB-JTAG debug and USB-UART communication |
| 41 | + to the board |
| 42 | + |
| 43 | +* A universal switching power adaptor (110-240V |
| 44 | + AC to 12V DC), provided in the package, provides power to 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 | + |
| 55 | +Set up the ARC HS Development Kit |
| 56 | +================================== |
| 57 | + |
| 58 | +To run Zephyr application on IoT Development Kit, you need to |
| 59 | +set up the board correctly. |
| 60 | + |
| 61 | +* Connect the digilent USB cable from your host to the board. |
| 62 | + |
| 63 | +* Connect the 12V DC power supply to your board |
| 64 | + |
| 65 | +Set up Zephyr Software |
| 66 | +====================== |
| 67 | + |
| 68 | +Building Sample Applications |
| 69 | +============================== |
| 70 | + |
| 71 | +You can try many of the :ref:`sample applications and demos |
| 72 | +<samples-and-demos>`. We'll use :ref:`hello_world`, found in |
| 73 | +:zephyr_file:`samples/hello_world` as an example. |
| 74 | + |
| 75 | +Configuring |
| 76 | +----------- |
| 77 | + |
| 78 | +You may need to write a prj_arc.conf file if the sample doesn't have one. |
| 79 | +Next, you can use the menuconfig rule to configure the target. By specifying |
| 80 | +``hsdk`` as the board configuration, you can select the ARC HS Development |
| 81 | +Kit board support for Zephyr. |
| 82 | + |
| 83 | +.. zephyr-app-commands:: |
| 84 | + :board: hsdk |
| 85 | + :zephyr-app: samples/hello_world |
| 86 | + :goals: menuconfig |
| 87 | + |
| 88 | + |
| 89 | +Building |
| 90 | +-------- |
| 91 | + |
| 92 | +You 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: hsdk |
| 98 | + :zephyr-app: samples/hello_world |
| 99 | + :maybe-skip-config: |
| 100 | + :goals: build |
| 101 | + |
| 102 | + |
| 103 | +Connecting Serial Output |
| 104 | +========================= |
| 105 | + |
| 106 | +In the default configuration, Zephyr's HS Development Kit images support |
| 107 | +serial output via the USB-UART on the board. To enable serial output: |
| 108 | + |
| 109 | +* Open a serial port emulator (i.e. on Linux minicom, putty, screen, etc) |
| 110 | + |
| 111 | +* Specify the tty driver name, for example, on Linux this may be |
| 112 | + :file:`/dev/ttyUSB0` |
| 113 | + |
| 114 | +* Set the communication settings to: |
| 115 | + |
| 116 | + |
| 117 | +========= ===== |
| 118 | +Parameter Value |
| 119 | +========= ===== |
| 120 | +Baud: 115200 |
| 121 | +Data: 8 bits |
| 122 | +Parity: None |
| 123 | +Stopbits: 1 |
| 124 | +========= ===== |
| 125 | + |
| 126 | +Debugging |
| 127 | +========== |
| 128 | + |
| 129 | +Using the latest version of Zephyr SDK(>=0.10), you can debug and |
| 130 | +flash (run) HS Development Kit directly. |
| 131 | + |
| 132 | +One option is to build and debug the application using the usual |
| 133 | +Zephyr build system commands. |
| 134 | + |
| 135 | +.. zephyr-app-commands:: |
| 136 | + :board: hsdk |
| 137 | + :app: <my app> |
| 138 | + :goals: debug |
| 139 | + |
| 140 | +At this point you can do your normal debug session. Set breakpoints and then |
| 141 | +:kbd:`c` to continue into the program. |
| 142 | + |
| 143 | +The other option is to launch a debug server, as follows. |
| 144 | + |
| 145 | +.. zephyr-app-commands:: |
| 146 | + :board: hsdk |
| 147 | + :app: <my app> |
| 148 | + :goals: debugserver |
| 149 | + |
| 150 | +Then connect to the debug server at the HS Development Kit from a second |
| 151 | +console, from the build directory containing the output :file:`zephyr.elf`. |
| 152 | + |
| 153 | +.. code-block:: console |
| 154 | +
|
| 155 | + $ cd <my app> |
| 156 | + $ $ZEPHYR_SDK_INSTALL_DIR/arc-zephyr-elf/arc-zephyr-elf-gdb zephyr.elf |
| 157 | + (gdb) target remote localhost:3333 |
| 158 | + (gdb) load |
| 159 | + (gdb) b main |
| 160 | + (gdb) c |
| 161 | +
|
| 162 | +Flashing |
| 163 | +======== |
| 164 | + |
| 165 | +If you just want to download the application to the HS Development Kit's DDR |
| 166 | +and run, you can do so in the usual way. |
| 167 | + |
| 168 | +.. zephyr-app-commands:: |
| 169 | + :board: hsdk |
| 170 | + :app: <my app> |
| 171 | + :goals: flash |
| 172 | + |
| 173 | +This command still uses openocd and gdb to load the application elf file to |
| 174 | +HS Development Kit, but it will load the application and immediately run. If |
| 175 | +power is removed, the application will be lost since it wasn't written to flash. |
| 176 | + |
| 177 | +Most of the time you will not be flashing your program but will instead debug |
| 178 | +it using openocd and gdb. The program can be download via the USB cable into |
| 179 | +the code and data memories. |
| 180 | + |
| 181 | +The HS Development Kit also supports flashing the Zephyr application |
| 182 | +with the U-Boot bootloader, a powerful and flexible tool for loading |
| 183 | +an executable from different sources and running it on the target platform. |
| 184 | + |
| 185 | +The U-Boot implementation for the HS Development Kit was further extended with |
| 186 | +additional functionality that allows users to better manage the broad |
| 187 | +configurability of the HS Development Kit |
| 188 | + |
| 189 | +When you are ready to deploy the program so that it boots up automatically on |
| 190 | +reset or power-up, you can follow the steps to place the program on SD card. |
| 191 | + |
| 192 | +For details, see: `Uboot-HSDK-Command-Reference |
| 193 | +<https://github.com/foss-for-synopsys-dwc-arc-processors/linux/wiki/Uboot-HSDK-Command-Reference#launching-baremetal-application-on-hsdk>`__ |
| 194 | + |
| 195 | + |
| 196 | +Release Notes |
| 197 | +************* |
| 198 | + |
| 199 | +References |
| 200 | +********** |
| 201 | + |
| 202 | +.. _embARC website: https://www.embarc.org |
| 203 | + |
| 204 | +.. _Designware HS Development Kit website: <https://www.synopsys.com/dw/ipdir.php?ds=arc_hs_development_kit>`_ |
| 205 | + |
| 206 | +.. _Digilent Pmod Modules: http://store.digilentinc.com/pmod-modules |
| 207 | + |
| 208 | +.. _Putty website: http://www.putty.org |
0 commit comments