gnupic@linuxhacker.org

gnupic@linuxhacker.org


Subject: Re: Setting CONFIG bits from SDCC?
From: Scott Dattalo
Date: Thu, 25 Sep 2003 06:52:27 -0700 (PDT)

On Thu, 25 Sep 2003, Rick Mann wrote:

> Is there a way to set the config bits from SDCC? In gpasm, I've used 
> something like:
> 
> 			__config		_XT_OSC & _WDT_OFF & _PWRTE_ON & _BODEN_OFF & _LVP_OFF & 
> _CPD_OFF & _WRT_ENABLE_ON & _DEBUG_OFF & _CP_OFF
> 
> But nothing jumped out at me as equivalent in C. Any ideas?


Hi Rick,

Did you look at the code in sdcc/src/regression/ ? Basically, all you have 
to do is this:


typedef unsigned int word;

word at 0x2007  CONFIG = _WDT_OFF & _PWRTE_ON;


Scott


gnupic@linuxhacker.org