chipKIT® Development Platform

Inspired by Arduino™

MPIDE Linker in MPLAB X = Build Errors

Created Sun, 29 Jun 2014 17:42:41 +0000 by woodjmichael


woodjmichael

Sun, 29 Jun 2014 17:42:41 +0000

Trying to follow these instructions verbatim: http://chipkit.net/programming-chipkit-boards-in-mplabx/

The problems seems to be that the new linker files don't, well, link. Without the linker files my project builds fine (the template project for the MX795F512L btw) and as soon as I add the linker files (appropriately modified as per link above) it can't find all kinds of references. Hrm.

Win 7 (64), MPLAB X v2.05, XC32 v1.31, PICkit 3 (not that it matters)

Thoughts? Thanks!

build/C32_PIC32MX795F512L/production/main.o: In function `SYSTEMConfig':
c:/program files (x86)/microchip/xc32/v1.31/pic32mx/include/peripheral/system.h:341: undefined reference to `INTDisableInterrupts'
build/C32_PIC32MX795F512L/production/main.o: In function `SYSTEMConfigWaitStates':
c:/program files (x86)/microchip/xc32/v1.31/pic32mx/include/peripheral/system.h:175: undefined reference to `INTDisableInterrupts'
c:/program files (x86)/microchip/xc32/v1.31/pic32mx/include/peripheral/system.h:177: undefined reference to `INTRestoreInterrupts'
build/C32_PIC32MX795F512L/production/main.o: In function `OSCSetPBDIV':
c:/program files (x86)/microchip/xc32/v1.31/pic32mx/include/peripheral/osc.h:175: undefined reference to `INTDisableInterrupts'
c:/program files (x86)/microchip/xc32/v1.31/pic32mx/include/peripheral/osc.h:183: undefined reference to `INTRestoreInterrupts'
build/C32_PIC32MX795F512L/production/main.o: In function `SYSTEMConfig':
c:/program files (x86)/microchip/xc32/v1.31/pic32mx/include/peripheral/system.h:362: undefined reference to `CheKseg0CacheOn'
c:/program files (x86)/microchip/xc32/v1.31/pic32mx/include/peripheral/system.h:369: undefined reference to `INTRestoreInterrupts'
build/C32_PIC32MX795F512L/production/main.o: In function `main':
c:/users/michael wood/mplabxprojects/pic32_c_template_1.x/main.c:59: undefined reference to `INTConfigureSystemmake[2]: Leaving directory `C:/Users/Michael Wood/MPLABXProjects/pic32_c_template_1.X'
make[1]: Leaving directory `C:/Users/Michael Wood/MPLABXProjects/pic32_c_template_1.X'
'
collect2: ld returned 1 exit status
make[2]: *** [dist/C32_PIC32MX795F512L/production/pic32_c_template_1.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 6s)

majenko

Sun, 29 Jun 2014 18:28:47 +0000

Are you using the right linker scripts? XC32 1.31 uses a new format that is different to the "old" version that "normal" MPIDE versions use.

You will have to use the linker scripts from the very latest test version of MPIDE (as that uses an open version of XC32 1.31): [url]http://chipkit.s3.amazonaws.com/index.html[/url]


woodjmichael

Thu, 03 Jul 2014 02:38:54 +0000

Well, I downloaded the 20140316 build of MPIDE which looked to be the newest non-test release.

I'll try 0605-test.


woodjmichael

Thu, 03 Jul 2014 03:47:32 +0000

20140605-test didn't build either.