Thanks, its working now. To summarize: Cygwin can be used as a framework for freedom-e-sdk on a Windows platform. All that is necessary is to assure that before cloning, the global Git parameters are set to support symlinks and to conserve the POSIX line ending LF (i.e. not converting to CRLF).
Now watch me blush as I confess that I have not yet figured out how to resolve the problem I am having with the openocd.cfg file. I am guessing that I need to replace the target setting from âextended-remote localhost:3333â to something relating to my Olimex debugger, but I donât yet know how. Here is what lsusb is telling me:
That should work fine, the correct openocd.cfg file should be picked for your board. However, you need the correct setup to have the device recognized and for you to have permissions to write to it with OpenOCD.
Iâm working on writing better instructions for this in the Getting Started Guide. Here is the âdraftâ version, if you care to give it a try:
With your boardâs debug interface connected, make sure your device shows up with the
lsusb command (The example is for HiFive1, for the debugger on Arty you will see Olimex Ltd. ARM-USB-TINY-H)
lsusb
âŚ
Bus XXX Device XXX: ID 0403:6010 Future Technology Devices
International, Ltd FT2232C Dual USB-UART/FIFO IC
Set the udev rules to allow the device to be accessed by the plugdev group:
> sudo vi /etc/udev/rules.d/99.openocd-rules
Add the following lines and save the file (if they are not already there):
See if your board shows up as a serial device belonging to the plugdev group:
ls -l /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1
(If you have other serial devices or multiple boards attached, you may have more devices
listed). For serial communication with the UART, you will always want to select the higher
number of the pair, in this example /dev/ttyUSB1.
> ls -al /dev/ttyUSB1
crw-rw-r-- 1 root plugdev 188, 1 Nov 28 12:53 /dev/ttyUSB1
Add yourself to the plugdev group.
> sudo useradd <name> -G plugdev
Log out and log back in, then check that youâre now a member of the plugdev group:
groups
⌠plugdev âŚ
Now you should be able to access the device without sudo permissions
Actually looking at your error above, I think the problem is just that your BOARD variable should be âfreedom-e300-artyâ, not âfreedom-e300-arty-dev-kitâ. We shortened the name some time back. Please let me know if there is any existing documentation that has the long name.
Update: until now, I had been powering the Arty via USB connector. I thought that the UART might be interfering with the debugger, so I switched to powering via wall wart and get a different response:
Does not look so good using Cygwin. Subdirectories /udev/rules.d under /etc did not exist, so I naively created them before adding file 99.openocd-rules. The Olimex debugger is listed under lsusb, but there are no ttyUSB devices under /dev. I searched the web but could not find anything helpful.
My web searches seemed to hint at a bad HW connection, so I rechecked the connections between the debugger and the Arty, but found no errors. I then hooked up a logic analyzer to port JD and could see bits toggling on TDI, TCK and TDO and alas! the debugger connected successfully:
I then tried again to connect using the Cygwin platform, but with no success. As expected, no activity on TDI, TCK or TDO. Cygwin is not finding the USB connection.
Well, Iâm not too sure. I only got it to work once. After failing under Cygwin, I tried again under Ubuntu, with no success. My ttyUSB has dissappeared:
This problem might only relate to Ubuntu running on VirtualBox. I found out that I must have another USB device connected in order to have the ttyUSB devices activated. The Olimex alone does not trigger the relavent modules. But, the additional USB device must NOT be the shared USB/JTAG port on the Arty. Having worked that out, I can now use the debugger on the Ubuntu VirtualBox platform.
You may want to test this on a native Linux installation. I donât yet have one laying around.
To install openOCD in Cygwin I followed (to some degree - seems fairly outdated) the relevant installation steps shown here , adjusting for newer package versions where applicable.
Any other points fall into mind regarding Windows platform usability I ought to check?
I spent a few days trying to get the Arduino IDE to run under Cygwin, and at last succeeded by using ant. However, when I try to install the SiFive boards via the Board Manager, I get an error (âthe tool openocd is not available for your operating systemâ) which I have not been able to solve:
Arduino IDE checks your platform to know which versions of the precompiled binaries to download. The message means your platform (windows) isnât supported. Right now weâre only officially supporting Linux, with macOS coming soon.
Since I am starting the Arduino IDE under Cygwin and openocd is working correctly under Cygwin, I was expecting it to look for and run openocd under Cygwin (the Linux flavor of openocd). Is there a way to have Arduino IDE tweaked to recognize Cygwin as the active OS? (I´m very weak in Java.)
Openocd just happens to be the first tool in the list. Youâd get the same error for all the tools.
The easiest thing to do with your setup since you already have freedom e SDK compiled is to do a manual install of the Arduino package (without the package manager). The instructions for that are in the README of what I just realized is still a private repo for the actual Arduino package source. Will update here next week with the instructions.
The repo is now public. You could follow the âManual Installâ instructions of the README to likely get it working in your Cygwin setup. Let us know how it works for you!
I followed the instructions in the readme, but I donât seem to be getting it right. I installe Arduino-1.6.12 on Windows, cloned the cinco git, exported the PATH with my freedom-e-sdk binary and setup the symlink. to cinco/hardware sifive.
After starting the Arduino IDE and trying to install the SiFive boards, I get an error saying openOCD is not available: