Windows instructions to build firmware

ADMIN EDIT 2017-10-23: You can find current Windows install instructions here: https://github.com/keyboardio/Kaleidoscope/wiki/Install-Arduino-support-on-Windows --@jesse


I’ve installed the Arduino IDE (1.6.13), and set up paths based on the README, adapted to Windows paths, and using mklink instead of ln -s, but when I try to build the master branch of Model01-Firmware, I get the following error:


C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kajsa\AppData\Local\Arduino15\packages -hardware C:\Users\kajsa\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kajsa\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kajsa\Documents\Arduino\libraries -fqbn=keyboardio:Arduino-Boards:model01 -ide-version=10613 -build-path e:\Users\kajsa\AppData\Local\Temp\arduino_build_382941 -warnings=none -prefs=build.warn_data_percentage=75 -verbose C:\Users\kajsa\Documents\GitHub\kaleidoscope\Model01-Firmware\Model01-Firmware.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kajsa\AppData\Local\Arduino15\packages -hardware C:\Users\kajsa\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kajsa\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kajsa\Documents\Arduino\libraries -fqbn=keyboardio:Arduino-Boards:model01 -ide-version=10613 -build-path e:\Users\kajsa\AppData\Local\Temp\arduino_build_382941 -warnings=none -prefs=build.warn_data_percentage=75 -verbose C:\Users\kajsa\Documents\GitHub\kaleidoscope\Model01-Firmware\Model01-Firmware.ino
Using board 'model01' from platform in folder: C:\Users\kajsa\Documents\Arduino\hardware\keyboardio\Arduino-Boards
Using core 'arduino' from platform in folder: C:\Users\kajsa\Documents\Arduino\hardware\keyboardio\Arduino-Boards
Detecting libraries used...
"C:\Users\kajsa\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10613 -DARDUINO_AVR_MODEL01 -DARDUINO_ARCH_ARDUINO-BOARDS  -DUSB_VID=0x1209 -DUSB_PID=0x2301 '-DUSB_MANUFACTURER="Keyboardio"' '-DUSB_PRODUCT="Model 01"' -DKALEIDOSCOPE_HARDWARE_H="Kaleidoscope-Hardware-Model01.h" "-IC:\Users\kajsa\Documents\Arduino\hardware\keyboardio\Arduino-Boards\cores\arduino" "-IC:\Users\kajsa\Documents\Arduino\hardware\keyboardio\Arduino-Boards\variants\model01" "e:\Users\kajsa\AppData\Local\Temp\arduino_build_382941\sketch\Model01-Firmware.ino.cpp" -o "nul"
"C:\Users\kajsa\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10613 -DARDUINO_AVR_MODEL01 -DARDUINO_ARCH_ARDUINO-BOARDS  -DUSB_VID=0x1209 -DUSB_PID=0x2301 '-DUSB_MANUFACTURER="Keyboardio"' '-DUSB_PRODUCT="Model 01"' -DKALEIDOSCOPE_HARDWARE_H="Kaleidoscope-Hardware-Model01.h" "-IC:\Users\kajsa\Documents\Arduino\hardware\keyboardio\Arduino-Boards\cores\arduino" "-IC:\Users\kajsa\Documents\Arduino\hardware\keyboardio\Arduino-Boards\variants\model01" "e:\Users\kajsa\AppData\Local\Temp\arduino_build_382941\sketch\Model01-Firmware.ino.cpp" -o "e:\Users\kajsa\AppData\Local\Temp\arduino_build_382941\preproc\ctags_target_for_gcc_minus_e.cpp"
e:\Users\kajsa\AppData\Local\Temp\arduino_build_382941\sketch\Model01-Firmware.ino.cpp:1:21: fatal error: Arduino.h: No such file or directory

 #include <Arduino.h>
                     ^

compilation terminated.

exit status 1
Error compiling for board Keyboardio Model 01.

I would expect the IDE to include that, so I probably have something set up wrong. Any ideas what I can check? (I should note that C:\Users is a junction link to E:\Users)

I don’t have my keyboard yet, and will have the option of booting to Linux or using a Mac, but I’m also willing to help with figuring out what the Windows instructions need to be.

[Edit with verbose compiler output]

1 Like

Hi @kajsa.anderson!

Thanks for starting this thread. Indeed, that’s pretty strange looking.

On Windows, I’d probably just drop the checkouts in place instead of using links. I’ve definitely built the firmware using the Arduino IDE on Windows.

Are you building from the GUI or the commandline? On Windows, I’ve only ever built from the GUI.

