Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PIC32: mips-elf-objcopy: address 0xffffffff9d005180 out of range
16-01-2012, 01:38 AM,
#1
PIC32: mips-elf-objcopy: address 0xffffffff9d005180 out of range
Hi,

Pinguino works fine, the LEDs blink, so far, so good, thanks for putting together this package!

- I've compiled mips-elf-gcc myself, but mips-elf-objcopy refuses to convert the elf file into a hex file:

---
mips-elf-objcopy -O ihex xxx.elf xxx.hex
BFD: xxx.hex: address 0xffffffff9d005180 out of range for Intel Hex file
mips-elf-objcopy:xxx.hex: Bad value
---

This happens with self-compiled binutils, different versions, and it happens as well with precompiled binaries from retrobsd. It works with the binaries in the "pinguino 208 working linux" package.

- After using the Pinguino mips-elf-objcopy, I get a hex file. When I try to upload the hex file with ubw32, ubw32 refuses to write a "record with unknown record type".

- Then I've found something very special in Makefile.linux:

---
grep --binary --invert-match '^:040000059D006000FA' $(SRCDIR)/main32.hex > $(SRCDIR)/temp.hex
---

which removes the offending line from the hex file.

Now the hex gets uploaded, and it works.

My questions are:
- How did you compile binutils, specifically did you modify mips-elf-objcopy?
- What exactly is happening here?

Thanks

Bye
Z.
Reply
16-01-2012, 09:22 PM,
#2
RE: PIC32: mips-elf-objcopy: address 0xffffffff9d005180 out of range
Hi zaemiemi

Yes, there is a problem in objcopy in GCC 4.5.2. We modified the source of gcc to solve this problem. I can send you the diff between original gcc and our modified version.
The first line of the hex file put code at address 0 of the flash. This is a problem when you want to use a bootloader. The hex code at address 0 is just a jump to the start address. So we removed this code to be compatible with the bootloader. The resulting error message when using UBW32 with the original code is due to UBW32 which verify the code to not overwrite the bootloader.

JP


(16-01-2012, 01:38 AM)zaemiemi Wrote: Hi,

Pinguino works fine, the LEDs blink, so far, so good, thanks for putting together this package!

- I've compiled mips-elf-gcc myself, but mips-elf-objcopy refuses to convert the elf file into a hex file:

---
mips-elf-objcopy -O ihex xxx.elf xxx.hex
BFD: xxx.hex: address 0xffffffff9d005180 out of range for Intel Hex file
mips-elf-objcopy:xxx.hex: Bad value
---

This happens with self-compiled binutils, different versions, and it happens as well with precompiled binaries from retrobsd. It works with the binaries in the "pinguino 208 working linux" package.

- After using the Pinguino mips-elf-objcopy, I get a hex file. When I try to upload the hex file with ubw32, ubw32 refuses to write a "record with unknown record type".

- Then I've found something very special in Makefile.linux:

---
grep --binary --invert-match '^:040000059D006000FA' $(SRCDIR)/main32.hex > $(SRCDIR)/temp.hex
---

which removes the offending line from the hex file.

Now the hex gets uploaded, and it works.

My questions are:
- How did you compile binutils, specifically did you modify mips-elf-objcopy?
- What exactly is happening here?

Thanks

Bye
Z.

Reply
17-01-2012, 02:36 AM,
#3
RE: PIC32: mips-elf-objcopy: address 0xffffffff9d005180 out of range
(16-01-2012, 09:22 PM)Jean-Pierre Wrote: I can send you the diff between original gcc and our modified version.

Yes, please. Could you post it here? Another good place would be linux/pic32/ in svn.

Thanks

Bye
Z.
Reply
25-01-2012, 09:13 PM,
#4
RE: PIC32: mips-elf-objcopy: address 0xffffffff9d005180 out of range
Sorry to bother you again. Could you post the patch, please?

Thanks
Reply
01-03-2013, 11:10 AM,
#5
RE: PIC32: mips-elf-objcopy: address 0xffffffff9d005180 out of range
UP. I need it too.
Reply
01-03-2013, 11:51 AM,
#6
RE: PIC32: mips-elf-objcopy: address 0xffffffff9d005180 out of range
This was a long time ago ...
Ok, as far as I remember you must replace binutils/bfd/ihex.c with the one attached in this message. Then compile binutils again and it should solve the bug with objcopy.
Good luck.
Régis

.c   ihex.c (Size: 25.04 KB / Downloads: 41)


(01-03-2013, 11:10 AM)nessnuo Wrote: UP. I need it too.
It is easier to complain than it is to do, but it is better to do than it is to complain.
Reply
01-03-2013, 11:54 AM,
#7
RE: PIC32: mips-elf-objcopy: address 0xffffffff9d005180 out of range
Thank you very much Big Grin
Reply
04-03-2013, 03:57 PM,
#8
RE: PIC32: mips-elf-objcopy: address 0xffffffff9d005180 out of range
(01-03-2013, 11:51 AM)regis Wrote: This was a long time ago ...

Well, we actually missed the first birthday. :-)
Better late, than never :-)

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)