gnupic@linuxhacker.org
gnupic@linuxhacker.org
On Sat, 2003-05-17 at 08:19, Vangelis Rokas wrote:
> 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:
I little clarification for those that are listening. The only missing
support is for COFF outputs. Absolute output works. I ran out of time
and never went back to finish it. IDLOCS for 18xx devices also isn't
supported for COFF.
>
> 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 did have a semi-functional hack that did just that. There were other
problems. The user could skip some of the settings leaving holes in the
data. The user can place the directives in a strange order. The user
could interleave other sections within the config directives. My hack
wasn't nearly bullet proof so I elected not to commit it.
The mpasm 18xx config syntax just isn't well suited for COFF files. I
don't have the data in front of me, but I seem to remember some
strangeness in mpasm. It is what we have to live with.
> 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?
That solution could be made to work. It probably won't be very elegant.
Maybe the data could be stored until the end of assembly. Then one
config section created. Just an idea. Let me know if you find
something that works. If you need this soon and don't have a solution,
I can work it. Just let me know.
>
> Vangelis Rokas
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: gnupic-unsubscribe@linuxhacker.org
> For additional commands, e-mail: gnupic-help@linuxhacker.org
>
gnupic@linuxhacker.org