Hot!Non line specific message:: error: (1437) CMF error: no psect defined for the line (908)

Author
BitWise
Super Member
  • Total Posts : 1238
  • Reward points : 0
  • Joined: 2004/11/09 13:24:20
  • Location: UK
  • Status: offline
2018/05/16 04:36:17 (permalink)
0

Non line specific message:: error: (1437) CMF error: no psect defined for the line (908)

I'm working on a simple project using XC8 1.45 with MPLABX 4.05 and have hit a problem. My project targets an 18F27K40 but as they have not arrived yet I thought I'd start debugging using one of the 18F2680 or 18F2550 I found in the workshop.
 
XC8 compiles and links fine when the target is the 18f27K40 but fails with the following error when either of the older devices is selected.
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'D:/Son.Im/son.im-quotem'
make -f nbproject/Makefile-default.mk dist/default/production/son.im-quotem.production.hex
make[2]: Entering directory 'D:/Son.Im/son.im-quotem'
"C:\Program Files (x86)\Microchip\xc8\v1.45\bin\xc8.exe" --chip=18F2680 -G -mdist/default/production/son.im-quotem.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/son.im-quotem.production.elf build/default/production/firmware.p1
Microchip MPLAB XC8 C Compiler (Free Mode) V1.45
Build date: Nov 15 2017
Part Support Version: 1.45 (B)
Copyright (C) 2017 Microchip Technology Inc.
License type: Node Configuration
:: advisory: (1233) Employing 18F2680 errata work-arounds:
:: advisory: (1234) * Corrupted fast interrupt shadow registers
:: warning: (1273) Omniscient Code Generation not available in Free mode
Non line specific message:: error: (1437) CMF error: no psect defined for the line
(908) exit status = 1
nbproject/Makefile-default.mk:131: recipe for target 'dist/default/production/son.im-quotem.production.hex' failed
make[2]: Leaving directory 'D:/Son.Im/son.im-quotem'
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'D:/Son.Im/son.im-quotem'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [dist/default/production/son.im-quotem.production.hex] Error 1
I tried working backwards through XC8 compiler versions and the code compiles with 1.32 but not later. 
 
I've also found the MPLABX 4.05 does not allow me to change the NDEBUG configuration bit in CONFIG4L on the 18F2680 or 18F2550. It does not appear in the configuration bit editor with other bits in the same configuration byte.
 
Is there a workaround for these? Example project files attached.

Throughout your life advance daily, becoming more skillful than yesterday, more skillful than today. This is never-ending.

Yamamoto Tsunetomo (1659-1719)
#1

4 Replies Related Threads

    davekw7x
    Entropy++
    • Total Posts : 1586
    • Reward points : 0
    • Joined: 2012/01/16 12:01:07
    • Location: Left Coast, USA
    • Status: offline
    Re: Non line specific message:: error: (1437) CMF error: no psect defined for the line (90 2018/05/16 06:58:20 (permalink)
    +4 (4)
    You have to look, really look, at the code.  With all of those furshlugginer asm statements inside those furshlugginer macros it's easy to overlook "simple" stuff.
     
    In particular, look at the parts that are different for the CPUs that fail.
     
    What's missing in your lines 278, 279, 280 of TRANSMIT_BIT for '26K80 and '2550?

        asm ("nop"); \
        asm ("nop");
        asm ("bcf LATB,0"); \



    Maybe this can get you to the point of starting debugging.
     
    Bottom line:
    Why can't the compiler give better diagnostics? Well, it's always a challenge (to the compiler as well as to C programmers who would like to help) with embedded asm() statements.
     
    Regards,

    Dave
     
     
    post edited by davekw7x - 2018/05/16 08:20:09

    Sometimes I just can't help myself...
    #2
    jack@kksound
    code tags!
    • Total Posts : 2892
    • Reward points : 0
    • Joined: 2014/05/14 10:03:19
    • Location: 0
    • Status: offline
    Re: Non line specific message:: error: (1437) CMF error: no psect defined for the line (90 2018/05/16 07:59:15 (permalink)
    +2 (2)
    I've also found the MPLABX 4.05 does not allow me to change the NDEBUG configuration bit in CONFIG4L on the 18F2680 or 18F2550. It does not appear in the configuration bit editor with other bits in the same configuration byte.

    Because YOU are not supposed to change that bit, the IDE does that for a DEBUG build/RUN.
    #3
    mad_c
    Super Member
    • Total Posts : 1127
    • Reward points : 0
    • Joined: 2010/12/12 17:48:27
    • Location: Brisbane, Australia
    • Status: online
    Re: Non line specific message:: error: (1437) CMF error: no psect defined for the line (90 2018/05/16 14:30:12 (permalink)
    +3 (3)
    BitWise
    XC8 compiles and links fine when the target is the 18f27K40 but fails with the following error when either of the older devices is selected.
    Non line specific message:: error: (1437) CMF error: no psect defined for the line



    This error is usually produced when there is code (which will typically be hand-written assembly) that is not inside a section (psect).
     
    You are missing a backslash on the indicated line, resulting in the remaining code being interpreted as actual code, not a macro definition.

    #if defined (__18F2680__) || defined (__18F2550__)
    #define TRANSMIT_BIT(reg,bit) \
        asm ("bsf LATB,0"); \
        asm ("nop"); \
        asm ("nop"); \
        asm ("btfss " reg "," #bit); \
        asm ("bcf LATB,0"); \
        asm ("nop"); \
        asm ("nop"); \
        asm ("nop");       <------- oops!
        asm ("bcf LATB,0"); \
        asm ("nop"); \
        asm ("nop"); \
        asm ("nop"); \
        asm ("nop");
    #endif
     

     
    Jeff.
     
    #4
    BitWise
    Super Member
    • Total Posts : 1238
    • Reward points : 0
    • Joined: 2004/11/09 13:24:20
    • Location: UK
    • Status: offline
    Re: Non line specific message:: error: (1437) CMF error: no psect defined for the line (90 2018/05/17 04:09:36 (permalink)
    0
     
    Many thanks. I just could not see that.

    Throughout your life advance daily, becoming more skillful than yesterday, more skillful than today. This is never-ending.

    Yamamoto Tsunetomo (1659-1719)
    #5
    Jump to:
    © 2018 APG vNext Commercial Version 4.5