AnaviTechnology / anavi-docs

Documents for all ANAVI open source hardware products
http://anavi.technology/
64 stars 34 forks source link

Trouble setting up QMK on Windows for Macro Pad 2 #41

Closed UNIVAC-Colonel-Panic closed 2 years ago

UNIVAC-Colonel-Panic commented 2 years ago

https://github.com/AnaviTechnology/anavi-docs/blob/master/anavi-macro-pad-2/anavi-macro-pad-2.md#chapter-3-software

It's my understanding that I need to install the older QMK software v0.13.19 in order to use a GUI version of the Configurator on my local PC.

I'm using the steps documented here. I read Chapter 1 (overview), Chapter 2 (assembly) and I'm now on Chapter 3 (software).

  1. "CHAPTER 3: Software Out of the box ANAVI Macro Pad 2 comes with the popular open source firmware QMK. Several different keymaps are supported. For details how to build and flash QMK firmware on ANAVI Macro Pad 2 please have a look at the README."

    This opening paragraph is confusing and I'm wondering if you could safely remove the "For details how to build..." because as far as I can tell the Macro Pad 2 already has the firmware installed. I'm attempting to go through Chapter 3 as a first time user.

  2. Flashing: This part is confusing because I'm attempting to install QMK for Windows but this seems to apply to macOS or Linux. I looked ahead into other steps of Chapter 3 and learned I'd be installing QMK MSYS2, and I know MSYS2 provides a linux-like shell, which makes me wonder if the instructions are out of sequence -- on Windows I don't see how I can do "git clone [micronucleus] etc." and "make install" until after I install QMK MSYS2 which would give me the linux-like shell to do the clone/make install etc.

  3. Continuing on in the Flashing section, I'm now at the "Instructions: Setup QMK" step. I go here and read the "Prerequisites" section. I've got a text editor I use on Windows so I don't do anything for that. The Toolbox sounds very useful so I follow it's link and download and install qmk_toolbox_install.exe version 0.1.1

  4. I go back to here and proceed with section, "2. Prepare Your Build Environment :id=set-up-your-environment". Under "Windows/Prerequisites" I'm directed to "You will need to install QMK MSYS. The latest release is available here." Following the links I'm eventually taken to where I download and install QMK_MSYS.exe v1.5.1.

  5. I see (edited for brevity):

     ...
     Welcome to QMK MSYS!
     ...
     If you have not already done so,
       run qmk setup to get started.
     ...

$ qmk setup

     ☒ Could not find qmk_firmware!
     Would you like to clone qmk/qmk_firmware to C:/Users/taa/qmk_firmware? [y/n] y
     Cloning into '/c/Users/taa/qmk_firmware'...
     Updating files:   0% (155/28431)
     ...
     Updating files: 100% (28431/28431), done.
     Submodule 'lib/chibios' (https://github.com/qmk/ChibiOS) registered for path 'lib/chibios'
     ...
     Submodule 'lib/vusb' (https://github.com/qmk/v-usb) registered for path 'lib/vusb'
     Cloning into '/c/Users/taa/qmk_firmware/lib/chibios'...
     ...
     Submodule path 'lib/vusb': checked out 'bdb53e4c043d089279d9891b68bea77614cb97ee'       
     Ψ Successfully cloned https://github.com/qmk/qmk_firmware to C:/Users/taa/qmk_firmware! 
     Ψ Added https://github.com/qmk/qmk_firmware as remote upstream.                         
     Ψ QMK Doctor is checking your environment.                                              
     Ψ CLI version: 1.0.0                                                                    
     Ψ QMK home: C:/Users/taa/qmk_firmware                                                   
     Ψ Detected Windows 10 (10.0.19043).                                                     
     Ψ Git branch: master                                                                    
     Ψ All dependencies are installed.                                                       
     Ψ Found arm-none-eabi-gcc version 10.1.0                                                
     Ψ Found avr-gcc version 8.4.0                                                           
     Ψ Found avrdude version 6.3                                                             
     Ψ Found dfu-util version 0.10                                                           
     Ψ Found dfu-programmer version 0.7.2                                                    
     Ψ Submodules are up to date.                                                            
     Ψ QMK is ready to go                                                                    

$
  1. I return to here and continue with the section, "3. Run QMK Setup :id=set-up-qmk" where for Windows I'm instructed to do "qmk setup" but this doesn't make sense to me because I already did that (number 5 above).

  2. I read "4. Test Your Build Environment" but so far the Anavi Macro Pad 2 steps haven't provided me with file names to put here. Since it's just a "Test" step, I skip it.

  3. I read "5. Configure Your Build Environment (Optional)" but skip doing anything for the same reason as number 7, the Anavi Macro Pad 2 steps haven't provided file names to put here.

  4. This completes the "Setup QMK" steps so I return to here and proceed to "Download QMK firmware version 0.13.19, for example:"

$ git clone -b 0.13.19 https://github.com/qmk/qmk_firmware.git

     fatal: destination path 'qmk_firmware' already exists and is not an empty directory.

$ git submodule update --init

     fatal: not a git repository (or any of the parent directories): .git

$  make anavi/macropad2:default

     make: *** No rule to make target 'anavi/macropad2:default'.  Stop.

$

Help!

Section CHAPTER 3: Software could use some clarification:

I'm lost! :( Is it really necessary to flash the firmware before installing a local copy of the Configurator? Because flashing is what the docs seem to want me to do, as I've shown above.

leon-anavi commented 2 years ago

Hi @UNIVAC-Colonel-Panic,

Sorry for the inconvenience. Based on your feedback I have updated chapter 3.

Have you already successfully installed Micronucleus on Windows? This is a popular open source project for ATTiny usb bootloader (including for Microchip ATTiny85 which is used on ANAVI Macro Pad 2). According to the usage guide from Micronucleus in its README there are some specific steps on Windows and especially on Windows 10: https://github.com/micronucleus/micronucleus#usage

This error fatal: destination path 'qmk_firmware' already exists and is not an empty directory was caused by existing directory with the same name. To avoid this I've updated the user's guide of ANAVI Macro Pad 2 as follows:

git clone -b 0.13.19 https://github.com/qmk/qmk_firmware.git qmk-01319
cd qmk-01319
git submodule update --init
make anavi/macropad2:default
make anavi/macropad2:default:flash

or alternatively with micronucleus:

micronucleus --run anavi_macropad2_default.hex

NOTE: If you want to build another QMK keymap for ANAVI Macro Pad 2 replace default with its name. All existing keymaps are in directory keyboards/anavi/macropad2/keymaps/.

This way the older version of QMK firmware which is compatible with ANAVI Macro Pad 2 will be downloaded in a separate directory called qmk-01319.

Thanks, Leon

leon-anavi commented 2 years ago

I will close this issue as it has been solved.

However, just to repeat for anyone that might be reading this thread in future that on Fri Aug 6 2021 the support for all keyboards using Microchip ATtiny85, including ANAVI Macro Pad 2, was dropped from QMK due to the increased size of the firmware following the implementation of a features to https://github.com/qmk/qmk_firmware/pull/8591. Therefore support for ANAVI Macro Pad 2 is available in older versions, for example QMK firmware version 0.13.19.

Best regards, Leon