Compile using wrong config word definition?

2007-01-09
2013-03-12
  • 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:

    //test.c

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

    typedef unsigned int config;
    config at 0x2007 ___CONFIG = _INTRC_OSC_NOCLKOUT & _WDT_OFF & _PWRTE_OFF & \   _MCLRE_OFF & _CP_OFF & _CPD_OFF & _BOD_OFF & _IESO_OFF & _FCMEN_OFF;

    void main(void)
    {
        ...
    }

    Compile Command:
    sdcc -mpic14 -p16f917 test.c

    Error:

    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 "p16f917.inc"
    ;--------------------------------------------------------
    ; 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?

    Thanks,
    K.

     
    • Raphael Neider

      Raphael Neider - 2007-03-09

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

      Regards,
      Raphael

       

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks