Hi,
I'm a new user to sdcc and trying to compile some old PIC16 code. I'm
having problems with the configuration bits for the PIC, and couldn't
find any good information online. It seems the way to specify the config
bits has changed over the years within sdcc, and also between compilers.
For example, I've seen config bits set using different formats like:
- #pragma config WDT = OFF
- __code char __at __CONFIG3H c3h = 0x01;
- code char at __CONFIG3H c3h = 0x01;
- CONFIG WDT = OFF
- __CONFIG _CONFIG1H, _OSCS_OFF_1H & _RCIO_OSC_1H
- __CONFIG(1, HS & FCMDIS & IESODIS);
What is the latest and "proper" way to define the config bits in sdcc C
code in 2022?
This seems to work:
__code char __at __CONFIG2H c2h = 0x0F;
but when I add:
__code char __at __CONFIG2L c2l = 0x0A;
to the next line, then the linker complains with:
"section ".config_300002_OBJ/DUMPER-EEPROM.O" (0x300002) is absolute but
occurs in more than one file."
even though __CONFIG2L is not defined anywhere else. It's like the
linker thinks __CONFIG2H and __CONFIG2L are the same, and I was thinking
maybe because the error: "__CONFIG has been deprecated for PIC18
devices. Use directive CONFIG", and now sdcc wants me to combine both
somehow.
Any ideas or examples appreciated! Thank you!
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user