On Wed, Aug 1, 2012 at 8:46 AM, Kustaa Nyholm <Kustaa.Nyholm@planmeca.com> wrote:

Hi Kusti,
a fried is using a piece of code I wrote and is getting a bunch of these
warnings which I'm not seeing:

main.asm:19:Warning[212] __CONFIG has been deprecated for PIC18 devices.
Use directive CONFIG.

This warning was introduced in one of recent gputils releases, so you are using an older version of gputils then your frend if you don't see the message.

 He is on Windows with SDCC 3.x.y and I'm on Mac stuc with 2.8.9 atm.

It is the same on all OS-es. It depends on gputils version.
Googling around it looks to me like this warning is from MPASM and not

It is also a warning from recent gpasm version.
Is hes toolchain messed up or does it work like that on Windows..should it
work..what is going on?

But more importantly  what is the right way to handle this?

Web search suggests that instead of:

code char at 0x300000 CONFIG1L = 0x20;

This is deprecated method for 16 bit pics (18fxxx).
we could use something like:


is that right? Is that syntax supported by SDCC / gputils?

Yes, this is right. It is supported also by SDCC 3.2.0:
#pragma config USBDIV=ON, CPUDIV=OFF, PLLDIV=0

In the SDCC 3.2.0 release this was still a little bit buggy. You should try it with the latest snapshot build If it doesn't work for you.
Did not find anything about this in the SDCC / gputils manuals...

For sdcc it is documented in the sdccman included in 3.2.0 release package and in recent snapshot build doc packages.
It is not documented in gputils :-(
If this is the Right Way (tm) then where are those bits define or can
one just use the names of those bits in the processor datasheet?

You should use the definitions from datasheet.
I could of course install SDCC latest (and I will, very soon now) and
even try it on Windows and experiment but don't want to have anything
more on my plate right now as atm this is not my problem so I'm
hoping someone on the list can throw some light on this?

I hope I did ;-)

br Kusti

P.S.: This is just a warning since using __CONFIG directive on 16 bit pic devices is deprecated by gputils and mpasm, but it still works. I recomend to use CONFIG directive in gputils and #pragma config approach in sdcc for newly dedveloped software.