# Not able to compile Blink using Arduino IDE

**URL:** <https://forums.sifive.com/t/not-able-to-compile-blink-using-arduino-ide/493>\
**Category:** Freedom E300\
**Created:** [April 20, 2017, 7:31am UTC](https://forums.sifive.com/t/not-able-to-compile-blink-using-arduino-ide/493 "2017-04-20T07:31:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimokono](https://avatars.discourse-cdn.com/v4/letter/k/91b2a8/32.png) [@kimokono](https://forums.sifive.com/u/kimokono)\
**Post date:** [April 20, 2017, 7:31am UTC](https://forums.sifive.com/t/not-able-to-compile-blink-using-arduino-ide/493/1 "2017-04-20T07:31:00Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![mwachs5](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/mwachs5/32/13_2.png) [@mwachs5](https://forums.sifive.com/u/mwachs5)\
**Post date:** [April 20, 2017, 9:06pm UTC](https://forums.sifive.com/t/not-able-to-compile-blink-using-arduino-ide/493/2 "2017-04-20T21:06:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kimokono](https://avatars.discourse-cdn.com/v4/letter/k/91b2a8/32.png) [@kimokono](https://forums.sifive.com/u/kimokono)\
**Post date:** [April 21, 2017, 12:33am UTC](https://forums.sifive.com/t/not-able-to-compile-blink-using-arduino-ide/493/3 "2017-04-21T00:33:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pengnainqi](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/pengnainqi/32/262_2.png) [@pengnainqi](https://forums.sifive.com/u/pengnainqi)\
**Post date:** [July 19, 2017, 7:43am UTC](https://forums.sifive.com/t/not-able-to-compile-blink-using-arduino-ide/493/4 "2017-07-19T07:43:58Z")

</div>

Hi mwach,

These errors how to fix?

* * *

## ![](https://us1.discourse-cdn.com/flex020/uploads/sifive/original/1X/2e62ca39b218b90f1e560324fa941eafd335e9cd.png)

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

* * *

## ![](https://us1.discourse-cdn.com/flex020/uploads/sifive/original/1X/415ce81b5358c06469afa2edfac75f8a0ee144e3.jpg)

---

<div class="post-metadata">

**Author:** ![dagema](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/dagema/32/59_2.png) [@dagema](https://forums.sifive.com/u/dagema)\
**Post date:** [July 19, 2017, 8:07am UTC](https://forums.sifive.com/t/not-able-to-compile-blink-using-arduino-ide/493/5 "2017-07-19T08:07:30Z")

</div>

The wiring is correct.

---

<div class="post-metadata">

**Author:** ![mwachs5](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/mwachs5/32/13_2.png) [@mwachs5](https://forums.sifive.com/u/mwachs5)\
**Post date:** [July 19, 2017, 2:16pm UTC](https://forums.sifive.com/t/not-able-to-compile-blink-using-arduino-ide/493/6 "2017-07-19T14:16:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pengnainqi](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/pengnainqi/32/262_2.png) [@pengnainqi](https://forums.sifive.com/u/pengnainqi)\
**Post date:** [July 20, 2017, 1:35am UTC](https://forums.sifive.com/t/not-able-to-compile-blink-using-arduino-ide/493/7 "2017-07-20T01:35:07Z")

</div>

Hi Donnie,Thanks for your reply !

---

<div class="post-metadata">

**Author:** ![pengnainqi](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.sifive.com/pengnainqi/32/262_2.png) [@pengnainqi](https://forums.sifive.com/u/pengnainqi)\
**Post date:** [July 20, 2017, 1:57am UTC](https://forums.sifive.com/t/not-able-to-compile-blink-using-arduino-ide/493/8 "2017-07-20T01:57:53Z")

</div>

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?
