#1298 pic16f684 config word failure

Will Irace

my e-mail: spblat+sdcc [{a.t.}] gmail.com

Newbie here. Had some initial success with a different chip, but can't program a pic16f684.
I have the simplest of test programs (attached), and it won't assemble. I suspect a problem
with the libraries, but I can't track it down.

$ sdcc -mpic14 -p16f684 pic16f684_helloworld.c
pic16f684_helloworld.asm:15:Error [113] Symbol not previously defined (_CONFIG1).
pic16f684_helloworld.asm:16:Error [113] Symbol not previously defined (_CONFIG2).
pic16f684_helloworld.asm:16:Error [118] Overwriting previous address contents.
assertion "word & MEM_USED_MASK" failed: file "coff.c", line 165

...that is to say, it won't assemble if I include the configuration word. If I omit the word, it
compiles fine, but I don't get the functionality I need...two outputs not working, and it's
resetting often, probably due to brownout.

My code is attached. I've reproduced this in cygwin and on a "real" linux box, using both the
CVS version and the latest snapshot tarball.

SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.6.3 #4543 (Feb 16 2007) (CYGWIN)


  • Will Irace

    Will Irace - 2007-02-23

    code producing error

  • Raphael Neider

    Raphael Neider - 2007-02-23
    • milestone: --> fixed
    • status: open --> closed-fixed
  • Raphael Neider

    Raphael Neider - 2007-02-23

    Logged In: YES
    Originator: NO

    This is a bug in the include/pic/pic14devices.txt: The entry for the 16f684 incorrectly states that the device has two config words---but it has only one. Fix this yourself by editing that file, changing

    processor 16f684
    confsiz 2 <--- change here


    processor 16f684
    confsiz 1 <--- new value

    This fix is also committed in SDCC r4641 in the Subversion (not CVS!) repository. If you want to update, you will have to access the svn repository, as the compile farm has stopped producing nightly builds...


  • Will Irace

    Will Irace - 2007-02-23

    Logged In: YES
    Originator: YES

    Thank you!


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

No, thanks