Re: [Sdcc-user] PIC18F97J60 configuration bits...

2011-04-19 Thread Sébastien Lorquet
"code", "data" and "at" are obsolete and shall be replaced by "__code" "__data" and "__at". in the past you could not have a variable named "data" because it was a reserved word. __CONFIG1L and other are addresses defined in the PIC headers. CONFIG seems to be a macro that expands to what I wrot

Re: [Sdcc-user] PIC18F97J60 configuration bits...

2011-04-19 Thread Olgierd Eysymontt
Yeah, but why sometimes we use "__code" and others simply "code" and "CONFIG" or "__CONFIG", general concept and syntax it's in fact the same, keywords or macros are the difference (at least it seems so to me). Regards Olgierd On 19-04-2011 7:47, Sébastien Lorquet wrote: This is nothing magi

Re: [Sdcc-user] PIC18F97J60 configuration bits...

2011-04-19 Thread Sébastien Lorquet
This is nothing magic but simply a variable definition, in the code address space (__code) at the correct address (__at adr) and initialized with a value! The name is not important, e.g. char foovalue; /*variable*/ char foovalue = 42; /* initialized*/ __code char foovalue = 42; /*address space

Re: [Sdcc-user] PIC18F97J60 configuration bits...

2011-04-19 Thread Olgierd Eysymontt
I'll give it a try tonight and let you know. It's a very different syntax, ¿ where did you got that info ?, I'm curious. Cheers, Olgierd On 18-04-2011 16:57, Rob Connolly wrote: > __code __at __CONFIG1L _C1L = 0x20; > __code __at __CONFIG1H _C1H = 0x04; > __code __at __CONFIG2L _C2L = 0x04& 0

Re: [Sdcc-user] PIC18F97J60 configuration bits...

2011-04-18 Thread Rob Connolly
ent: 19 April 2011 09:20 To: sdcc-user@lists.sourceforge.net Subject: Re: [Sdcc-user] PIC18F97J60 configuration bits... Fabien, It seems that the 18f4550 has the CONFIG_1L, CONFIG_1H .. etc. address macros defined, but in the pic18fxxJxx series, they are not defined in the processor include fi

Re: [Sdcc-user] PIC18F97J60 configuration bits...

2011-04-18 Thread Olgierd Eysymontt
Fabien, It seems that the 18f4550 has the CONFIG_1L, CONFIG_1H .. etc. address macros defined, but in the pic18fxxJxx series, they are not defined in the processor include file. These can be added by hand, not a problem, but I've tried a manual approach using the datasheet address without r

Re: [Sdcc-user] PIC18F97J60 configuration bits...

2011-04-18 Thread lementec fabien
Hi, Here is how I do the job for a pic18f4550 using the device specs to know the hex values of the config bits: #ifndef CONFIG_H_INCLUDED # define CONFIG_H_INCLUDED # define CONFIG(k, n) code static char at __ ## k _ ## k = n /* bits value meaning 5 0 clock comes from the primary osc block, no

Re: [Sdcc-user] PIC18F97J60 configuration bits...

2011-04-18 Thread Olgierd Eysymontt
Hi, I've also been unable to find where these constants are defined, but I think this issue is related to gputils, it seems they are only defined for previous pic18 devices, I've use to program a 18F8722 that way and worked, the macros where defined in the .h file of the processor, but now, usi

Re: [Sdcc-user] PIC18F97J60 configuration bits...

2011-04-17 Thread lementec fabien
Hi, Here is how I do the job for a pic18f4550 using the device specs to know the hex values of the config bits: #ifndef CONFIG_H_INCLUDED # define CONFIG_H_INCLUDED # define CONFIG(k, n) code static char at __ ## k _ ## k = n /* bits value meaning 5 0 clock comes from the primary osc block, no

[Sdcc-user] PIC18F97J60 configuration bits...

2011-04-17 Thread Rob Connolly
Hi Everyone, I'm trying to get a simple program running on one of our firms development boards using SDCC, however I'm having problems setting the configuration bits. The board uses a PIC18F97J60 chip. There seems to be some differing ways of setting these bits throughout other posts around th