Is there a reason you’re using 1.6.3, rather than the current 1.8.x build?

I just did a fresh install of Arduino 1.8.3 on Windows,

I checked out the Arduino-Boards repo as Documents/Arduino/hardware/avr/keyboardio
I ran “make” inside that directory to checkout git submodules

I checked out Model01-Firmware into Documents/Arduino/Model01-Firmware

I opened Arduino and set the board to “Keyboardio Model 01”

I opened Model01-Firmware.ino and built it, without any errors.

Can you give a process like that a shot?

I tried 1.8.x first, and got an error, then I read that 1.6.x was the canonical build chain, so downgraded and got the error above.

I’ll try those instructions later tonight.

That’s out of date, though the versions have been moving quickly.

Do you remember what the error you got on 1.8 was?

Here are the errors I’m getting:

When I set the board to “Keyboardio Model 01” I get this error, which I remember seeing when I tried yesterday with 1.8.3 of the Arduino IDE:
The current selected board needs the core 'arduino:arduino' that is not installed.

Opening Model01-Firmware.ino and building from the IDE gives:

Arduino: 1.8.3 (Windows 7), Board: "Keyboardio Model 01"

The current selected board needs the core 'arduino:arduino' that is not installed.
C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kajsa\AppData\Local\Arduino15\packages -hardware C:\Users\kajsa\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kajsa\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kajsa\Documents\Arduino\libraries -fqbn=avr:keyboardio:model01 -ide-version=10803 -build-path e:\Users\kajsa\AppData\Local\Temp\arduino_build_164937 -warnings=none -build-cache e:\Users\kajsa\AppData\Local\Temp\arduino_cache_299196 -prefs=build.warn_data_percentage=75 -verbose C:\Users\kajsa\Documents\Arduino\Model01-Firmware\Model01-Firmware.ino
The current selected board needs the core 'arduino:arduino' that is not installed.
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\kajsa\AppData\Local\Arduino15\packages -hardware C:\Users\kajsa\Documents\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\kajsa\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\kajsa\Documents\Arduino\libraries -fqbn=avr:keyboardio:model01 -ide-version=10803 -build-path e:\Users\kajsa\AppData\Local\Temp\arduino_build_164937 -warnings=none -build-cache e:\Users\kajsa\AppData\Local\Temp\arduino_cache_299196 -prefs=build.warn_data_percentage=75 -verbose C:\Users\kajsa\Documents\Arduino\Model01-Firmware\Model01-Firmware.ino
Using board 'model01' from platform in folder: C:\Users\kajsa\Documents\Arduino\hardware\avr\keyboardio
Using core 'arduino' from platform in folder: C:\Users\kajsa\Documents\Arduino\hardware\avr\keyboardio
Detecting libraries used...
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_MODEL01 -DARDUINO_ARCH_KEYBOARDIO  -DUSB_VID=0x1209 -DUSB_PID=0x2301 '-DUSB_MANUFACTURER="Keyboardio"' '-DUSB_PRODUCT="Model 01"' -DKALEIDOSCOPE_HARDWARE_H="Kaleidoscope-Hardware-Model01.h" "-IC:\Users\kajsa\Documents\Arduino\hardware\avr\keyboardio\cores\arduino" "-IC:\Users\kajsa\Documents\Arduino\hardware\avr\keyboardio\variants\model01" "e:\Users\kajsa\AppData\Local\Temp\arduino_build_164937\sketch\Model01-Firmware.ino.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10803 -DARDUINO_AVR_MODEL01 -DARDUINO_ARCH_KEYBOARDIO  -DUSB_VID=0x1209 -DUSB_PID=0x2301 '-DUSB_MANUFACTURER="Keyboardio"' '-DUSB_PRODUCT="Model 01"' -DKALEIDOSCOPE_HARDWARE_H="Kaleidoscope-Hardware-Model01.h" "-IC:\Users\kajsa\Documents\Arduino\hardware\avr\keyboardio\cores\arduino" "-IC:\Users\kajsa\Documents\Arduino\hardware\avr\keyboardio\variants\model01" "e:\Users\kajsa\AppData\Local\Temp\arduino_build_164937\sketch\Model01-Firmware.ino.cpp" -o "e:\Users\kajsa\AppData\Local\Temp\arduino_build_164937\preproc\ctags_target_for_gcc_minus_e.cpp"
e:\Users\kajsa\AppData\Local\Temp\arduino_build_164937\sketch\Model01-Firmware.ino.cpp:1:21: fatal error: Arduino.h: No such file or directory

 #include <Arduino.h>

                     ^

