# Flashing: SKETCH, LIBRARY, SOURCEDIR, and ROOT need to be set

**URL:** <https://community.keyboard.io/t/flashing-sketch-library-sourcedir-and-root-need-to-be-set/3241>\
**Category:** Programming\
**Tags:** question\
**Created:** [October 8, 2019, 4:53pm UTC](https://community.keyboard.io/t/flashing-sketch-library-sourcedir-and-root-need-to-be-set/3241 "2019-10-08T16:53:53Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![lasse](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/lasse/32/185_2.png) [@lasse](https://community.keyboard.io/u/lasse)\
**Post date:** [October 11, 2019, 9:07am UTC](https://community.keyboard.io/t/flashing-sketch-library-sourcedir-and-root-need-to-be-set/3241/9 "2019-10-11T09:07:09Z")

</div>

Hmm the tool seems to work standalone, but it tries a different /dev when flashing

Full log:

```
lasse@luke ~/D/A/Model01-Factory> chmod +x ../hardware/keyboardio/avr/libraries/Kaleidoscope/bin/find-device-port-macos
lasse@luke ~/D/A/Model01-Factory> ../hardware/keyboardio/avr/libraries/Kaleidoscope/bin/find-device-port-macos
2019-10-11 11:04:44.208 system_profiler[53030:839727] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2019-10-11 11:04:44.209 system_profiler[53030:839727] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
/dev/cu.usbmodemCDkbio011

```

but make flash picks /dev/cu.usbmodemkbio011

```
lasse@luke ~/D/A/Model01-Factory> make flash
BOARD_HARDWARE_PATH="/Users/lasse/Documents/Arduino/hardware" /Users/lasse/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder flash
Building ./Model01-Firmware 0.0.0 into /var/folders/bh/blvc1l9n4dv2m9h0pg_hzdf80000gn/T//kaleidoscope-lasse/sketch/8852701481-Model01-Firmware.ino/output...
- Size: firmware/Model01-Firmware/Model01-Firmware-0.0.0.elf
  - Program: 25010 bytes (87.2% Full)
  - Data: 1338 bytes (52.3% Full)

To update your keyboard's firmware, hold down the 'Prog' key on your keyboard,
and then press 'Enter'.

When the 'Prog' key glows red, you can release it.

^[^[^[^[^[^[^[^[^[^[^[^[^[
2019-10-11 11:05:15.278 system_profiler[53336:840482] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2019-10-11 11:05:15.279 system_profiler[53336:840482] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2019-10-11 11:05:18.533 system_profiler[53347:840575] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2019-10-11 11:05:18.534 system_profiler[53347:840575] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
Connecting to programmer: .avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding

avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_drain(): read error: Device not configured
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = ""; type =
    Software Version = .; Hardware Version = .
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader
avrdude: ser_close(): can't reset attributes for device: Device not configured
avrdude: ser_open(): can't open device "/dev/cu.usbmodemkbio011": No such file or directory
make: *** [flash] Error 1
lasse@luke ~/D/A/Model01-Factory>
```

---

_[View the full topic](https://community.keyboard.io/t/flashing-sketch-library-sourcedir-and-root-need-to-be-set/3241)._
