Skip to content

Commit dbc29fe

Browse files
Wayne Renioannisg
authored andcommitted
boards: hsdk: add initial support of ARC HS Development Kit
This commit includes the initial support of ARC HS Development Kit: * hsdk soc support * hsdk board support * no mmu support, so no userspace * smp support Signed-off-by: Wayne Ren <[email protected]>
1 parent 4fb8bf6 commit dbc29fe

File tree

18 files changed

+828
-0
lines changed

18 files changed

+828
-0
lines changed

boards/arc/hsdk/Kconfig.board

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Kconfig - DesignWare ARC HS Development Kit board configuration
2+
#
3+
# Copyright (c) 2019 Synopsys, Inc. All rights reserved.
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
#
7+
config BOARD_HSDK
8+
bool "ARC HS Development Kit"
9+
depends on SOC_ARC_HSDK
10+
help
11+
The DesignWare ARC HS Development Kit is a ready-to-use platform for
12+
rapid software development on the ARC HS3x family of processors. It
13+
supports single- and multi-core ARC HS34, HS36 and HS38 processors
14+
and offers a wide range of interfaces

boards/arc/hsdk/Kconfig.defconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Copyright (c) 2019 Synopsys, Inc. All rights reserved.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_HSDK
7+
8+
config BOARD
9+
default "hsdk"
10+
11+
endif # BOARD_HSDK

boards/arc/hsdk/board.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
# TODO: can this board just use the usual openocd runner?
4+
set(BOARD_FLASH_RUNNER em-starterkit)
5+
set(BOARD_DEBUG_RUNNER em-starterkit)
6+
board_finalize_runner_args(em-starterkit)

boards/arc/hsdk/doc/hsdk.jpg

103 KB
Loading

boards/arc/hsdk/doc/index.rst

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
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

boards/arc/hsdk/hsdk.dts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2019, Synopsys, Inc. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <arc_hsdk.dtsi>
10+
11+
/ {
12+
model = "hsdk";
13+
compatible = "snps,hsdk";
14+
15+
aliases {
16+
uart-0 = &uart0;
17+
};
18+
19+
chosen {
20+
zephyr,sram = &ddr0;
21+
zephyr,console = &uart0;
22+
zephyr,shell-uart = &uart0;
23+
};
24+
};
25+
26+
&uart0 {
27+
status = "okay";
28+
current-speed = <115200>;
29+
};

boards/arc/hsdk/hsdk.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
identifier: hsdk
2+
name: HS Development Kit
3+
type: mcu
4+
arch: arc
5+
toolchain:
6+
- zephyr
7+
- xtools
8+
testing:
9+
ignore_tags:
10+
- net
11+
- bluetooth

boards/arc/hsdk/hsdk_defconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_ARC=y
4+
CONFIG_CPU_ARCHS=y
5+
CONFIG_SOC_ARC_HSDK=y
6+
CONFIG_BOARD_HSDK=y
7+
CONFIG_SYS_CLOCK_TICKS_PER_SEC=100
8+
CONFIG_XIP=y
9+
CONFIG_BUILD_OUTPUT_BIN=n
10+
CONFIG_PRINTK=y
11+
CONFIG_ARCV2_INTERRUPT_UNIT=y
12+
CONFIG_ARCV2_TIMER=y
13+
CONFIG_CONSOLE=y
14+
CONFIG_UART_CONSOLE=y
15+
CONFIG_SERIAL=y

0 commit comments

Comments
 (0)