Uploading to my Arty board not working

My mistake, no magic at all, “E300ArtyDevKitFPGAChip.mcs” is from the master branch. “sifive.freedom.everywhere.e300artydevkit.E300ArtyDevKitConfig.mcs” is from the tagged release.

Both version are working fine now, but master version has UART baudrate 57600, and the other is 115200.

Ah yes, we turned down the FPGA frequency for more reliable successful builds, and did not adjust the default UART divider accordingly. Thanks for pointing this out.

I have the same problem,can you tell me how to solve it? Thanks!
the problem is:
work/build/openocd/prefix/bin/openocd -f bsp/env/sirv-e203-arty/openocd.cfg
GNU MCU Eclipse 64-bits Open On-Chip Debugger 0.10.0+dev-00084-gae68d7da-dirty (2018-09-26-15:31)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 1000 kHz
Info : auto-selecting first available session transport “jtag”. To override use 'transport select '.
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: riscv.cpu: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Error: Unsupported DTM version: 15
Info : Listening on port 3333 for gdb connections
Error: Target not examined yet

Error: Unsupported DTM version: 15
Warn : Flash driver of my_first_flash does not support free_driver_priv()
Makefile:242: recipe for target ‘run_openocd’ failed
make: *** [run_openocd] Error 1

when i use ARN-USB-TINY-H download my program into Arty,it has this problem:
adapter speed: 1000 kHz
Info : auto-selecting first available session transport “jtag”. To override use 'transport select '.
Info : clock speed 1000 kHz
Error: JTAG scan chain interrogation failed: all ones
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway…
Error: riscv.cpu: IR capture error; saw 0x1f not 0x01
Warn : Bypassing JTAG setup events due to errors
Error: Unsupported DTM version: 15
Info : Listening on port 3333 for gdb connections
Error: Target not examined yet

Error: Unsupported DTM version: 15
Warn : Flash driver of my_first_flash does not support free_driver_priv()
localhost:3333: 连接超时.
“monitor” command not supported by this target.
“monitor” command not supported by this target.
You can’t do that when your target is `exec’
“monitor” command not supported by this target.
“monitor” command not supported by this target.
Successfully uploaded ‘demo_gpio’ to sirv-e203-arty.

I have the same problem,can you tell me how to solve it? Thanks !!!

I have the same question! I don’t know how to solve it! Now I just think there is something wrong with ARM-tiny-H. :persevere:

1 Like

Hi everyone,

First of all, thanks everybody for your work and the big community you are creating.
Sorry in advance if I am not posting correctly but I think my doubt is correctly aligned with this very post:

  • Is it possible to load programs (.bin) together with the Risc-V (.bit) inside the .mcs file?
    We order already the Olimex ARM-USB-TINY-H device, but in the meantime we would like to test the Risc-V with different programs. There is no longer the FLASHED_PROGRAM (as @mwachs5 mentioned earlier) flag in the makefile to include a binary file together with the bit file… so I was wondering if there is any workaround such as using IMPACT to generate the mcs or some other flag inside the toolchain I ignore.

Thanks in advance.

Yes you can. It is similar to how you program Xilinx Microblaze with the FPGA bit file.

You have to modify the common.mk, mcs rule.

My code fragment is as follows:

# Build .mcs
mcs := $(BUILD_DIR)/obj/$(MODEL).mcs
$(mcs): $(bit)
	cd $(BUILD_DIR); vivado -nojournal -mode batch -source $(fpga_common_script_dir)/write_cfgmem.tcl -tclargs $(BOARD) $@ $< $(FLASHED_PROGRAM)

Set the FLASHED_PROGRAM to path somewhere above in the Makefile. This FLASHED_PROGRAM should be in .bin binary format. Note that freedom-e-sdk generates the program in .ihex format. So once you have built the program generate the program .bin format as follows (for the hello word program):

riscv64-unknown-elf-objcopy -O binary ~/freedom-e-sdk/software/hello/debug/hello.elf ~/freedom-e-sdk/software/hello/debug/hello.bin

Please note that the baud rate is 57600 in the master branch. Please experiment to see if you are at the right baud rate if you see unintelligible characters.

The script that actually creates the file is write_cfgmem.tcl in common/tcl/ folder in freedom repo.