From time to time, we refresh the GNU Embedded ARM compiler (GCC) in our JumpStart C++ with the latest stable GNU release. Earlier in 2019, we refreshed GCC to the 2018-Q4 release. Surprisingly, our testing showed a failure immediately:
objcopy.exe: 64-bit address 0x4b4fa300000000 out of range
Normally, a GCC “stable release” goes through an arduous testing process, so this was quite unexpected. After spending some time to make sure we had done everything correctly, and after still seeing errors, it was time to call on the experts – search engines.
There have been some complaints about objcopy over the years, but this search result gave us what we were looking for, all the way down at the 6th search result, in this case:
Reading through it, this issue only appears in the official GNU Embedded ARM build for Windows; other builds from the same source exhibit no such issue. As of today, unfortunately, this bug still exists.
The workaround for this objcopy bug is to use objcopy from older releases, or from other builds. For JumpStart C++ , we decided to pull the objcopy from the MCU Eclipse build to replace the broken one. If you are using JumpStart C++, you do not need to do anything. However, if you are downloading GCC yourself, we offer a fixed copy of objcopy.exe on our server for your convenience (this link will eventually be obsolete after GNU Embedded Arm fixes the problem). Right click to download, then remove the -2018Q4-Fixed suffix, and put the file in your GCC arm-none-eabi\bin\ directory.