Child pages
  • Digilent Arty A7 with Xilinx Artix-7 Implementing SiFive FE310 RISC-V

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section


Code Block
title/opt/Digilent/
git clone --recursive https://github.com/sifive/freedom-e-sdk.git
cd freedom-e-sdk/

Set RISCV_PATH and RISCV_OPENOCD_PATH

Code Block
title/opt/Digilent/freedom-e-sdk/
export RISCV_PATH=/opt/Digilent/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14
export RISCV_OPENOCD_PATH=/opt/Digilent/riscv-openocd-0.10.0-2019.08.2-x86_64-linux-ubuntu14

For reference, this build is based on:

Code Block
voodoo@hades:/opt/Digilent/freedom-e-sdk$ git show
commit 30837cf2279ec60989898a0d8ef5a1934bd443c0ee098cd5cca9efb93f88f58602f8a11e68e14621 (HEAD -> masterv201908-branch, origin/masterv201908-branch, origin/as-eclipse-projectmain, origin/HEAD)
Merge: 4c20f510fba42f 8565ab54f4bd3d
Author: Nathaniel Graff <nathaniel.graff@sifive.com>
Date:   Wed FebNov 613 1916:1538:2258 2019 +0000-0800

    Merge pull request #169#413 from sifive/documentationdetect-medany-reloc-truncated-1908
    
    Add initial documentation[v19.08] Detect "reloc truncated to fit" as medany incompatibility


Example hello

Section


Code Block
title/opt/Digilent//freedom-e-sdk/
make BSP=metal PROGRAM=hello TARGET=freedom-e310-arty clean
make BSP=metal PROGRAM=hello TARGET=freedom-e310-arty software
make BSP=metal PROGRAM=hello TARGET=freedom-e310-arty upload


Code Block
titlemake BSP=metal PROGRAM=hello TARGET=freedom-e310-arty upload
voodoo@hades:/opt/Digilent/freedom-e-sdk$ make BSP=metal PROGRAM=hello TARGET=freedom-e310-arty upload
scripts/upload --elf /optmnt/data/Digilent/freedom-e-sdk/software/hello/debug/hello.elf --openocd /opt/Digilent/riscv-openocd-0.10.0-20182019.1208.02-x86_64-linux-ubuntu14/bin/openocd --gdb /opt/Digilent/riscv64-unknown-elf-gcc-8.13.0-2019.0108.0-x86_64-linux-ubuntu14/bin/riscv64-unknown-elf-gdb --openocd-config bsp/freedom-e310-arty/openocd.cfg
Open On-Chip Debugger 0.10.0+dev-gcd32bd4 (2018-12-19-01:15SiFive OpenOCD 0.10.0-2019.08.2)
Licensed under GNU GPL v2
For bug reports,:
read
	httphttps://openocdgithub.orgcom/docsifive/doxygen/bugs.htmlfreedom-tools/issues
adapter speed: 10000 kHz
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 10000 kHz
Info : JTAG tap: riscv.cpu tap/device found: 0x20000913 (mfg: 0x489 (SiFive, Inc.), part: 0x0000, ver: 0x2)
Info : datacount=1 progbufsize=16
Info : Disabling abstract command reads from CSRs.
Info : Examined RISC-V core; found 1 harts
Info :  hart 0: XLEN=32, misa=0x40001105
Info : Listening on port 3333 for gdb connections
Info : Found flash device 'micron n25q128' (ID 0x0018ba20)
cleared protection for sectors 64 through 255 on flash bank 0
Ready for Remote Connections
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : accepting 'gdb' connection on tcp/3333
Info0x20404692 : Found flash device 'micron n25q128' (ID 0x0018ba20)
in metal_shutdown (code=0) at /optmnt/data/Digilent/freedom-e-sdk/freedom-metal/src/shutdown.c:19
19	      __asm__ volatile ("nop");
Info : JTAG tap: riscv.cpu tap/device found: 0x20000913 (mfg: 0x489 (SiFive, Inc.), part: 0x0000, ver: 0x2)
JTAG tap: riscv.cpu tap/device found: 0x20000913 (mfg: 0x489 (SiFive, Inc.), part: 0x0000, ver: 0x2)
cleared protection for sectors 64 through 255 on flash bank 0
cleared protection for sectors 64 through 255 on flash bank 0
Info : JTAG tap: riscv.cpu tap/device found: 0x20000913 (mfg: 0x489 (SiFive, Inc.), part: 0x0000, ver: 0x2)
Loading section .init, size 0x560x194 lma 0x20400000
Loading section .text, size 0x3daa0x4600 lma 0x204000800x20400200
Loading section .rodata, size 0x6a00x3c0 lma 0x20403e2c0x20404800
Loading section .eh_frame, size 0x7c lma 0x204044cc
Loading section .init_array, size 0x4 lma 0x204045480x20404bc0
Loading section .data, size 0x17bc0x770 lma 0x2040454c0x20404bc8
Info : Padding image section 0 at 0x204000560x20400194 with 42108 bytes
Info : Padding image section 1 at 0x20403e2a0x20404bc4 with 24 bytes
Info : Disabling abstract command writes to CSRs.
Info : JTAG tap: riscv.cpu tap/device found: 0x20000913 (mfg: 0x489 (SiFive, Inc.), part: 0x0000, ver: 0x2)
Start address 0x20400000, load size 2377221192
Transfer rate: 2227 KB/sec, 33963532 bytes/write.
shutdown command invoked
shutdown command invoked
A debugging session is active.

	Inferior 1 [Remote target] will be detached.

Quit anyway? (y or n) [answered Y; input not from terminal]
Remote connection closed


Code Block
voodoo@hades:~$/opt/Digilent/freedom-e-sdk$ tio /dev/ttyUSB2  -b57600b 57600
[tio 1410:0856:3924] tio v1.32
[tio 1410:0856:3924] Press ctrl-t q to quit
[tio 1410:0856:3924] Connected
Hello, World!
Hello, World!


...