Uploading to my Arty board not working


(damian) #6

BTW I also don’t see anything coming out of the serial I have with the regular USB connection in the board, but it looks like I need the Olimex for that too?

I wonder why the serial and JTAG that come with the Arty can’t be used as I can do if I put a Microblaze there and use the Xilinx SDK…


(Harry Ahn) #7

Did you set the correct serial port settings?
JTAG on Arty Board can not be rerouted into the softcore. I think.


(Megan A. Wachs) #8

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!


(damian) #9

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.


(Megan A. Wachs) #10

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?


(damian) #11

sudo screen /dev/ttyUSB1 115200
I also tried minicom


(damian) #12

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?


(Megan A. Wachs) #13

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


E300 on Arty not working
A non-working mcs file generated for e300artydevkit
Freedom Studio on Linux
(damian) #14

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


(Achirei Stefan) #15

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


(Megan A. Wachs) #16

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.


#17

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


(Donnie Agema) #18

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


(pengnainqi) #19

hello,

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


#20

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.


#21

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.


(Megan A. Wachs) #22

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.


(fox) #23

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


(fox) #24

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.


(fox) #25

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