gnupic: how to compile using SDCC?


Previous by date: 23 Oct 2002 01:21:06 -0000 Re: OT - Rick Mann, Rick Mann
Next by date: 23 Oct 2002 01:21:06 -0000 Re: OT - Rick Mann, Rogier Wolff
Previous in thread: 23 Oct 2002 01:21:06 -0000 how to compile using SDCC?, mengjin_su.agilent.com
Next in thread: 23 Oct 2002 01:21:06 -0000 Re: how to compile using SDCC?, Kevin L. Pauba

Subject: Re: how to compile using SDCC?
From: "Kevin L. Pauba" ####@####.####
Date: 23 Oct 2002 01:21:06 -0000
Message-Id: <1035335827.21088.19.camel@dad>

A perl script named inc2h.pl is available in the SDCC distribution that converts the
Microchip include files (assembly) into SDCC header files (C includes).  You could do it
all by hand but the script makes it a lot easier.

The script can be found at <sdcc-source-directory>/support/scripts/inc2h.pl.

Running it as follows ...

$ cd <sdcc-source-directory>
$ perl support/scripts/inc2h.pl --help

... will provide the following information:


inc2h.pl - A utility to convert MPASM include files to header files
           suitable for the SDCC compiler.

License: Copyright (c) 2002 Kevin L. Pauba

	 SDCC is licensed under the GNU Public license (GPL) v2; see
	 http://www.gnu.org/copyleft/gpl.html See http://sdcc.sourceforge.net/
	 for the latest information on sdcc.

Usage:   inc2h.pl options

	 where options include:

         --processor=processor
	 -p=processor
	     The name of the processor (16f84, 16f877, etc.)

         --basepath=path
	 -I=path
	     The path to the "header" directory.  The default is
             "/usr/share/gpasm/header".

	 The header file will be written to the standard output.


So, to generate a header file name p16f877.h from the p16f877.inc file located
in, say, /usr/share/gputils/header/, you would issue the following command:

$ perl support/scripts/inc2h.pl -p=16f877 -I=/usr/share/gputils/header > p16f877.h

The only caveat (that I know of) is that the script is unable to infer the memory map 
of the processor from the "inc" file.  It must be told of the memory map using a table
in the perl source.  Currently, the memory maps are defined for the following devices:

16f84, 16f84a, 16f627, 16f628, 16f876, 16f877, 16f873, 16f874

If this isn't in the list of processors you are looking for, let me know and I'll try to
update the script.

Hope this helps!




On Tue, 2002-10-22 at 11:11, ####@####.#### wrote:
> I downloaded the new update of SDCC to my Linux machine,
> and try to use following command for the test:
> 
> 	$sdcc -mpic14 main.c
> 
> But I got following message back:
> 
> Temporary ERROR: at the moment you have to use
> an include file create by inc2h.pl. See SDCC source:
> support/scripts/inc2h.pl
> this is a nuisance bug that will be fixed shortly
> 
> 
> Anybody can help me?
> 
> 
> - Mengjin -
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
> 



Previous by date: 23 Oct 2002 01:21:06 -0000 Re: OT - Rick Mann, Rick Mann
Next by date: 23 Oct 2002 01:21:06 -0000 Re: OT - Rick Mann, Rogier Wolff
Previous in thread: 23 Oct 2002 01:21:06 -0000 how to compile using SDCC?, mengjin_su.agilent.com
Next in thread: 23 Oct 2002 01:21:06 -0000 Re: how to compile using SDCC?, Kevin L. Pauba


Powered by ezmlm-browse 0.20.