1 ================================================================================
2 Useful notes on bulding and using of U-Boot on ARC HS Development Kit (AKA HSDK)
3 ================================================================================
7 The DesignWare ARC HS Development Kit is a ready-to-use platform for rapid
8 software development on the ARC HS3x family of processors.
10 For more information please visit:
11 https://www.synopsys.com/dw/ipdir.php?ds=arc-hs-development-kit
13 User guide is availalble here:
14 https://github.com/foss-for-synopsys-dwc-arc-processors/ARC-Development-Systems-Forum/wiki/docs/ARC_HSDK_User_Guide.pdf
16 It has the following features useful for U-Boot:
17 * On-board 2-channel FTDI TTL-to-USB converter
18 - The first channel is used for serial debug port (which makes it possible
19 to use a serial connection on pretty much any host machine be it
20 Windows, Linux or Mac).
21 On Linux machine typucally FTDI serial port would be /dev/ttyUSB0.
22 There's no HW flow-control and baud-rate is 115200.
24 - The second channel is used for built-in Digilent USB JTAG probe.
25 That means no extra hardware is required to access ARC core from a
26 debugger on development host. Both proprietary MetaWare debugger and
27 open source OpenOCD + GDB client are supported.
29 - Also with help of this FTDI chip it is possible to reset entire
30 board with help of a special `rff-ftdi-reset` utility, see:
31 https://github.com/foss-for-synopsys-dwc-arc-processors/rff-ftdi-reset
34 - U-Boot expects to see the very first partition on the card formatted as
35 FAT file-system and uses it for keeping its environment in `uboot.env`
36 file. Note uboot.env is not just a text file but it is auto-generated
37 file created by U-Boot on invocation of `saveenv` command.
38 It contains a checksum which makes this saved environment invalid in
39 case of maual modification.
41 - There might be more useful files on that first FAT partition like
42 Linux kernl image in form of uImage (with or without built-in
43 initramfs), device tree blob (.dtb) etc.
45 - Except FAT partition there might be others following the first FAT one
46 like Ext file-system with rootfs etc.
48 * 1 Gb Ethernet socket
49 - U-Boot might get payload from TFTP server. This might be uImage, rootfs
50 image and anything else.
53 - SPI-flahs is used as a storage for image of an application auto-executed
54 by bootROM on power-on. Typically U-Boot gets programmed there but
55 there might be other uses. But note bootROM expects to find a special
56 header preceeding application image itself so before flashing anything
57 make sure required image is prepended. In case of U-Boot this is done
58 by invocation of `headerize-hsdk.py` with `make bsp-generate` command.
64 ------------------------->8----------------------
66 ------------------------->8----------------------
68 2. To build Elf file (for example to be used with host debugger via JTAG
69 connection to the target board):
70 ------------------------->8----------------------
72 ------------------------->8----------------------
74 This will produce `u-boot` Elf file.
76 3. To build artifacts required for U-Boot update in n-board SPI-flash:
77 ------------------------->8----------------------
79 ------------------------->8----------------------
81 This will produce `u-boot.head` and `u-boot-update.scr` which should
82 be put on the first FAT partition of micro SD-card to be inserted in the
85 Note that Python3 script is used for generation of a header, thus
86 to get that done it's required to have Python3 with "pyelftools" installed.
88 "pyelftools" could be installed with help of "pip" even w/o root rights:
89 ------------------------->8----------------------
90 python3 -m pip install --user pyelftools
91 ------------------------->8----------------------
95 1. The HSDK board is supposed to auto-start U-Boot image stored in on-board
96 SPI-flash on power-on. For that make sure DIP-switches in the corner of
97 the board are in their default positions: BIM in 1:off, 2:on state
98 while both BMC and BCS should be in 1:on, 2:on state.
100 2. Though it is possible to load U-Boot as a simple Elf file via JTAG right
101 in DDR and start it from the debugger.
103 2.1. In case of proprietary MetaWare debugger run:
104 ------------------------->8----------------------
105 mdb -digilent -run -cl u-boot
106 ------------------------->8----------------------
109 UPDATION U-BOOT IMAGE IN ON-BOARD SPI-FLASH
111 1. Create `u-boot.head` and `u-boot-update.scr` as discribed above with
112 `make bsp-generate` command.
114 2. Copy `u-boot.head` and `u-boot-update.scr` to the first FAT partition
117 3. Connect USB cable from the HSDK board to the developemnt host and
118 fire-up serial terminal.
120 3. Insert prepared micro SD-card in the HSDK board, press reset button
121 and stop auto-execution of existing `bootcmd` pressing any key in serial
122 terminal and enter the following command:
123 ------------------------->8----------------------
124 mmc rescan && fatload mmc 0:1 ${loadaddr} u-boot-update.scr && source ${loadaddr}
125 ------------------------->8----------------------
126 Wait before you see "u-boot update: OK" message.
128 4. Press RESET button and enjoy updated U-Boot version.