gnupic: Specifying processor header file in Makefile/commandline with gpasm in --mpasm-compatible mode


Previous by date: 20 Dec 2014 15:25:10 -0000 Specifying processor header file in Makefile/commandline with gpasm in --mpasm-compatible mode, Kustaa Nyholm
Next by date: 20 Dec 2014 15:25:10 -0000 Re:Specifying processor header file in Makefile/commandline with gpasm in --mpasm-compatible mode, Joe Pfeiffer
Previous in thread: 20 Dec 2014 15:25:10 -0000 Specifying processor header file in Makefile/commandline with gpasm in --mpasm-compatible mode, Kustaa Nyholm
Next in thread: 20 Dec 2014 15:25:10 -0000 Re: Specifying processor header file in Makefile/commandline with gpasm in --mpasm-compatible mode, Kustaa Nyholm

Subject: Re: Specifying processor header file in Makefile/commandline with gpasm in --mpasm-compatible mode
From: Vikas N Kumar ####@####.####
Date: 20 Dec 2014 15:25:10 -0000
Message-Id: <549594D2.6030709@vikaskumar.org>

On 12/20/2014 01:52 AM, Kustaa Nyholm wrote:
> In working with this code:
>
> http://www.diolan.com/pic/bootloader_dwn.html
>
> all the .asm files include the processor specific header with:
>
>     #include "P18F4455.INC"
>
> now I would to specify the header in my Makefile so that
> I don't need to edit all those files when I use a different
> processor.

you create a new header file called something like "processor.inc" which
has the text "#include <P18f455.inc>" automatically using a makefile
target. Generate this file every time using the forced make target
concept of your Make program. Include the "processor.inc" in all your
assembly files instead.

So when you change a processor, your makefile will generate a new
processor.inc and will re-compile all the code.
I can of course specify the header as a symbol defined
> on the command line that invokes the assembler but
> since I already (need to) specify the processor on
> the command line this seems redundant and thus wrong.
>

If you're using a Makefile you do not need to specify it twice. The
makefile can track all variables and you can just pass the variable
again as a define option for the gpasm commandline.


Previous by date: 20 Dec 2014 15:25:10 -0000 Specifying processor header file in Makefile/commandline with gpasm in --mpasm-compatible mode, Kustaa Nyholm
Next by date: 20 Dec 2014 15:25:10 -0000 Re:Specifying processor header file in Makefile/commandline with gpasm in --mpasm-compatible mode, Joe Pfeiffer
Previous in thread: 20 Dec 2014 15:25:10 -0000 Specifying processor header file in Makefile/commandline with gpasm in --mpasm-compatible mode, Kustaa Nyholm
Next in thread: 20 Dec 2014 15:25:10 -0000 Re: Specifying processor header file in Makefile/commandline with gpasm in --mpasm-compatible mode, Kustaa Nyholm


Powered by ezmlm-browse 0.20.