piclist 2008\07\04\103556a >
Thread: Code packing
www.piclist.com/techref/microchip/devices.htm?key=pic
face picon face BY : email (remove spam text)(Olin Lathrop)



Jinx wrote:
> 309 ee_init code_pack 0xf00000
> 310
> 311 de  .25                             ;baud rate
> 312 de  .36,.38,.48,.47,.51,.49,.46     ;sensors 0 - 6
> 313 de  .42,.62,.63,.127,.43,.71,.83    ;sensors 7 - 12

Again, I think you want DB not DE, but otherwise this looks fine.  Also,
while F00000h is correct for all 18F as far as I know, it is different for
other PICs.  I don't like hard coding the EEPROM start address into the
code, so I use the symbol EE_START which is defined seperately depending on
the processor being built for.  Of course CODE_PACK won't port to other than
a PIC 18, but I still think it's better to use a symbol.  A symbol like
EE_START is a better hint than F00000h unless the reader happened to
remember that EEPROM starts there on PIC 18.

> Error[149]   309 : Directive only allowed when generating an object
> file

Somehow you got into absolute mode.  CODE, CODE_PACK, UDATA, etc are not
supported in absolute mode.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.
<005101c8dde3$959fc650$0300a8c0@main> 7bit

See also: www.piclist.com/techref/microchip/devices.htm?key=pic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Code packing

month overview.

new search...