Hot!Porting parts of c18 to XC8; only error is: (908) exit status = 1

Author
slonik
New Member
  • Total Posts : 6
  • Reward points : 0
  • Joined: 2010/02/01 09:00:02
  • Location: 0
  • Status: offline
2018/03/17 01:50:12 (permalink)
0

Porting parts of c18 to XC8; only error is: (908) exit status = 1

Hi,
 
I have been porting parts of an old c18 project to a new XC8 project, I had to use a slightly older v1.34 compiler as I want to use plib libraries.
 
it fails to link (I think) and gives this output which gives no clue as to the problem:
 

 

CLEAN SUCCESSFUL (total time: 34ms)
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Aneta/MPLABXProjects/awax-5k-lp.X'
make -f nbproject/Makefile-default.mk dist/default/production/awax-5k-lp.X.production.hex
make[2]: Entering directory 'C:/Users/Aneta/MPLABXProjects/awax-5k-lp.X'
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/mcc_generated_files/mcc.p1 mcc_generated_files/mcc.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/mcc_generated_files/pin_manager.p1 mcc_generated_files/pin_manager.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/mcc_generated_files/interrupt_manager.p1 mcc_generated_files/interrupt_manager.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/mcc_generated_files/eusart2.p1 mcc_generated_files/eusart2.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/lcd.p1 lcd.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/modem.p1 modem.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/mcc_generated_files/eusart1.p1 mcc_generated_files/eusart1.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/charging.p1 charging.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/adc.p1 adc.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/ito_hex.p1 ito_hex.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/sleep_sample.p1 sleep_sample.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/menu.p1 menu.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/keys.p1 keys.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --pass1 --chip=18F26K22 -Q -G --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/i2c_temp.p1 i2c_temp.c
"C:\Program Files (x86)\Microchip\xc8\v1.34\bin\xc8.exe" --chip=18F26K22 -G -mdist/default/production/awax-5k-lp.X.production.map --double=24 --float=24 --emi=wordwrite --opt=default,+asm,+asmfile,-speed,+space,-debug --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/awax-5k-lp.X.production.elf build/default/production/mcc_generated_files/pin_manager.p1 build/default/production/mcc_generated_files/eusart1.p1 build/default/production/mcc_generated_files/eusart2.p1 build/default/production/mcc_generated_files/mcc.p1 build/default/production/mcc_generated_files/interrupt_manager.p1 build/default/production/main.p1 build/default/production/modem.p1 build/default/production/lcd.p1 build/default/production/charging.p1 build/default/production/adc.p1 build/default/production/ito_hex.p1 build/default/production/sleep_sample.p1 build/default/production/menu.p1 build/default/production/keys.p1 build/default/production/i2c_temp.p1
Microchip MPLAB XC8 C Compiler (Free Mode) V1.34
Build date: Feb 16 2015
Part Support Version: 1.34
Copyright (C) 2015 Microchip Technology Inc.
License type: Node Configuration
 
:: warning: (1273) Omniscient Code Generation not available in Free mode
(908) exit status = 1
nbproject/Makefile-default.mk:355: recipe for target 'dist/default/production/awax-5k-lp.X.production.hex' failed
make[2]: Leaving directory 'C:/Users/Aneta/MPLABXProjects/awax-5k-lp.X'
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/Aneta/MPLABXProjects/awax-5k-lp.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [dist/default/production/awax-5k-lp.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
 
BUILD FAILED (exit value 2, total time: 7s)
 

 
Please could someone give me a hint?
 
Thanks
post edited by slonik - 2018/03/17 01:51:35
#1

4 Replies Related Threads

    exerion
    Starting Member
    • Total Posts : 70
    • Reward points : 0
    • Joined: 2012/10/23 05:00:24
    • Location: 0
    • Status: offline
    Re: Porting parts of c18 to XC8; only error is: (908) exit status = 1 2018/03/17 08:02:05 (permalink)
    +1 (1)
    It looks it's failing due to other reasons, I don't see any compiler error message in your output but instead it looks there are no targets for the make file.
    Normally when that happens to me, it's because i changed some files/folders in the project (rename or delete normally), and MPLABX doesnt' detect the changes and the makefile is still keeping the old dependencies. Usually cleaning the project and building from 0, is enough, but sometimes I have to close and reopen the project (especially If i change the project name). MPLABX is not exactly... bug free (it even crashes sometimes when I rename projects mr green: mr green)
     
    Porting Plib from C18 to XC8, it's not hard... compiler will complain about some specific things normally related to the differences between compilers (eeprom/ram variables, near/far qualifiers, etc.). Most of them aren't required by XC8 or can be replaced easily.

    Any reason to use 1.34? If you port them, you could use any compiler since you have the source code.
    #2
    exerion
    Starting Member
    • Total Posts : 70
    • Reward points : 0
    • Joined: 2012/10/23 05:00:24
    • Location: 0
    • Status: offline
    Re: Porting parts of c18 to XC8; only error is: (908) exit status = 1 2018/03/17 08:40:05 (permalink)
    +1 (1)
    I think if you really want to port the PLIB, do this:
     
    1) create a new library project using xc8 (not a standard project).
    2) add all the required files from the plib.
    3) select a microcontroller as target
    4) build
     
    Doing this is basically to not mix your code with the PLIB and avoid warnings/errors not related to the library itself that will divert your attention.
     
    You'll get many, many... warnings and errors, but most of them are related to the same problem. For example, if you find warnings about the "rom" qualifiers, replace them with "const" (a whole search & replace with your supervision), etc.
     
    Time ago I had to port the plib for a new microcontroller and xc8 and it only took 15 minutes or so. The code parts I required worked fine without any further change apart from the required to build the project, but I didn't test all the library code. It was and still is buggy.
    post edited by exerion - 2018/03/17 08:41:11
    #3
    slonik
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2010/02/01 09:00:02
    • Location: 0
    • Status: offline
    Re: Porting parts of c18 to XC8; only error is: (908) exit status = 1 2018/03/19 15:00:01 (permalink)
    0
     
    Thanks a lot for the tips, I'll give it a go grin: grin and post back
    #4
    slonik
    New Member
    • Total Posts : 6
    • Reward points : 0
    • Joined: 2010/02/01 09:00:02
    • Location: 0
    • Status: offline
    Re: Porting parts of c18 to XC8; only error is: (908) exit status = 1 2018/04/10 12:53:52 (permalink)
    0
    turned out to be some new code I had written like this:
     

                strlcat (outLine, curTable->itemFunc(), sizeof outLine);

     
    when changed to this, it didnt crash the linker:
     

                const char *iText = curTable->itemFunc();
                strlcat (outLine, iText, sizeof outLine);

    #5
    Jump to:
    © 2018 APG vNext Trial Version 4.5