gnupic@linuxhacker.org

gnupic@linuxhacker.org


Subject: PIC18 __CONFIG directive
From: Vangelis Rokas
Date: Sat, 17 May 2003 16:19:10 +0300


    Since now gpasm does not suuport the __CONFIG directives for the PIC18
family.
I've tried to hack gpasm a bit, especially the gpasm/directive.c file in
order to see what is happening. Please correct me if I am wrong:

    a. The other PIC families use just one (1) configuration byte, so gpasm
emits a .config section  just 1 byte long, and places there the
configuration settings.
    b. If I try to bypass the exit() function in do_config() function, gpasm
emits several .config section which produces an error.

If the only problem is the multiple emition of .config sections, there could
be a flag variable to signify the first __CONFIG directive and produce only
one .config section.

I've tried that, but gpasm crashes when trying to close the coff file, in
coff_close_coff() in coff.c

Is there something other I should take care?

Vangelis Rokas



gnupic@linuxhacker.org