Issues with the legacy peripheral libraries - MPLAB X IDE v5

This forum handles questions and discussions concerning Microchip’s 32-bit compilers, assemblers, linkers and related tools for PIC32 MCUs.

Issues with the legacy peripheral libraries - MPLAB X IDE v5

Postby Newline Novice » Thu Mar 03, 2022 8:53 pm

I'm new to MPLAB and the PIC and a coworker of mine gave me an older project to play around with get get acclimated. It makes use of the legacy peripheral libraries, so I went ahead and installed them (from: https://www.microchip.com/SWLibraryWeb/ ... %20Library). It compiles fine for him, not so much for me. The only difference I have found is he has XC32-v2.50 and I have XC32-v3.01 of the compiler. I am getting dozens of "multiple definition of [insert function declared in header files from legacy libraries]" errors. I have included a handful of the output errors below.

Any feedback appreciated!

"C:\Program Files\Microchip\xc32\v3.01\bin\xc32-gcc.exe" -mprocessor=32MX775F512H -o dist/PIC32MX775F512H/production/TB_RELAYS_PIC.X.production.elf build/PIC32MX775F512H/production/configuration_bits.o build/PIC32MX775F512H/production/exceptions.o build/PIC32MX775F512H/production/interrupts.o build/PIC32MX775F512H/production/main.o build/PIC32MX775F512H/production/system.o build/PIC32MX775F512H/production/leds.o build/PIC32MX775F512H/production/relays.o build/PIC32MX775F512H/production/uart.o -DXPRJ_PIC32MX775F512H=PIC32MX775F512H -legacy-libc -Wl,--defsym=__MPLAB_BUILD=1,--no-code-in-dinit,--no-dinit-in-serial-mem,-Map="dist/PIC32MX775F512H/production/TB_RELAYS_PIC.X.production.map",-DTEST_OPTION,--memorysummary,dist/PIC32MX775F512H/production/memoryfile.xml -mdfp="C:/Users/E1246936/.mchp_packs/Microchip/PIC32MX_DFP/1.3.231"
c:\program files\microchip\xc32\v3.01\bin\bin\gcc\pic32mx\8.3.1\..\..\..\..\bin/pic32m-ld.exe: build/PIC32MX775F512H/production/exceptions.o: in function `INTSingleVectorRegisterSet':
c:/program files/microchip/xc32/v3.01/pic32mx/include/lega-c/peripheral/int.h:506: multiple definition of `INTSingleVectorRegisterSet'; build/PIC32MX775F512H/production/configuration_bits.o:c:/program files/microchip/xc32/v3.01/pic32mx/include/lega-c/peripheral/int.h:506: first defined here
c:\program files\microchip\xc32\v3.01\bin\bin\gcc\pic32mx\8.3.1\..\..\..\..\bin/pic32m-ld.exe: build/PIC32MX775F512H/production/exceptions.o: in function `INTGetInterruptVectorNumber':
c:/program files/microchip/xc32/v3.01/pic32mx/include/lega-c/peripheral/int.h:546: multiple definition of `INTGetInterruptVectorNumber'; build/PIC32MX775F512H/production/configuration_bits.o:c:/program files/microchip/xc32/v3.01/pic32mx/include/lega-c/peripheral/int.h:546: first defined here
c:\program files\microchip\xc32\v3.01\bin\bin\gcc\pic32mx\8.3.1\..\..\..\..\bin/pic32m-ld.exe: build/PIC32MX775F512H/production/exceptions.o: in function `INTGetInterruptVectorPriority':
c:/program files/microchip/xc32/v3.01/pic32mx/include/lega-c/peripheral/int.h:579: multiple definition of `INTGetInterruptVectorPriority'; build/PIC32MX775F512H/production/configuration_bits.o:c:/program files/microchip/xc32/v3.01/pic32mx/include/lega-c/peripheral/int.h:579: first defined here
c:\program files\microchip\xc32\v3.01\bin\bin\gcc\pic32mx\8.3.1\..\..\..\..\bin/pic32m-ld.exe: build/PIC32MX775F512H/production/exceptions.o: in function `INTGetInterruptVectorNumberAndPriority':
Newline Novice
 
Posts: 1
Joined: Thu Mar 03, 2022 4:31 pm

Re: Issues with the legacy peripheral libraries - MPLAB X ID

Postby ric » Fri Mar 04, 2022 3:37 am

There were lots of changes to the compiler from v2.x to v3.x
I would recommend downloading the same version of the compiler that your co-worker is using.
You can get it at: https://www.microchip.com/en-us/tools-resources/archives/mplab-ecosystem
Latest test project, an LED matrix display made from one reel of addressable LEDs. here
User avatar
ric
Verified identity
 
Posts: 659
Joined: Sat May 24, 2014 2:35 pm
Location: Melbourne, Australia
PIC experience: Professional 5+ years with MCHP products


Return to MPLAB XC32

Who is online

Users browsing this forum: No registered users and 8 guests

cron