Compile using wrong config word definition?

  • planethopper

    planethopper - 2007-01-09

    I'm trying to create a simple C program for the new 44-pin Pickit2 development board (PIC16F917) and having the compilation issue shown below.
    I'm using SDCC 2.6.0 for windows (on Windows XP).

    Here is my code:


    #define __16F917
    #include <pic/pic16f917.h>

    typedef unsigned int config;

    void main(void)

    Compile Command:
    sdcc -mpic14 -p16f917 test.c


    test.asm:15:Error [113] Symbol not previously defined (_CONFIG1).
    test.asm:15:Error [118] Overwriting previous address contents.
    test.asm:16:Error [113] Symbol not previously defined (_CONFIG2).
    test.asm:16:Error [118] Overwriting previous address contents.
    Assertion failed: word & MEM_USED_MASK, file coff.c, line 165

    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.

    ASM File:

    ; File Created by SDCC : FreeWare ANSI-C Compiler
    ; Version 2.6.0 #4309 (Jul 28 2006)
    ; This file generated Tue Jan 09 16:26:55 2007
    ; PIC port for the 14-bit core
    ;    .module test
        list    p=16f917
        radix dec
        include ""
    ; config word
        __config _CONFIG1, 0x30d4
        __config _CONFIG2, 0x3ffc
    ; publics variables in this module
        global _main

    Any ideas why its using _CONFIG1 and _CONFIG2 instead of the one _CONFIG defined in the header/include file?


    • Raphael Neider

      Raphael Neider - 2007-03-09

      Jepp: bug in pic14devices.txt. Fixed in SDCC 2.6.4, r4673.



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks