User Level: Newbie
Compiler: XC8
IDE: MPLAB X
MCU: PIC16f18324 (Mid-Range Enhanced, 8-bit)
Program description: Blink an LED using Timer 0 and interrupts. The source code is in the attachments ("my code.txt")
I have tried everything to get this simple code to successfully run.
1. Checked the program for logical/syntax errors
2. Configured the project with the correct settings, file names, and location
3. Referred to the MPLAB XC8 Compiler manual to see if I set up the interrupt correctly
4. Referred to another post regarding the same issue:
https://www.eevblog.com/forum/microcontrollers/microchip-xc8-compiler-problems/5. Re-installed the compiler
I don't know what to do, I've read everything and I can't this out. Help!!!
Failure Description: Every time I build the code I always get the following errors:
CLEAN SUCCESSFUL (total time: 14ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Marco/Documents/MPLAB/FirstProject/TimerAndInterrupts.X'
make -f nbproject/Makefile-default.mk dist/default/production/TimerAndInterrupts.X.production.hex
make[2]: Entering directory 'C:/Users/Marco/Documents/MPLAB/FirstProject/TimerAndInterrupts.X'
"C:\Program Files (x86)\Microchip\xc8\v2.00\bin\xc8-cc.exe" -mcpu=16F18324 -c -fno-short-double -fno-short-float -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -Wa,-a -DXPRJ_default=default -msummary=-psect,-class,+mem,-hex,-file -ginhx032 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -std=c99 -gdwarf-3 -mstack=compiled:auto:auto -o build/default/production/source.p1 source.c
source.c:124:6: error: variable has incomplete type 'void'
void interrupt MY_ISR(void)
^
source.c:124:15: error: expected ';' after top level declarator
void interrupt MY_ISR(void)
^
;
2 errors generated.
(908) exit status = 1
nbproject/Makefile-default.mk:105: recipe for target 'build/default/production/source.p1' failed
make[2]: *** [build/default/production/source.p1] Error 1
make[2]: Leaving directory 'C:/Users/Marco/Documents/MPLAB/FirstProject/TimerAndInterrupts.X'
make[1]: *** [.build-conf] Error 2
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make: *** [.build-impl] Error 2
make[1]: Leaving directory 'C:/Users/Marco/Documents/MPLAB/FirstProject/TimerAndInterrupts.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
BUILD FAILED (exit value 2, total time: 1s)