compilation terminated.

exit status 1
Error compiling for board Keyboardio Model 01.```

That’s super weird. The arduino:arduino core is supposed to be installed automatically as part of the default Arduino package. You downloaded the Windows Installer version of the Arduino app from https://www.arduino.cc/en/Main/Software?

I will freely admit to not being skilled at the Windows side of things, but I’m committed to figuring this out with you.

In the “boards” menu, do you see a bunch of Arduino branded devices or just ours?

I’ve duplicated @kajsa.anderson’s issue. Here are the steps I did:

  1. Installed Arduino IDE v1.8.3
  2. In C:\Users\UserNme\Documents\Arduino I created hardware\avr (resulting in C:\Users\UserName\Documents\Arduino\hardware\avr)
  3. Opened Git Bash command window and ran:
    a. cd /c/Users/UserName/Documents/Arduino/hardware/avr
    b. git clone --recursive https://github.com/keyboardio/Arduino-Boards.git keyboardio @jesse - Above you say you ran make to get the submodules. I did not have make in my path. Do you also have cygwin installed? Or is make coming fro the Aurdiono IDE? If so, what do I need to add to my path? Given all that, I did the checkout with the --recursive switch. I think in the end I got the same endhttps://avatars.discourse.org/v2/letter/k/85f322/40.png results.
    c. cd ../../ (new pwd is ~/Documents/Arduino)
    d. git clone --recursive https://github.com/keyboardio/Model01-Firmware
  4. Started Arduino IDE
  5. Via the menu, selected: Tools > Board: > Keyboardio Model 01. The Aurdino IDE immediately displayed the error shown below. (Same as what Kajsa got)

Error:

The current selected board needs the core 'arduino:arduino' that is not installed.
Invalid library found in C:\Users\UserName\Documents\Arduino\hardware\avr\keyboardio\libraries\Kaleidoscope-Plugin: C:\Users\UserName\Documents\Arduino\hardware\avr\keyboardio\libraries\Kaleidoscope-Plugin
Invalid library found in C:\Users\UserName\Documents\Arduino\hardware\avr\keyboardio\libraries\Kaleidoscope-Plugin: C:\Users\UserName\Documents\Arduino\hardware\avr\keyboardio\libraries\Kaleidoscope-Plugin
The current selected board needs the core 'arduino:arduino' that is not installed.
The current selected board needs the core 'arduino:arduino' that is not installed.

Which package, exactly, did you grab, from what source?

arduino-1.8.3-windows.exe from https://www.arduino.cc/en/Main/Software (MD5 = F0CB1FCE96776B23884CE11AAED56029)

Direct link: https://www.arduino.cc/download_handler.php?f=/arduino-1.8.3-windows.exe

Ok. That’s the same package I installed on my Windows 10 box. ash
While I used Microsoft’s bash environment to do my git clones, I agree your version is identical.

But the thing that’s missing was installed for me automatically as part of the Arduino installer. Hrm. I’m on deadline this weekend and can’t poke much right now, but it’s important to me to get this figured out next week if nobody beats me to it.

Yes, that’s the one I grabbed.

There’s a bunch of Arduino branded devices listed.

Understood. (Saw the KS update). Getting the final version of the production firmware completed obviously has much higher precedence than my tinkering around with the firmware for a keyboard I’ve yet to receive. So no worries on waiting to resolve this. I’ll continue to play around and do some research.

BTW, I’m using Windows 7. Curious if that plays a role?

So am I, so it may very well.

Both of you who are seeing this are running Win 7. I’m testing on Win 10. It’s possible that there’s something odd there.

I’ll try a Win 10 VM and if necessary a Win 10 install on my multi-boot system and let you know.

1 Like

I can give it a try on Windows 8.1 tomorrow.

Sorry to report I got the same error on a fresh Win 10 VM. I need to call it a day for today. I’ll try some new things tomorrow if I get a chance. Here’s hoping algernon can track it down.

Oh, that’s good to know. I’ve been using 1.6.x because that’s what the docs said to use. Will have to try something newer soon…

1 Like

I’m running Windows 10 and ran into the same issues as previously described following the procedure outlined by Javaru… The current selected board needs the core ‘arduino:arduino’ that is not installed…etc.

I’m basically a novice with Arduino, so take this for what it’s worth. I figured I’d tinker around with the software while I’m waiting for the hardware to arrive.

1 Like