Not able to compile Blink using Arduino IDE


(Karim) #1

I am using freedom e300 arty devkit with a Sifive openocd on an Arduino 1.8.2.
When I try to upload the code I get these messages on the console.

Build options changed, rebuilding all
Archiving built core (caching) in: /var/folders/m0/ms46cvwd2c53k_22grbt1cxm0000gn/T/arduino_cache_359431/core/core_sifive_riscv_freedom_e310_arty_devkit_toolsloc_default,clksrc_fpga_2952cc862c410c7b902a5842eee29533.a
Sketch uses 5840 bytes (0%) of program storage space. Maximum is 8388608 bytes.
Open On-Chip Debugger 0.10.0-dev-g9bab078 (2017-01-30-14:28)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
adapter speed: 10000 kHz
Info : auto-selecting first available session transport “jtag”. To override use 'transport select '.
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi_tdo_sample_edge falling"
Info : clock speed 10000 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. (dtmcontrol=0xffffffff)
Error: Target not examined yet

the selected serial port
does not exist or your board is not connected


Freedom Studio Beta 2
Uploading to my Arty board not working
(Megan A. Wachs) #2

Do you have your board connected with an Olimex Debugger or similar (you need more than just the USB cable used for Serial communication for this to work).

Have you double-checked your connections to the debugger(feel free to post a picture!). Usually this error means some wires got crossed.

Were you able to successfully flash your board with the MCS on the SiFive website? Did you see the output on the UART?


(Karim) #3

You are right, actually I have double checked the wires and indeed there was a wiring problem that I fixed. now it works fine.

Thank you


(pengnainqi) #4

Hi mwach,

These errors how to fix?


This is my wiring connecting,if have some wires got crossed?



(Donnie Agema) #5

The wiring is correct.


(Megan A. Wachs) #6

Yes, looks good! The problem is that you still seem to be using the wrong openocd.cfg file.

Try
make run_openocd BOARD=freedom-e300-arty.

Freedom E300 Arty Dev Kit & HiFive1 have JTAG ID 0x10e3193
Coreplex IP Dev Kits has 0x20000001.

Your debugger is able to successfully talk to the Core, but when it tries to write to the SPI Flash it is not where it expects so it gets an exception. You need to use the right BOARD file for the correct SPI Flash location.


(pengnainqi) #7

Hi Donnie,Thanks for your reply !


(pengnainqi) #8

Hi,mwach

The FreedomStudio installing in windows environment ! Because of the errors in ubuntu environment I dont know how to fix ,So switch to windows ! how to operate can you tell me the details?