Thanks! That's useful info. I've never dug into the lkr scripts. Here's what Microchip put in there for config, and it seems like it's ok. CODEPAGE NAME=config START=0x300000 END=0x30000D PROTECTED Here's what I see during the attempted build: Linking: Command line: "C:\mcc18\bin\mplink.exe /o VXC-50.HEX /l C:\MCC18\LIB /k C:\MCC18\LKR VXC-50.O CONFIG.O U3.O U4.O U5.O U7.O U8.O U13.O PRNTBOOL.O U14U15.O EXTSPI.O C:\MCC18\LKR\18F452.LKR " MPLINK 2.90.05, Linker Copyright (c) 2001 Microchip Technology Inc. Error - Absolute code section '.config' must start at a word-aligned address. Errors : 1 If I compile for the 18c452, it seems to work ok, and the config line of the lkr script is pretty much the same. Any more ideas? Meanwhile, I continue to set config by hand before programming chips! Thanks! Harold On Sat, 25 May 2002 08:22:21 -0400 Olin Lathrop writes: > > I've copied the config bit setting stuff right out of > p18f452.inc > and > > put it in config.asm as below. During linking, I get the following > error: > > > > Error - Absolute code section '.config' must start at a > word-aligned > > address. > > The __CONFIG directive produces code in a special section named > .CONFIG. > The Microchip docs are very sketchy about all this, but the > assembler does > not set an absolute address for this section. This must be done in > the > linker control file. You have to look in the data sheet for > whatever PIC > you are using and find where the config word is, then set up a > .config > linker section fixed at that address. I haven't done a project yet > with an > 18 family PIC, so here is my linker control file for the 16F876 as > an > example: > > // Linker control file for the PIC 16F876 processor. > // > CODEPAGE NAME=config START=0x2007 END=0x2007 //special processor > config > word > > CODEPAGE NAME=code0 START=0 END=0x7FF //code page 0 > CODEPAGE NAME=code1 START=0x800 END=0xFFF //code page 1 > CODEPAGE NAME=code2 START=0x1000 END=0x17FF //code page 2 > CODEPAGE NAME=code3 START=0x1800 END=0x1FFF //code page 3 > > DATABANK NAME=bank0 START=0x20 END=0x6F //register bank 0 > DATABANK NAME=bank1 START=0xA0 END=0xEF //register bank 1 > DATABANK NAME=bank2 START=0x110 END=0x16F //register bank 2 > DATABANK NAME=bank3 START=0x190 END=0x1EF //register bank 3 > > SHAREBANK NAME=globalram START=0x70 END=0x7F PROTECTED //global > regs, bank > 0 > SHAREBANK NAME=globalram START=0xF0 END=0xFF PROTECTED //global > regs, bank > 1 > SHAREBANK NAME=globalram START=0x170 END=0x17F PROTECTED //global > regs, bank > 2 > SHAREBANK NAME=globalram START=0x1F0 END=0x1FF PROTECTED //global > regs, bank > 3 > > SECTION NAME=.udata_shr RAM=globalram //global memory mapped to all > register > banks > SECTION NAME=.BANK0 RAM=bank0 //for registers explicitly in bank 0 > SECTION NAME=.BANK1 RAM=bank1 //for registers explicitly in bank 1 > SECTION NAME=.BANK2 RAM=bank2 //for registers explicitly in bank 2 > SECTION NAME=.BANK3 RAM=bank3 //for registers explicitly in bank 3 > > > There are a lot of double-slash comment delimeters above. I'm using > MS > Outlook Express, and sometimes it decides on its own that a double > slash > could only be the start of a URL and "helfully" inserts the proper > URL > syntax. Does anyone know how to shut off this obnoxious behaviour? > > > ***************************************************************** > Embed Inc, embedded system specialists in Littleton Massachusetts > (978) 742-9014, http://www.embedinc.com > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > FCC Rules Online at http://hallikainen.com/FccRules Lighting control for theatre and television at http://www.dovesystems.com ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/web/. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics