pro micro flashing strangeness

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
pmcquay
 
Posts: 39
Joined: Fri Jan 16, 2015 8:54 am

pro micro flashing strangeness

Post by pmcquay »

Hello, I'm not sure if this belongs here, or in some keyboard forum, but since the people who wrote the Caterina bootloader are here I thought I'd start here.

I've been having issues flashing a custom keyboard I made recently. It is a Victor Lucachi Void Ergo S that I printed all of the parts for and handwired. The board works great so far. The problem I'm having is that sometimes when I change the keymap, the QMK MSYS cli reports that everything compiled and avrdude reports that flashing and verifying worked perfectly, but the keymap does not update. If I leave the board overnight and just try a recompile and reflash in the morning it works one time (I've done this twice now, and it seems like a pattern.) but after that it goes back to not working.

Things I've tried so far:

1. double tap resetting the board, does nothing, I dont think these particular micros need it.
2. holding reset while plugging in the board, no difference.
3. comparing the old hex file generated to the latest one, this is a little hazy, I think the hex file is changed all the time, but the overnight one is changed a lot more. I'm really not sure what to make of this.
4. flashing a blink sketch. This worked, but when I went back to my qmk firmware nothing changed.

At this point, I think the issue is either in the compiler toolchain, and for some reason its just not picking up my changes, or the micro board has some other place that it stores part of the firmware that is not getting overwritten, somehow.

here is the firmware I'm using: https://github.com/patrickmcquay/qmk_fi ... /void_ergo, the slim version, and the pmcquay keymap.

I'm thinking I'm missing something here and am hoping that someone here knows where to point me. I am a programmer by trade, just not an embedded one.

User avatar
pmcquay
 
Posts: 39
Joined: Fri Jan 16, 2015 8:54 am

Re: pro micro flashing strangeness

Post by pmcquay »

more things I've tried:

restarting qmk msys, no response
restarting my pc, no response there either

User avatar
pmcquay
 
Posts: 39
Joined: Fri Jan 16, 2015 8:54 am

Re: pro micro flashing strangeness

Post by pmcquay »

more things I've tried:

several people have told me to flash both boards, which I have been doing, but it is not the solution to this, and from what I've read it's not required
just tried again after another night, this makes 3 times its worked one time after leaving it for a while

User avatar
pmcquay
 
Posts: 39
Joined: Fri Jan 16, 2015 8:54 am

Re: pro micro flashing strangeness

Post by pmcquay »

Ive dumped the hex contents of the controller after a successful flash, and then again after an unsuccessful flash, in which I changed some of the keymap. There is a change to the files, and it could be enough to be the changes to the keymap, yet it is still using the old map.
Screenshot 2021-11-12 104012.png
Screenshot 2021-11-12 104012.png (42.92 KiB) Viewed 534 times

User avatar
pmcquay
 
Posts: 39
Joined: Fri Jan 16, 2015 8:54 am

Re: pro micro flashing strangeness

Post by pmcquay »

on the off chance someone looks at this, I did an experiment where I dumped the contents of the micro 4 times. Once with an original keymap, again where I made some changes and it didnt work, and again with the same changes the next day and it did work, and then again shortly after the third time with the original map again, which did not work. I'm pretty confident that when I flash the original map onto it tomorrow, it will magically work.

This is a fork of a fork that is pretty out of date, maybe theres some interaction there. Ill try updating to newest QMK I guess.

sadly I dont actually have the skills to debug this problem, so I will probably just change ecosystems and get some sparkfun pro micro sized rp2040s.
Attachments
.build.zip
(193.19 KiB) Downloaded 5 times

User avatar
pmcquay
 
Posts: 39
Joined: Fri Jan 16, 2015 8:54 am

Re: pro micro flashing strangeness

Post by pmcquay »

Alright, finally found the right place to ask about this. Turns out in VIA enabled builds (of which this is apparently one, and I had no idea) it stores the keymap in eeprom, and only changes it if the compiled in magic number changes. It changes every day, explaining the strange update frequency issue. I needed to hold either space and b or the top left key while plugging in, and that erases eeprom and puts it in boooader mode. Posting this so that anyone else that finds this sees an answer.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”