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



> > What happens is that the data is actually stored as 25,0,36,38, ....
>
> Right.  You need to use DB and make sure it is in a CODE_PACK section,
> not CODE section

Think you'll have to help me out a little with this

MPLAB says

[label] code_pack [ROM_address]

This directive declares the beginning of a section of program
code or ROM data where a padding byte of zero is not appended
to an odd number of bytes. If label is not specified, the section
is named .code. The starting address is initialized to ROM_address
or will be assigned at link time if no address is specified. If
ROM_address is specified, it must be word-aligned. If padded data
is desired, use db

So, I tried (using the 18F4550 EEPROM absolute address, although
any address I use generates the same errors)

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

and get

Error[149]   309 : Directive only allowed when generating an object file
Warning[220] 311 : Address exceeds maximum range for this processor.
Error[118]   311 : Overwriting previous address contents (0006)
......
Warning[220] 318 : Address exceeds maximum range for this processor.
Warning[220] 318 : Address exceeds maximum range for this processor.
Warning[220] 318 : Address exceeds maximum range for this processor.
Halting build on first failure as requested.
BUILD FAILED: Sat Jul 05 00:41:21 2008

Could the reason be that I'm using absolute rather than relocatable ?

<00ff01c8ddd4$f7399350$89aafea9@ivp1> 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...