be80be
Well-Known Member
Been playing at this can't figure what I missing here
Code:
CLEAN SUCCESSFUL (total time: 423ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/USER/MPLABXProjects/blink32.X'
make -f nbproject/Makefile-default.mk dist/default/production/blink32.X.production.hex
make[2]: Entering directory 'C:/Users/USER/MPLABXProjects/blink32.X'
In file included from main.c:4:0:
c:\program files\microchip\xc32\v1.43\pic32mx\include\lega-c\plib.h:41:30: fatal error: peripheral/adc10.h: No such file or directory
#include <peripheral/adc10.h>
^
compilation terminated.
"C:\Program Files\Microchip\xc32\v1.43\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX250F128B -MMD -MF build/default/production/main.o.d -o build/default/production/main.o main.c -DXPRJ_default=default -legacy-libc
nbproject/Makefile-default.mk:111: recipe for target 'build/default/production/main.o' failed
make[2]: Leaving directory 'C:/Users/USER/MPLABXProjects/blink32.X'
nbproject/Makefile-default.mk:84: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/USER/MPLABXProjects/blink32.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [build/default/production/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
Code:
#include <stdio.h>
#include <stdlib.h>
#include <xc.h>
#include <plib.h>
#define SYS_FREQ (80000000L)
main() {
SYSTEMConfig(SYS_FREQ, 0);
mPORTAClearBits(BIT_0); //Clear bits to ensure light is off.
mPORTASetPinsDigitalOut(BIT_0); //Set port as output
int i;
int j;
while(1) { //This loop determines the initial time between blinks.
j = 100000;
while (j){ //This loop controlls how quickely blinking speeds up.
mPORTAToggleBits(BIT_0); //Toggle light status. (Can be viewed in LATA SFR)
i = j; //Time to wait in between toggle.
while(i--) {} //Kill time.
j = j - 1000; //Increase constant to increas blinking speed faster.
}
}