Created Sat, 03 Mar 2012 04:27:20 +0000 by knChip
Sat, 03 Mar 2012 04:27:20 +0000
Hi,
I tried to compile a fairly large program. This program compiles properly if the board is selected as max32. If I change the board to UNO-32, I get the following error.
Thanks,
Narayanan
c:/mpide-0023-windows-20111221/mpide-0023-windows-20111221/hardware/pic32/compiler/pic32-tools/bin/../lib/gcc/pic32mx/4.5.1/../../../../pic32mx/bin/ld.exe: small-data section exceeds 64KB; lower small-data size limit (see option -G)
solpos.c.o: In function S_decode': \AppData\Local\Temp\build624486449613838344.tmp/solpos.c:996: relocation truncated to fit: R_MIPS_GPREL16 against
_iob'
\AppData\Local\Temp\build624486449613838344.tmp/solpos.c:993: relocation truncated to fit: R_MIPS_GPREL16 against _iob' \AppData\Local\Temp\build624486449613838344.tmp/solpos.c:990: relocation truncated to fit: R_MIPS_GPREL16 against
_iob'
\AppData\Local\Temp\build624486449613838344.tmp/solpos.c:987: relocation truncated to fit: R_MIPS_GPREL16 against _iob' \AppData\Local\Temp\build624486449613838344.tmp/solpos.c:984: relocation truncated to fit: R_MIPS_GPREL16 against
_iob'
\AppData\Local\Temp\build624486449613838344.tmp/solpos.c:981: relocation truncated to fit: R_MIPS_GPREL16 against _iob' \AppData\Local\Temp\build624486449613838344.tmp/solpos.c:978: relocation truncated to fit: R_MIPS_GPREL16 against
_iob'
\AppData\Local\Temp\build624486449613838344.tmp/solpos.c:975: relocation truncated to fit: R_MIPS_GPREL16 against _iob' \AppData\Local\Temp\build624486449613838344.tmp/solpos.c:972: relocation truncated to fit: R_MIPS_GPREL16 against
_iob'
\AppData\Local\Temp\build624486449613838344.tmp/solpos.c:969: relocation truncated to fit: R_MIPS_GPREL16 against `_iob'
\AppData\Local\Temp\build624486449613838344.tmp/solpos.c:966: additional relocation overflows omitted from the output
collect2: ld returned 1 exit status
Sat, 03 Mar 2012 07:03:12 +0000
It says your data is to large for the target device.
Sat, 03 Mar 2012 08:54:41 +0000
Hi,
Thanks for the tips.
I thought of this possibilities, but when I tried to build for the same device PIC32MX320F128H suing MPLAB IDE with c32 v2.02 it compiles. As far as my code goes, the RAM requirement is less than 1Kb. I thought that the printf's might be copying all data to the RAM, so I commented out them as well.
Could you please suggest some more tips?
Thanks,
Narayanan
Sat, 03 Mar 2012 11:19:58 +0000
Resolved. The issue is with fprintf(stderr, "hello"); type of statement.
Sat, 03 Mar 2012 17:17:34 +0000
I really is difficult to help with unseen code - vague is the best I can do!