Jump to content
  • 0

Mx7ck with ADC, Timer and Ethernet


JrMagril

Question

Hello Guys!

I hope you can help me with some doubts.

I have a code that I use the ADC, TIMER and ETHERNET modules, when I try to compile it some erros are reported, as follows:

 

C:/Users/MyName/Desktop/mpide-0023-windows-20140821/hardware/pic32/compiler/pic32-tools/bin/../lib/gcc/pic32mx/4.5.2/../../../../pic32mx/bin/ld.exe: small-data section exceeds 64KB; lower small-data size limit (see option -G)
chipKITEthernet\utility\DNS.c.o: In function `DNSEndUsage':
C:/Users/MyName/Documents/mpide/libraries/chipKITEthernet/utility/DNS.c:208:(.text.DNSEndUsage+0x0): relocation truncated to fit: R_MIPS_GPREL16 against `no symbol'
C:/Users/MyName/Documents/mpide/libraries/chipKITEthernet/utility/DNS.c:211:(.text.DNSEndUsage+0x20): relocation truncated to fit: R_MIPS_GPREL16 against `no symbol'
C:/Users/MyName/Documents/mpide/libraries/chipKITEthernet/utility/DNS.c:213:(.text.DNSEndUsage+0x38): relocation truncated to fit: R_MIPS_GPREL16 against `no symbol'
chipKITEthernet\utility\DNS.c.o: In function `DNSResolve':
C:/Users/MyName/Documents/mpide/libraries/chipKITEthernet/utility/DNS.c:262:(.text.DNSResolve+0x48): relocation truncated to fit: R_MIPS_GPREL16 against `no symbol'
C:/Users/MyName/Documents/mpide/libraries/chipKITEthernet/utility/DNS.c:256:(.text.DNSResolve+0x74): relocation truncated to fit: R_MIPS_GPREL16 against `no symbol'
chipKITEthernet\utility\DNS.c.o: In function `DNSIsResolved':
C:/Users/MyName/Documents/mpide/libraries/chipKITEthernet/utility/DNS.c:358:(.text.DNSIsResolved+0x0): relocation truncated to fit: R_MIPS_GPREL16 against `no symbol'
C:/Users/MyName/Documents/mpide/libraries/chipKITEthernet/utility/DNS.c:369:(.text.DNSIsResolved+0xac): relocation truncated to fit: R_MIPS_GPREL16 against `no symbol'
C:/Users/MyName/Documents/mpide/libraries/chipKITEthernet/utility/DNS.c:380:(.text.DNSIsResolved+0xfc): relocation truncated to fit: R_MIPS_GPREL16 against `no symbol'
C:/Users/MyName/Documents/mpide/libraries/chipKITEthernet/utility/DNS.c:384:(.text.DNSIsResolved+0x114): relocation truncated to fit: R_MIPS_GPREL16 against `no symbol'
C:/Users/MyName/Documents/mpide/libraries/chipKITEthernet/utility/DNS.c:388:(.text.DNSIsResolved+0x124): relocation truncated to fit: R_MIPS_GPREL16 against `no symbol'
C:/Users/MyName/Documents/mpide/libraries/chipKITEthernet/utility/DNS.c:423:(.text.DNSIsResolved+0x1f4): additional relocation overflows omitted from the output
collect2: ld returned 1 exit status

I'm using the timer with interruption enabled, the ADC is used to scan 6 chs and the Ethernet to send the data to my computer, somebody coud help me?

Regards.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Hi JrMagril,

I'm actually having a similar problem with my code on the Mx7Ck. I think the linker script is allocating data memory to the wrong spot and is causing this error. I am looking into this now, and I'll let you know if I discover any fixes.

Thanks,

Tommy

Link to comment
Share on other sites

Hi JrMagril,

I'm actually having a similar problem with my code on the Mx7Ck. I think the linker script is allocating data memory to the wrong spot and is causing this error. I am looking into this now, and I'll let you know if I discover any fixes.

Thanks,

Tommy

tom21091, my problem was the memory. I was using an unecessary type of variable (float), when I change it to unsigned shor int everything worked!

Hope it help u!

Thanks.

Link to comment
Share on other sites

Hi JrMagril,

It turns out I was right about the linker script. It places the small data values too far away from the global pointer in memory for it to reach them. I notified Keith and he is working on releasing a new linker script. 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...