Can I define the device and configuration word in the pbp source file?
I'm looking for a simple way to get the device and configuration
word defined in the PBPv2.42a .bas source file.
Something like this:
device pic16F877A, HS_osc, wdt_off, lvp_off, protect_off
that would propagate through PBPW, PM to create a hex file
that I can import into mpasm and program with a picstart+.
I prototype with a PIC16F877a, with a bootloader, but would like to be able
to target a different device/configuration word for the final
version.
I have tools cobbled together over the years.
I have a batch file that calls pbpw/PM with the device on the command
line. I have to edit the 16f877a.inc file for the configuration word.
For the bootloader, I even had to edit the configuration word out of the
hex file, 'cause the early bootloader wrapped the address space and
trashed the start of the program.
This works for one processor type and configuration, but is
getting cumbersome and error prone with multiple processor types.
From another thread I've tried variations of
@ DEVICE WDT_OFF
This fixes the wdt.
@ DEVICE Pic16f877a
creates an error message if you compile with the wrong processor in
the command line, but I want it to be THE processor definition so I don't
need a separate batch file for each combination.
How do I define the processor in the file?
Is there an easy way to define the device and configuration
word in the basic source file? I'm not afraid to hack on the PBP
files.
Only thing I can think to try is to create new defines? Maybe then modify
the default pbpproc.inc and PBPPROC.BAS with some ifdefs to sort out which include files
to use...assuming pbp will let me do that?
But there oughta be an easier way???
Thanks, mike
Bookmarks