gnupic: how to compile using SDCC?
Subject:
RE: how to compile using SDCC?
From:
"Kevin L. Pauba" ####@####.####
Date:
26 Nov 2002 05:26:30 -0000
Message-Id: <1038287863.28570.7.camel@dad>
Oops,
My directions should have mentioned that the "-s" option to perl is
expected to being used for rudimentary command-line parsing. In fact,
the "shebang" (the first line in the perl script) explicitly includes
it.
The easiest way to execute the script would be:
$ cd <path_to_sdcc>
$ support/scripts/inc2h.pl -p=16f877 -I=/usr/share/gputils/header
This executed as expected on my system.
Give that a try and let me know if that doesn't work.
Sorry!
On Mon, 2002-11-25 at 18:50, ####@####.#### wrote:
> Hi, Kevin:
>
> I downloaded and installed the 'gputils'.
>
> Then I type the command
>
> perl ../support/scripts/inc2h.pl -p=16f877 -I=../../gputils
>
> But I got the following error message:
>
> "inc2h.pl: Error: Cannot open include file -I=/net/mengjin/gputils/header/p-p=16f877.inc (No such file or directory)"
>
>
> Then I tried the command
>
> perl ../support/scripts/inc2h.pl 16f877 -I=../../gputils
>
> and got a similar error message:
>
> "inc2h.pl: Error: Cannot open include file -I=/net/mengjin/gputils/header/p16f877.inc (No such file or directory)"
>
> I checked the directory, and found there is a file named 'p16f877.inc' under
> gputils/header subdirectory.
>
> What's wrong?
>
>
> Thanks!
>
> - Mengjin Su -
>
>
> -----Original Message-----
> From: Kevin L. Pauba ####@####.####
> Sent: Tuesday, October 22, 2002 6:17 PM
> To: ####@####.####
> Cc: ####@####.####
> Subject: Re: how to compile using SDCC?
>
>
> 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: ####@####.####
> >
>