Menu

#137 Unresolved External? Assertion failed! sym != NULL

open
nobody
None
5
2020-09-05
2020-09-03
CScotty
No

SDCC v 4.0.0
WIn 10 64 bit
IDE : MPlAB 5.4.0
Target: PIC14

I'm stuck on he following error, which would seem to be an unresolved external:

"Assertion failed!

Program: C:\PROGRA~2\gputils\bin\gplink.exe
File: gpcofflink.c, Line 190

Expression: sym != NULL"

The error message doesn't tell me the name of the problematic symbol and I can't seem to find a log file that might help. I see that gplink does have a command line option -S1 that would give me more info but since SDCC generates for the linker script I don't know I could make that happen.

Any suggestion that might help me debug this would be appreciated.

Thanks.

Discussion

  • CScotty

    CScotty - 2020-09-03

    Since writing the above my understanding of the process has improved (I think) but I'm no closer to a soluton. It seems that SDCC uses ASLINK ( and not gplink as I had thought). I alao see that the linker scripts are supplied not generated but have no bearing on this in any case.

    ASLINK does not seem to have any command line options that will give me more info.

     
  • CScotty

    CScotty - 2020-09-05

    Looks like a have a party of one here! I ran make from the command line and got a bit more info. This is nothing to do with unresolved symbols but a parser error. It doesn't seem to like chr1 line1 of a file, possibly the linker script as it was the last one loaded.

     
  • Erik Petrich

    Erik Petrich - 2020-09-05

    I think you need a newer version of the gputils package. It looks like the error you reported was reported and fixed in gplink several years ago:
    https://sourceforge.net/p/gputils/bugs/300/

    SDCC handles pic14 and pic16 somewhat differently than the other backends. So while SDCC uses the ASXXXX assembler and linker for most backends, it uses the gputils assembler and linker for the PICs.

     

Log in to post a comment.