Which is relevant?
Can someone give me a really working CONFIG setting for PIC18F97J60?
The -mpic14 style CONFIG definitions are not working on -mpic16, because the header files has differencies.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Somewhere in the (non-free) include/pic16 directory, there should be a file pic16devices.txt which lists (among other things) the addresses of the configuration words... Or was that for pic14?
If such a file exists, you can try fixing the addresses in there for the relevant (family) record.
If I can manage, I'll try and post more useful instructions.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is this header file generated or hand written? I believe most headers are generated from .INC files from microchip and in that case the problem should be fixed upstream.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the datasheet of PIC18F97J60 the config words located at:
but in the header files defined :
Which is relevant?
Can someone give me a really working CONFIG setting for PIC18F97J60?
The
-mpic14
style CONFIG definitions are not working on-mpic16
, because the header files has differencies.Hi,
Have you tried using the new (although a few years old) pragma style?
Example taken from section 4.6.17 on the SDCC manual. It will most surely need changes for your PIC:
That information is passed to GPUTILS, which knows about all those options (see https://sourceforge.net/p/gputils/code/HEAD/tree/trunk/gputils/header/p18f97j60.inc#l2281), so it should work even if the SDCC header is wrong (we should fix it by the way).
Cheers,
Diego
Thanks.
When I am using this "
#pragma config
" style configuration, the PICkit 2 programmer gives error at flashing the output HEX file.PICkit 2 Program Report
31-12-2017, 19:06:44
Device Type: PIC18F97J60
Program Memory Errors
Address Good Bad
01FFFE 00FFFF 00F000
Maybe the compiler places the config word to a bad memory address?
Last edit: Szőgyényi Gábor 2017-12-31
Somewhere in the (non-free) include/pic16 directory, there should be a file pic16devices.txt which lists (among other things) the addresses of the configuration words... Or was that for pic14?
If such a file exists, you can try fixing the addresses in there for the relevant (family) record.
If I can manage, I'll try and post more useful instructions.
Yes, the file exists and there is information for the PIC18F97J60.
But I don't know it is correct or not.
Is this header file generated or hand written? I believe most headers are generated from .INC files from microchip and in that case the problem should be fixed upstream.
I don't know is this file generated or not. I think we need to open an issue to check and fix all the devices in this pic16devices.txt file.