Uploading to my Arty board not working

You do not need an Olimex for the Serial. You may need to properly set your permissions to see the output (or use sudo). This is described in the Getting Started Guide as well.

The Serial & JTAG on the Artix FPGA are hard-wired to their functionality, and user image doesn’t have access to those pins. That is why we have to use a user-accessible port for our soft core’s debug interface.

Agreed that a serial bootloader would be very useful. Contributions welcome!

I’m using sudo and opening with screen as the guide says, but nothing comes out of the serial when I reboot the board. As I can’t flash it for now the software it has is whatever comes with by default as I described in my original post, I’m not sure if that has serial output though.

The SW that comes as part of the MCS (loaded with Vivado) will print one message after reset. So you need to launch screen/minicom, and then press ‘reset’ to see the message.

What screen command are you using?

sudo screen /dev/ttyUSB1 115200
I also tried minicom

I now tried the image from the web and that one works. The one I built locally doesn’t turn the multicolor led on and nothing comes out of the serial port. It only does what I described in the original post with the green leds and buttons. Why would my build be broken?

Ah, makes sense. I didn’t register that you were compiling from scratch!

See this part of the FPGA build Makefile:

https://github.com/sifive/freedom/blob/master/fpga/e300artydevkit/Makefile#L9

When we built the image that’s posted online, we used the FLASHED_PROGRAM variable to include a binary version of demo_gpio from the Freedom E SDK

This requires a binary format (slightly different than the actual ELF file that Freedom E SDK creates). You can generate it from the ELF with objcopy also installed as part of the SDK:

freedom-e-sdk/toolchain/bin/riscv32-unknown-elf-objcopy -O binary input.elf output.bin

Makes sense, I’ll give it a try, thanks!

Hello all,

I am facing exactly the same problem, when I program the FPGA with the .mcs example file downloaded from the website it works just fine printing the message over to the serial interface. But when I use the .mcs file no output is printed, the Makefile is like in the picture above and I didn’t quite followed how to solve the problem (there is no /toolchain folder in freedom-e-sdk and I just finished building the tools :expressionless: ).

lsusb command:

Bus 002 Device 008: ID 0403:6010 Future Technology Devices International, Ltd FT2232C Dual USB-UART/FIFO IC
Bus 003 Device 005: ID 15ba:0004 Olimex Ltd. OpenOCD JTAG TINY

make upload PROGRAM=demo_gpio BOARD=freedom-e300-arty command:

Error: no device found
Error: unable to open ftdi device with vid 15ba, pid 0004, description ‘Olimex OpenOCD JTAG ARM-USB-TINY-H’, serial ‘’ at bus location '

I have modified the .cfg file from
ftdi_vid_pid 0x15ba 0x002a
to ftdi_vid_pid 0x15ba 0x0004

Also from the Eclipse based IDE I get this error when running the Blinky program:

Info : auto-selecting first available session transport “jtag”. To override use 'transport select '.
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description ‘Dual RS232-HS’, serial ‘’ at bus location '

Is it possible that openOCD does not work properly? Thanks

You need to run the upload step with BOARD=freedom-e300-arty. It looks like it is trying to find the HiFIve1 board.

make upload BOARD=freedom-e300-arty PROGRAM=demo_gpio

for example.

Hello,

first of all very great work all in all :slight_smile:
I have also problems uploading new Code via the Olimex ARM-USB-TINY-H Adapter.
I am able to flash the FPGA with included software in the mcs file with:

When i try this with the olimex adapter:

I get the following output:

Do you have any idea, how to solve this?

Thank you

MaTT

I´ve seen the “all ones” failure mentioned here. I thiink you need to check the wiring between the Olimex and the Arty.

1 Like

hello,

This question have solved ? If yes,please tell me how to do that ! Thanks very much !

I encountered the same problem.

After setting default flashed program and regenerating MCS (just deleted generated MCS, not recompile from RTL ), the new MCS just working as good as official released bitstream.

Can someone explain this magic? the previous MCS has the name “E300ArtyDevKitFPGAChip.mcs”, but the new one changed to “sifive.freedom.everywhere.e300artydevkit.E300ArtyDevKitConfig.mcs”. I didn’t change anything in Makefile excepted setting FLASHED_PROGRAM.

#Just wonder why don’t you update the source code.

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.