Compiling & flashing from git repositories in Windows?


(Tim Holt) #1

I’ve followed the instructions for compiling and flashing from the Arduino ide, where you plug a url into the settings somewhere to tell it where to get all the proper libraries, etc. It works great, though I use my own text editor. In other words, the only thing I ever do in the ide is hit ctrl-u.

I’d like to be able to compile & flash from the git repos. I want to mess around with the code and choose to use bleeding edge versions of plugins, and to keep using git to track changes. I tried using the instructions found here, but got stuck at the ‘make’ step. I’d be willing to use Linux on Windows subsystem, but I suspect that would still require the Linux binaries for the Arduino IDE, and I’m pretty sure the Linux subsystem is command-line-only stuff.

Am I going to have to spin up a Linux VM?


(Gergely Nagy) #2

Thankfully, the GUI parts of Arduino are in Java, the parts that the Kaleidoscope system need are CLI. Mind you, I have not tried (the only windows I have is 8.1, so no WSL), but it should work, I’d imagine.

Also, you can still use the Linux subsystem to keep the repo clones updated, and use the Windows Arduino IDE to flash, like you do now. I’m pretty sure you can go a long way with Cygwin or a Windows git shell or similar.


(Kristian) #3

After having some trouble setting things up under windows I found a solution. The following steps I can recollect from memory:

  1. Download board supplier package from within arduino ide like you did.
  2. Clone kaleidoscope from git (url ended with Arduino-Boards if I remember correctly)
  3. To compile current keyboardio sketches: Make the directory you cloned from git your sketchbook directory. It should contain the libraries folder as a direct child directory.

Let me know if this works. If it does not, I will check my notes of what exactly I had to do to make it work.


(Tim Holt) #4

Looks like that’s worked. Thanks. Still feels like the ‘wrong’ way to do it, but at this point, I’m just glad to get it to work.

Still, I hope to leave this thread open for coming up with something less hacky. The pressure is gone, but if someone already knows how, feel free to post it here.


(David Aue) #5

I got it working by first uninstalling the one in the IDE board manager. Then clone the Arduino-Boards repo so its root is Documents\Arduino\hardware\keyboardio\avr. The model01 shows up in my boards list and all the libs are in the menus too so this seems like it’s right in some way.


(Cy Rossignol) #6

I managed to get a full CLI workflow to run on Windows using kaleidoscope-builder in Cygwin/MSYS/Git Bash. I hope to get these changes into Kaleidoscope (see #310)…but right after that discussion I became swamped with other work. The changes need some testing/polishing and docs—I’ll try to revisit this after I return from travelling next week.


(David Aue) #7

I keep needing to remember how I did this so I thought I’d write it down here. Maybe this would fit in the wiki somewhere?

Install Arduino 1.8.7 IDE
File > Preferences > Sketchbook location : Path where the IDE will look for things.
This will normally be set to something like: C:\Users\MyName\Documents\Arduino
In this folder create a “hardware” folder and go there in your git shell.
git clone --recursive https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio.git
You will now have a Kaleidoscope-Bundle-Keyboardio folder which you can rename if you like.
Run the IDE and it should notice these new files and add “Keyboardio Model 01” to the Tools > Board menus.
Copy the Kaleidoscope-Bundle-Keyboardio\avr\libraries\Model01-Firmware folder to another place and open it in the IDE.
Sometimes the compiler crashes but if I run it again it will magically work.

If someone knows how to compile and upload from a shell (msys2 bash perhaps) I would love to learn.


#8

Just how did you compile it though? You couldn’t have used make. The makefile is based on Linux, so how? What am I missing?


(David Aue) #9

I don’t know how to compile and upload from the command line. The steps I wrote out let you use the git version from the IDE.