ghostseven / Draytronics-Daisy-PCB-V1

An open source macro pad with rotary encoders and under glow, designed to be easily built with through hole components.
2 stars 1 forks source link

Bootloader #1

Open dayofdoom opened 2 years ago

dayofdoom commented 2 years ago

Hello,

Is there a custom bootloader for this or is it the standard one for the chip?

Thank you

ghostseven commented 2 years ago

Ah crap yes I have not written the guide to flashing this yet sorry about that. It uses a a modified version of USBaspLoader. The change is basically just adjustment of D+, D- pins to match QMK standards.

If you grab the fork here - https://github.com/ghostseven/USBaspLoader

You will need to make a tweak to the Makefile.inc to change

DEVICE = atmega328p

FLASHADDRESS = 0x7000

As the default is setup for flashing my Scarlet Keyboard that has a ATMega32 chip.

You can then basically follow the flashing guide here - https://www.draytronics.co.uk/scarlet-firmware-programming-guide/

You will need to change out the QMK firmware so you flash the Daisy firmware instead of Scarlet.

Sorry I would write up a full guide but my lab is currently packed in boxes waiting for a house move!

Any problems drop me a message and I will do my best to help.

dayofdoom commented 2 years ago

This is perfect, thanks for the information! I'm working on a high profile 3D case too - using the files you provided in the repo.

ghostseven commented 2 years ago

No problem at all, sorry I have not got something more formal together. I kind of got stuck with chip shortages and other things so I never made up kits, otherwise I would have fully documented it. The high profile case sounds great, I would love to see how that turns out. I hope you have a lovely Xmas.

ghostseven commented 2 years ago

Hmm, right I am finding the packing box with my boot loader programmer and I will have a play!

Thanks

Blake On 30 Dec 2021, 01:40 +0000, jrdsgl @.***>, wrote:

So I went ahead and edit the makefile.inc like you wrote above and changed my programmer to USBASP to match my environment. When I run make firmware, this is what I get !!!ATTANTION!!! (data+text) MUST fit into your MCUs bootloader section . text data bss dec hex filename 2164 6 55 2225 8b1 main.el Any suggestions? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ghostseven commented 2 years ago

Sorry I am being dumb today, that is actually just a warning message.   It should not cause you any problems.

I just managed to dig out my programmer and flash the daisy pcb from scratch with it.  It all works fine, you will get the ‘flash fuse’ complaining but you can ignore that.

Ping me back if you have issues but you can ignore that error about the MCUs bootloader section.  I even have a picture of it doing that on the Scarlet flashing guide here : https://www.draytronics.co.uk/scarlet-firmware-programming-guide/

Thanks

Blake On 30 Dec 2021, 12:20 +0000, @.***, wrote:

Hmm, right I am finding the packing box with my boot loader programmer and I will have a play!

Thanks

Blake On 30 Dec 2021, 01:40 +0000, jrdsgl @.***>, wrote:

So I went ahead and edit the makefile.inc like you wrote above and changed my programmer to USBASP to match my environment. When I run make firmware, this is what I get !!!ATTANTION!!! (data+text) MUST fit into your MCUs bootloader section . text data bss dec hex filename 2164 6 55 2225 8b1 main.el Any suggestions? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

dayofdoom commented 2 years ago

I was dumb too and found that in the documentation as well. All good. Still having trouble getting the make fuse to work correctly.

asciicast

I'm able to get the firmware to flash in QMK toolbox ok, but the board doesn't actually show up. I think this is an issue with the make fuse error shown in the video above.

One other thing to note is I don't have R7 populated on the PCB, from what I saw in KiCAD, that was only in use for the LEDs. IMG_2687

ghostseven commented 2 years ago

You will be ok with those fuse settings, it did the same to me. I need to poke around and check (I think it is trying to set a fuse that it is not possible to change) but that will work now and allow you to flash the qmk firmware.

Thanks

Blake On 30 Dec 2021, 21:57 +0000, jrdsgl @.***>, wrote:

I was dumb too and found that in the documentation as well. All good. Still having trouble getting the make fuse to work correctly. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>