Qmk_firmware: generated hex file contains invalid address

Created on 28 Oct 2018  路  4Comments  路  Source: qmk/qmk_firmware

Hello,
When I run make xxx:xxx:dfu to compile and flash my keyboard, the output always contains something like:

Bootloader Version: 0x00 (0)
Erasing flash...  Success
Checking memory from 0x0 to 0x6FFF...  Empty.
WARNING (line 1445): 0x800284 address outside valid region,
 suppressing additional address error messages.
Total of 0x4 bytes in invalid addressed.
WARNING: 0x4 bytes are outside target memory,
 and will not be written.
Checking memory from 0x0 to 0x5A7F...  Empty.
0%                            100%  Programming 0x5A80 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]  Success
0%                            100%  Reading 0x7000 bytes...
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>]  Success
Validating...  Success

The keyboard seems to working correctly, although I have not yet test any complex functionalities. The relevant part of the generated hex file has following content (with line number at beginning).

1436 :1059B0007F27A7279028A7279028DA27FB2790285A
1437 :0459C00052285E28E3
1438 :1059C400010201191A1B1C1D1E1F20212206022878
1439 :1059D40008140A321EAD214B222022EA21B02101F3
1440 :1059E400F0F1C66766369431373534979633909123
1441 :1059F400929395404D36398B043E040804CF0362DC
1442 :085A0400037B039403AD0300D2
1443 :0200000400807A
1444 :040284000000000076
1445 :00000001FF

After looking up the hex format, the warning message starts to make sense: line 1443 is a extended linear address record which prepend 0x0080 to the next line's address, resulting in 0x00800284. Do these lines expected or is there something wrong with my compiler? What could be the cause of this?

I'm in archlinux, with avr-gcc 8.2. I have not encountered the errors mentioned in documentation(error: 'const' attribute on function returning 'void') when compiling. It's not very easy for me to get an avr-gcc 7.x in archlinux, but if the version could be the problem I can try with that when I have time.

BTW, thanks for your work. This project (and tmk) are awesome.

help wanted question

Most helpful comment

You're very welcome.

If you want the more technical answer, you can find this posted here:
https://sourceware.org/bugzilla/show_bug.cgi?id=23570

All 4 comments

Yeah, the problem is avr-gcc 8.2. There is a known bug in it, that should be fixed in the next release, but that hasn't made it out.

You want to revert to 8.1 or 7.3 to fix the issue (most likely).

Thanks for the info. This clears my doubt.

You're very welcome.

If you want the more technical answer, you can find this posted here:
https://sourceware.org/bugzilla/show_bug.cgi?id=23570

This also fixed my issue with the mitosis firmware, thanks for the heads up.

Was this page helpful?
0 / 5 - 0 ratings