profet23 / atreus62

Design files for the atreus62 keyboard
GNU General Public License v3.0
219 stars 49 forks source link

Struggling to flash firmware #6

Closed owenstranathan closed 6 years ago

owenstranathan commented 6 years ago

I realize GH is probably not the best place for this but here I go anyway.

I am using a promicro clone from here https://www.amazon.com/gp/product/B012FOV17O/ref=oh_aui_detailpage_o08_s00?ie=UTF8&psc=1

I am not able to flash my modified firmware nor the default firmware onto the board using avrdude on a mac. (I have also tried avrdudess on my windows machine at work to similar effect)

I run the following command

$ avrdude -p atmega32u4 -P /dev/cu.usbmodem1421 -c avr109 -U flash:w:atreus62_default.hex

and the output is like so

Connecting to programmer: .
Found programmer: Id = "CATERIN"; type = S
    Software Version = 1.0; No Hardware Version given.
Programmer supports auto addr increment.
Programmer supports buffered memory access with buffersize=128 bytes.

Programmer supports the following devices:
    Device code: 0x44

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9587 (probably m32u4)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "atreus62_default.hex"
avrdude: input file atreus62_default.hex auto detected as Intel Hex
avrdude: ERROR: address 0x800224 out of range at line 1083 of atreus62_default.hex
avrdude: read from file 'atreus62_default.hex' failed

avrdude: safemode: Fuses OK (E:CB, H:D8, L:FF)

avrdude done.  Thank you.

This is my first build and in my naivete I went ahead and soldered the board to the wiring before programmimg it. I was initially certain that I had just gotten a melon board, but I've bought 2 other boards and had the same issues (So the problems is probably me)

I would really appreciate help on this.

profet23 commented 6 years ago

Could you zip the file you are using (atreus62_default.hex) and attach it here? Let's try and remove variables.

profet23 commented 6 years ago

You said you've tried multiple pro micros?

owenstranathan commented 6 years ago

@profet23 Hey Thanks for responding. I also posted this question in /r/olkb and someone over there knew exactly the issue. https://www.reddit.com/r/olkb/comments/9ong7q/trouble_flashing_pro_micro_clone/

Apparently it's a bug in avr-gcc 8.2 (I'm not familiar with exact nature of the bug, other than it obviously tries to access disallowed segments of memory) But switching to avr-gcc 7.X and recompiling got me rolling. The only other problem I encountered was my columns were in revers order (probably I just wired it backwards, I had to use a separate source for translating the pinnout from teensy to promicro) i just reversed the column order in config.h and I was fine.

If anyone else comes here in the future the TL;DR is:

Thanks again for trying to help me! And thanks for the great design!