Good Day All,
I recently updated to newer versions of MPLabX and XC8 C compiler. C compiler was version 1.12, updated that to 1.33B. I don't remember what version MPLab X was prior to updating, but it is now version 2.26. I backed up my project files and all prior to updating, and then uninstalled MPLAB, XC8, PICC, etc. Then I installed MPLabX and then finally installed the XC8 compiler (that was my update order).
After doing so, I attempted to write an extremely simple program to demonstrate the software to someone and am now getting failure on build. The program is below, as are the failures. At first, I had noticed that the xc.h file was still pointing to the 1.12 version folder, so I updated those to the new location, which solved those errors. I also changed the compiler setting in the MPLAB options to the new 1.33 version, so that should not be the cause of the issue. Maybe it has just been a while since I wrote a program and my code is the issue, however, I basically copied from an old program that I know used to compile with no issues in the older versions, which is now not compiling. Any ideas? Thanks!
Please note that the __delay_ms(500) seems to be the cause of the failure. Compiles fine without that, but I've checked the user manual and seem to be meeting all the requirements for using it. I've also checked the pic.h file which includes notes about using __delay_ms(x).
This code was written for the PIC12F629
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Ryan/MPLABXProjects/learnc_test.X'
make -f nbproject/Makefile-default.mk dist/default/production/learnc_test.X.production.hex
make[2]: Entering directory 'C:/Users/Ryan/MPLABXProjects/learnc_test.X'
"C:\Program Files (x86)\Microchip\xc8\v1.33\bin\xc8.exe" --pass1 --chip=12F629 -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/learnc_test.p1 learnc_test.c
learnc_test.c:15: error: (195) expression syntax
learnc_test.c:15: error: (187) too few function arguments
learnc_test.c:15: error: (194) ")" expected
learnc_test.c:15: error: (195) expression syntax
(908) exit status = 1
make[2]: *** [build/default/production/learnc_test.p1] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-default.mk:94: recipe for target 'build/default/production/learnc_test.p1' failed
make[2]: Leaving directory 'C:/Users/Ryan/MPLABXProjects/learnc_test.X'
nbproject/Makefile-default.mk:78: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/Ryan/MPLABXProjects/learnc_test.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
BUILD FAILED (exit value 2, total time: 541ms)
I recently updated to newer versions of MPLabX and XC8 C compiler. C compiler was version 1.12, updated that to 1.33B. I don't remember what version MPLab X was prior to updating, but it is now version 2.26. I backed up my project files and all prior to updating, and then uninstalled MPLAB, XC8, PICC, etc. Then I installed MPLabX and then finally installed the XC8 compiler (that was my update order).
After doing so, I attempted to write an extremely simple program to demonstrate the software to someone and am now getting failure on build. The program is below, as are the failures. At first, I had noticed that the xc.h file was still pointing to the 1.12 version folder, so I updated those to the new location, which solved those errors. I also changed the compiler setting in the MPLAB options to the new 1.33 version, so that should not be the cause of the issue. Maybe it has just been a while since I wrote a program and my code is the issue, however, I basically copied from an old program that I know used to compile with no issues in the older versions, which is now not compiling. Any ideas? Thanks!
Please note that the __delay_ms(500) seems to be the cause of the failure. Compiles fine without that, but I've checked the user manual and seem to be meeting all the requirements for using it. I've also checked the pic.h file which includes notes about using __delay_ms(x).
This code was written for the PIC12F629
Code:
#include <xc.h>
#pragma config BOREN = OFF, MCLRE = OFF, PWRTE = ON, WDTE = OFF, FOSC = INTRCIO
#define _XTAL_FREQ = 4000000
void main()
{
TRISIO = 0b00001000;
GPIO = 0;
while(1)
{
GP0 = 1;
__delay_ms(500);
GP0 = 0;
}
}
make[1]: Entering directory 'C:/Users/Ryan/MPLABXProjects/learnc_test.X'
make -f nbproject/Makefile-default.mk dist/default/production/learnc_test.X.production.hex
make[2]: Entering directory 'C:/Users/Ryan/MPLABXProjects/learnc_test.X'
"C:\Program Files (x86)\Microchip\xc8\v1.33\bin\xc8.exe" --pass1 --chip=12F629 -Q -G --double=24 --float=24 --opt=default,+asm,+asmfile,-speed,+space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/learnc_test.p1 learnc_test.c
learnc_test.c:15: error: (195) expression syntax
learnc_test.c:15: error: (187) too few function arguments
learnc_test.c:15: error: (194) ")" expected
learnc_test.c:15: error: (195) expression syntax
(908) exit status = 1
make[2]: *** [build/default/production/learnc_test.p1] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-default.mk:94: recipe for target 'build/default/production/learnc_test.p1' failed
make[2]: Leaving directory 'C:/Users/Ryan/MPLABXProjects/learnc_test.X'
nbproject/Makefile-default.mk:78: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/Ryan/MPLABXProjects/learnc_test.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
BUILD FAILED (exit value 2, total time: 541ms)