Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Microcontroller C project will not build in MPLAB X IDE. Do you know why?

Status
Not open for further replies.
T

treez

Guest
Hello,
We are using PIC18F26K20 and using XC8 C and MPLAB X IDE.

Our remote software guy told us he had updated the main.c file and sent it to us. When we used it to replace his old main.c file in the project, we found that the project would not build. We asked him about it, but he told us it would build and sent us what he said was the hex file from it.
Why can we not build it?

The error message is as below……….

Code:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

CLEAN SUCCESSFUL (total time: 125ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/C CODE/Prova_DALI_PIC18.X 170526'
make  -f nbproject/Makefile-default.mk dist/default/production/Prova_DALI_PIC18.X_170526.production.hex
make[2]: Entering directory 'C:/C CODE/Prova_DALI_PIC18.X 170526'
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --pass1  --chip=18F26K20 -Q -G  --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --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/dali_cg_nvmemory.p1  dali_cg_nvmemory.c 
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --pass1  --chip=18F26K20 -Q -G  --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --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/dali_cg_hardware.p1  dali_cg_hardware.c 
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --pass1  --chip=18F26K20 -Q -G  --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --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/dali_cg_layer.p1  dali_cg_layer.c 
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --pass1  --chip=18F26K20 -Q -G  --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --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/dali_cg_machine.p1  dali_cg_machine.c 
dali_cg_hardware.c:86: warning: (373) implicit signed to unsigned conversion
dali_cg_hardware.c:150: warning: (1385) variable "RB0" is deprecated (declared at dali_cg_hardware.c:150)
dali_cg_hardware.c:150: warning: (373) implicit signed to unsigned conversion
dali_cg_nvmemory.c:313: warning: (373) implicit signed to unsigned conversion
dali_cg_nvmemory.c:320: warning: (373) implicit signed to unsigned conversion
dali_cg_nvmemory.c:330: warning: (373) implicit signed to unsigned conversion
dali_cg_nvmemory.c:338: warning: (373) implicit signed to unsigned conversion
dali_cg_nvmemory.c:339: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:753: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:1252: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:1258: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:1314: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:1331: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:1477: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:1479: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:1939: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:1959: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:1961: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:1976: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:1978: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:2002: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:2021: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:2029: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:2029: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:2078: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:2086: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:2105: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:2116: warning: (373) implicit signed to unsigned conversion
dali_cg_machine.c:2404: warning: (373) implicit signed to unsigned conversion
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --pass1  --chip=18F26K20 -Q -G  --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --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/dali_cg_protocol.p1  dali_cg_protocol.c 
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --pass1  --chip=18F26K20 -Q -G  --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --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/lamp_hardware.p1  lamp_hardware.c 
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --pass1  --chip=18F26K20 -Q -G  --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --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/lamp_reference_system_power.p1  lamp_reference_system_power.c 
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --pass1  --chip=18F26K20 -Q -G  --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --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/random.p1  random.c 
dali_cg_protocol.c:188: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:195: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:215: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:228: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:278: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:286: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:316: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:357: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:429: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:447: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:470: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:494: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:511: warning: (373) implicit signed to unsigned conversion
dali_cg_protocol.c:522: warning: (373) implicit signed to unsigned conversion
random.c:60: warning: (373) implicit signed to unsigned conversion
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe" --pass1  --chip=18F26K20 -Q -G  --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --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/main.p1  main.c 
main.c:259: warning: (361) function declared implicit int
"C:\Program Files (x86)\Microchip\xc8\v1.42\bin\xc8.exe"  --chip=18F26K20 -G -mdist/default/production/Prova_DALI_PIC18.X_170526.production.map  --double=24 --float=24 --emi=wordwrite --opt=+asm,+asmfile,-speed,+space,-debug,-local --addrqual=ignore --mode=free -P -N255 --warn=-3 --asmlist -DXPRJ_default=default  --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"      --memorysummary dist/default/production/memoryfile.xml -odist/default/production/Prova_DALI_PIC18.X_170526.production.elf  build/default/production/dali_cg_hardware.p1 build/default/production/dali_cg_nvmemory.p1 build/default/production/dali_cg_layer.p1 build/default/production/dali_cg_machine.p1 build/default/production/dali_cg_protocol.p1 build/default/production/lamp_hardware.p1 build/default/production/lamp_reference_system_power.p1 build/default/production/random.p1 build/default/production/main.p1     
Microchip MPLAB XC8 C Compiler (Free Mode) V1.42
Build date: Apr 12 2017
Part Support Version: 1.42
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration

:: advisory: (1233) Employing 18F26K20 errata work-arounds:
:: advisory: (1234)  * No stopping on H/W breakpoints after NOP2
dali_cg_nvmemory.c:369: error: (2026) variables qualified "eeprom" are not supported for this device
main.c:259: error: (1098) conflicting declarations for variable "_init_EEPROM" (dali_cg_nvmemory.c:303)
(908) exit status = 1
nbproject/Makefile-default.mk:259: recipe for target 'dist/default/production/Prova_DALI_PIC18.X_170526.production.hex' failed
make[2]: Leaving directory 'C:/C CODE/Prova_DALI_PIC18.X 170526'
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/C CODE/Prova_DALI_PIC18.X 170526'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [dist/default/production/Prova_DALI_PIC18.X_170526.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

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

You don't need to quote the full build log to refer to a short error message

Code:
dali_cg_nvmemory.c:369: error: (2026) variables qualified "eeprom" are not supported for this device
main.c:259: error: (1098) conflicting declarations for variable "_init_EEPROM" (dali_cg_nvmemory.c:303)

Suggestion: Scan the log for the first "error:" line, fix the error, retry.

I doubt generally that posting error messages without related code is useful at all. But in this case, the error message sounds almost self-explanatory,
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Thanks
conflicting declarations for variable "_init_EEPROM"
...yes indeed we saw this line, and we suspected that there must be a variable in the code called "_init_EEPROM"..and we suspected that it had been declared somewhere as say a unsigned_int, but perhaps elsewhere as a signed_int, or whatever...however, we could not find the variable anywhere in the code......and the search feature only helps you to find something in the code file that you have open ....it wont search through all files in the project, and there are some 15 code files in this project.
 

and the search feature only helps you to find something in the code file that you have open

With reasonable setup, MPLAB search function covers all project files. 15 code files is a rather small project.

Without the code, I don't know if the problem is simple or not. Just wanted to point out that MPLAB tells you exactly where it sees an error. Just need to read the message.

I understand that you have just started to work with the Microchip tool chain. Expect a learning curve.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top