- Code: Select all
#include <xc.h>
//#include <p18f452.h>
void Main (void)
{
}
The code output is.
- Code: Select all
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'D:/MPLABXProjects/BasicCodeTEST.X'
make -f nbproject/Makefile-default.mk dist/default/production/BasicCodeTEST.X.production.hex
make[2]: Entering directory 'D:/MPLABXProjects/BasicCodeTEST.X'
"C:\Program Files\Microchip\xc8\v1.32\bin\xc8.exe" --pass1 --chip=18F452 -Q -G --double=24 --float=24 --emi=wordwrite --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,-download,+config,+clib,+plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -obuild/default/production/452Test.p1 452Test.c
"C:\Program Files\Microchip\xc8\v1.32\bin\xc8.exe" --chip=18F452 -G -mdist/default/production/BasicCodeTEST.X.production.map --double=24 --float=24 --emi=wordwrite --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,-download,+config,+clib,+plib --output=-mcof,+elf:multilocs --stack=compiled:auto:auto:auto "--errformat=%f:%l: error: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s" -odist/default/production/BasicCodeTEST.X.production.elf build/default/production/452Test.p1
Microchip MPLAB XC8 C Compiler (Free Mode) V1.32
Part Support Version: 1.32 (A)
Copyright (C) 2014 Microchip Technology Inc.
License type: Node Configuration
:: advisory: (1233) Employing 18F452 errata work-arounds:
:: advisory: (1234) * Address 4000h boundary
:: advisory: (1234) * Faulty table reads at -40 degrees C
:: advisory: (1234) * GOTO instruction at reset vector must be preceded by NOP
:: advisory: (1234) * Peripherals can misbehave if BSR = 15
:: advisory: (1234) * DAW instruction may improperly clear CARRY bit
:: advisory: (1234) * Specifically disable interrupt sources during tblwt instruction
:: advisory: (1234) * Writes to flash must target opposite side of 4000h boundary
:: warning: (1273) Omniscient Code Generation not available in Free mode
Non line specific message:: error: (1091) main function "_main" not defined
(908) exit status = 1
make[2]: *** [dist/default/production/BasicCodeTEST.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
nbproject/Makefile-default.mk:116: recipe for target 'dist/default/production/BasicCodeTEST.X.production.hex' failed
make[2]: Leaving directory 'D:/MPLABXProjects/BasicCodeTEST.X'
nbproject/Makefile-default.mk:75: recipe for target '.build-conf' failed
make[1]: Leaving directory 'D:/MPLABXProjects/BasicCodeTEST.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 5s)
I tried to make the code as basic as possible. I don't understand the errors. Where did I make a mistake?