blob: 036554c4d5ceb9b2ac95a256c91be59828c65888 [file] [log] [blame]
Alexey Brodkin0921f922018-06-15 18:20:59 +03001================================================================================
Alexey Brodkinadc9b092018-10-18 09:54:58 +03002Useful notes on bulding and using of U-Boot on
3ARC EM Software Development Platform (AKA EMSDP)
Alexey Brodkin0921f922018-06-15 18:20:59 +03004================================================================================
5
6 BOARD OVERVIEW
7
Alexey Brodkinadc9b092018-10-18 09:54:58 +03008 The DesignWare ARC EM Software Development Platform is FPGA-bases platform
9 for rapid software development on the ARC EM family of processors.
Alexey Brodkin0921f922018-06-15 18:20:59 +030010
11 Since this board is based on FPGA it's possible to load and use different
12 versions of ARC EM CPUs. U-Boot is built to be run on the simplest
13 possible configuration which means the same one binary will work on more
14 advanced configurations as well.
15
16 The board 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.
23
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.
28
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
32
33 * Micro SD-card slot
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.
40
41 - There might be more useful files on that first FAT partition like
42 user applications, data files etc.
43
44 * 256 KiB of "ROM"
45 - This so-called "ROM" is a part of FPGA image and even though it
46 might be unlocked for writes its initial content will be restored
47 on the next power-on.
48
49
50 BUILDING U-BOOT
51
52 1. Configure U-Boot:
53 ------------------------->8----------------------
Alexey Brodkinadc9b092018-10-18 09:54:58 +030054 make emsdp_defconfig
Alexey Brodkin0921f922018-06-15 18:20:59 +030055 ------------------------->8----------------------
56
57 2. To build Elf file (for example to be used with host debugger via JTAG
58 connection to the target board):
59 ------------------------->8----------------------
60 make mdbtrick
61 ------------------------->8----------------------
62
63 This will produce `u-boot` Elf file.
64
65 3. To build binary image to be put in "ROM":
66 ------------------------->8----------------------
67 make u-boot.bin
68 ------------------------->8----------------------
69
70
71 EXECUTING U-BOOT
72
Alexey Brodkinadc9b092018-10-18 09:54:58 +030073 1. The EMSDP board is supposed to auto-start U-Boot image stored in ROM on
Alexey Brodkin0921f922018-06-15 18:20:59 +030074 power-on. For that make sure VCCIO DIP-switches are all in "off" state.
75
76 2. Though it is possible to load U-Boot as a simple Elf file via JTAG right
77 in "ROM" and start it from the debugger. One important note here we first
78 need to enable writes into "ROM" by writing 1 to 0xf0001000.
79
80 2.1. In case of proprietary MetaWare debugger run:
81 ------------------------->8----------------------
Alexey Brodkin3f6b4ea2019-10-09 10:18:18 +030082 mdb -digilent -OK -preloadexec="eval *(int*)0xf0001000=0" u-boot
Alexey Brodkin0921f922018-06-15 18:20:59 +030083 ------------------------->8----------------------