Mplabx SDCC 2.9 OK, 3.1 fault?

Help
Radioelf
2012-06-18
2013-03-12
  • Radioelf
    Radioelf
    2012-06-18

    Hi, I have these errors when compiling with sdcc 3.1:

    make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
    make: se ingresa al directorio «/home/joan/MPLABXProjects/anemometro.X»
    make  -f nbproject/Makefile-default.mk dist/default/production/anemometro.X.production.hex
    at 1: warning 117: unknown compiler option '-debug-ralloc' ignored
    at 1: warning 117: unknown compiler option '-pstack-model=small' ignored
    at 1: warning 117: unknown compiler option '-debug-ralloc' ignored
    at 1: warning 117: unknown compiler option '-pstack-model=small' ignored
    make: se ingresa al directorio «/home/joan/MPLABXProjects/anemometro.X»
    mkdir -p build/default/production/nbproject
    rm -f  build/default/production/nbproject/main.o
    "/usr/local/bin/sdcc" -debug-ralloc -pstack-model=small -c -mpic14 -p16f88 nbproject/main.c  -obuild/default/production/nbproject/main.o
    mkdir -p dist/default/production
    "/usr/local/bin/sdcc"  -debug-ralloc -Wl-c -Wl-m -pstack-model=small -mpic14 -p16f88 build/default/production/nbproject/main.o  -odist/default/production/anemometro.X.production.cof
    message: using default linker script "/usr/local/share/gputils/lkr/16f88.lkr"
    error: missing definition for symbol "_OPTION_REG_bits", required by "build/default/production/nbproject/main.o"
    error: missing definition for symbol "_INTCON_bits", required by "build/default/production/nbproject/main.o"
    error: missing definition for symbol "_PORTA_bits", required by "build/default/production/nbproject/main.o"
    make: se sale del directorio «/home/joan/MPLABXProjects/anemometro.X»
    make: se sale del directorio «/home/joan/MPLABXProjects/anemometro.X»
    make: ***  Error 1
    make: ***  Error 2
    make: ***  Error 2

    BUILD FAILED (exit value 2, total time: 122ms)

    compiling with sdcc 2.9 is OK:

    make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
    at 1: warning 117: unknown compiler option '-debug-ralloc' ignored
    at 1: warning 117: unknown compiler option '-pstack-model=small' ignored
    at 1: warning 117: unknown compiler option '-debug-ralloc' ignored
    make: se ingresa al directorio «/home/joan/MPLABXProjects/anemometro.X»
    at 1: warning 117: unknown compiler option '-pstack-model=small' ignored
    make  -f nbproject/Makefile-default.mk dist/default/production/anemometro.X.production.hex
    make: se ingresa al directorio «/home/joan/MPLABXProjects/anemometro.X»
    mkdir -p build/default/production/nbproject
    rm -f  build/default/production/nbproject/main.o
    "/usr/bin/sdcc" -debug-ralloc -pstack-model=small -c -mpic14 -p16f88 nbproject/main.c  -obuild/default/production/nbproject/main.o
    mkdir -p dist/default/production
    "/usr/bin/sdcc"  -debug-ralloc -Wl-c -Wl-m -pstack-model=small -mpic14 -p16f88 build/default/production/nbproject/main.o  -odist/default/production/anemometro.X.production.cof
    message: using default linker script "/usr/share/gputils/lkr/16f88.lkr"
    make: se sale del directorio «/home/joan/MPLABXProjects/anemometro.X»
    make: se sale del directorio «/home/joan/MPLABXProjects/anemometro.X»

    BUILD SUCCESSFUL (total time: 104ms)
    Loading code from /home/joan/MPLABXProjects/anemometro.X/dist/default/production/anemometro.X.production.hex…
    Loading symbols from /home/joan/MPLABXProjects/anemometro.X/dist/default/production/anemometro.X.production.cof…
    Loading completed

    you know how I can solve. Thanks  

    Code: http://radioelf.blogspot.com.es/2011/12/anemometro-casero.html

     
  • Borut Ražem
    Borut Ražem
    2012-06-18

    You have to add the "-use-non-free" sdcc command line option. RTFM!

    Borut

     
  • Radioelf
    Radioelf
    2012-06-19

    Thanks, the problem continues …

    at 1: warning 117: unknown compiler option '-debug-ralloc' ignored
    make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
    at 1: warning 117: unknown compiler option '-pstack-model=small' ignored
    make: se ingresa al directorio «/home/joan/MPLABXProjects/anemometro.X»
    make: ***  Error 1
    make: ***  Error 2
    make  -f nbproject/Makefile-default.mk dist/default/production/anemometro.X.production.hex
    make: ***  Error 2
    make: se ingresa al directorio «/home/joan/MPLABXProjects/anemometro.X»
    mkdir -p dist/default/production
    "/usr/local/bin/sdcc"  -debug-ralloc -Wl-c -Wl-m -use-non-free -pstack-model=small -mpic14 -p16f88 build/default/production/nbproject/main.o  -odist/default/production/anemometro.X.production.cof
    message: using default linker script "/usr/local/share/gputils/lkr/16f88.lkr"
    error: missing definition for symbol "_OPTION_REG_bits", required by "build/default/production/nbproject/main.o"
    error: missing definition for symbol "_INTCON_bits", required by "build/default/production/nbproject/main.o"
    error: missing definition for symbol "_PORTA_bits", required by "build/default/production/nbproject/main.o"
    make: se sale del directorio «/home/joan/MPLABXProjects/anemometro.X»
    make: se sale del directorio «/home/joan/MPLABXProjects/anemometro.X»

    BUILD FAILED (exit value 2, total time: 60ms)

     
  • Raphael Neider
    Raphael Neider
    2012-06-20

    You seem to be mixing old sdcc device header files (.h, which declare INTCON_bits, i.e., <NAME>_bits) and new device libraries (.lib, which provide INTCONbits, i.e., <NAME>bits - no underscore leading "bits"). You might also have those declarations copied into your project - those would need to be adjusted to use no separating underscore before "bits" as well.

    Also, make sure to rebuild *all* files after switching compilers.

    Hope that helps,
    Raphael

     
  • Radioelf
    Radioelf
    2012-06-20

    OK. thanks, that was the problem