Author Topic: Help with Bootloader for Coseyfannitutti's Discipline  (Read 2541 times)

0 Members and 1 Guest are viewing this topic.

Offline AdrnGlvn

  • Thread Starter
  • Posts: 2
Help with Bootloader for Coseyfannitutti's Discipline
« on: Sun, 02 August 2020, 18:41:45 »
Hello I am new member, as well as keyboard builder and decided to try and tackle the Discipline lol.
I have already got to the point where it was time to test the keyboard, and my windows does no recognize the device saying "device descriptor failed". I am assuming its the boot loader based on research and others with similar issues. I am trying to flash my Board with an Arduino as an ISP, and am using the files he provided via https://github.com/coseyfannitutti/USBaspLoader/tree/atmega32a. however i am having trouble specifying "build parameters" the buidconfig.h file such as pins, clock speed, etc. any help would be appreciated! Thanks in advance!!!!!

Offline andrew632

  • Posts: 3
Re: Help with Bootloader for Coseyfannitutti's Discipline
« Reply #1 on: Sun, 02 August 2020, 21:09:32 »
I think you may have misinterpreted the instructions - you need to have some sort of environment to run the makefile script included with the USBaspLoader bootloader fork. All of the settings are preconfigured for the Atmega32A and if you're familiar with building QMK and setting up MSYS2 (assuming you're on Windows) you can use mingw to build the .hex you need to flash.

I've attached mine (main.hex), although it did build with 1 error I failed to identify - my keyboard still works regardless of that though. Personally I would recommend using https://github.com/zkemble/AVRDUDESS to flash the microcontroller

Note that you will also have to burn fuses which you can find in the Makefile.inc, but note that you will no longer be able to flash through the Arduino as ISP without the external crystal attached to the XTAL pins of the microcontroller once you've done this. For reference, they're as follows (formatted for avrdude(ss)):

-U lfuse:w:0x1f:m
-U hfuse:w:0xc0:m

I've also attached my build of the default .hex for the Discipline from QMK, in the event that you're having issues setting up MSYS2 and the required repositories.

Offline AdrnGlvn

  • Thread Starter
  • Posts: 2
Re: Help with Bootloader for Coseyfannitutti's Discipline
« Reply #2 on: Sun, 02 August 2020, 22:24:05 »
I was able to flash your main.hex file and now the device shows up as USBasp on windows, and when i try to flash QMK with the file they provide with the discipline i get "avrdude.exe -p atmega32a -c usbasp -U flash:w:"C:\Users\adgal\Downloads\coseyfannitutti_discipline_default_13306c64.hex":i
    avrdude.exe: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor='www.fischl.de' product='USBasp'".. It also shows up on QMK as "USBasp device connected" so im not sure what is happening.

Offline andrew632

  • Posts: 3
Re: Help with Bootloader for Coseyfannitutti's Discipline
« Reply #3 on: Mon, 03 August 2020, 08:32:31 »
As Cosey Fannitutti's keyboards are themselves derivatives of the Plaid by hsgw, I'd recommend looking at their bootloader info - https://github.com/hsgw/plaid/blob/master/doc/en/bootloader.md.
I failed to mention that with the USBasp bootloader, you should in theory be able to flash using the USBasp device - but in order to do that you will need to burn the fuses beforehand using your ArduinoISP.

Otherwise, you can write the QMK firmware while still using the ArduinoISP and then subsequently burn the fuses.

Do note that you have to ensure that your AVRdude or other software is set to not erase the flash when writing the QMK firmware with your keymap(s).

If you continue to have significant issues, I can burn the bootloader and QMK firmware on a 32A and send it to you - just shoot me a PM.

Offline brisinger

  • Posts: 2
Re: Help with Bootloader for Coseyfannitutti's Discipline
« Reply #4 on: Sun, 30 August 2020, 09:49:55 »
Hi,

New member here too, also new to the mechanical keyboard scene. Just finished building my discipline v1 and are getting te windows does not recognise this usb device error. I do not have an avr programmer or Arduino. Is there any way to resolve this issue without? If the only way is to reflash the bootloader i will buy an avr programmer but then i will need help because what i have read so far makes absolutely no sense to me. I hope it is allroght to reply to this post? I thought it would be alright since i have the same problem.
Kind regards,
Brisinger
« Last Edit: Sun, 30 August 2020, 09:53:03 by brisinger »

Offline brisinger

  • Posts: 2
Re: Help with Bootloader for Coseyfannitutti's Discipline
« Reply #5 on: Fri, 04 September 2020, 15:34:46 »
Guys my problem is fixed, could borrow a pocket avr programmer from a friend who could help with the reprogramming, flashed the original bootloader and Hex on it an now it works.
Kind regards,
Brisinger