Subject:
Re: [gnupic] errors in header p18f4550.inc with gputils 0.13.5-beta
From:
"Nestor A. Marchesini" ####@####.####
Date:
4 Nov 2007 07:55:25 +0000
Message-Id: <472D7C68.3030106@xinet.com.ar>
El 03/11/07 09:00, David escribió:
> On Sat, 03 Nov 2007 03:45:29 -0300
> "Nestor A. Marchesini" ####@####.#### wrote:
>
>> $ cat /usr/share/gputils/header/p18f4550.inc | grep _FCMEM_OFF_1H
>> _FCMEM_OFF_1H EQU H'BF' ; Fail-Safe Clock Monitor disabled
>> $ cat /usr/share/gputils/header/p18f4550.inc | grep _FCMEM_ON_1H
>> _FCMEM_ON_1H EQU H'FF' ; Fail-Safe Clock Monitor enabled
>>
>> and it should be:
>> _FCMEN_OFF_1H EQU H'BF ; M -> N
>> _FCMEN_ON_1H EQU H'FF' ; M -> N
>
> I also noticed from p18f4550.inc:
> ;==========================================================================
> ;
> ; IMPORTANT: For the PIC18 devices, the __CONFIG directive has been
> ; superseded by the CONFIG directive. The following settings
> ; are available for this device.
> followed by a big block of commented definitions.
>
> gputils now supports the CONFIG directive (as opposed to '__CONFIG').
> It looks like these definitions in this and similar headers should be
> uncommented now...?
>
> David Barnett
Hi David
I was using MPLAB 7.62 with (kqemu + qemu + winme) and it generates
warnings df that uses the new directive CONFIG,
but assemble without problems.
Notice that here, I use _FCMEN_OFF_1H and BORV_3_2L, and there are no
problems.
gpasm-0.13.5 beta prog1.asm 11-4-2007 04:17:11
PAGE 1
00020 __CONFIG _CONFIG1L, _PLLDIV_5_1L &
_CPUDIV_OSC4_PLL6_1L & _USBDIV_2_1L
300000 3EFC 00021 __CONFIG _CONFIG1H,
_FOSC_HSPLL_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H
00022 __CONFIG _CONFIG2L, _PWRT_OFF_2L &
_BOR_ON_2L & _BORV_3_2L & _VREGEN_ON_2L
300002 FEFF 00023 __CONFIG _CONFIG2H, _WDT_OFF_2H &
_WDTPS_32768_2H
300004 F9FF 00024 __CONFIG _CONFIG3H, _MCLRE_ON_3H &
_LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_ON_3H
300006 FFBB 00025 __CONFIG _CONFIG4L, _STVREN_ON_4L &
_LVP_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L
00026 __CONFIG _CONFIG5L, _CP0_OFF_5L &
_CP1_OFF_5L & _CP2_OFF_5L & _CP3_OFF_5L
300008 FFFF 00027 __CONFIG _CONFIG5H, _CPB_OFF_5H &
_CPD_OFF_5H
00028 __CONFIG _CONFIG6L, _WRT0_OFF_6L &
_WRT1_OFF_6L & _WRT2_OFF_6L & _WRT3_OFF_6L
30000A FFFF 00029 __CONFIG _CONFIG6H, _WRTB_OFF_6H &
_WRTC_OFF_6H & _WRTD_OFF_6H
00030 __CONFIG _CONFIG7L, _EBTR0_OFF_7L &
_EBTR1_OFF_7L & _EBTR2_OFF_7L & _EBTR3_OFF_7L
30000C FFFF 00031 __CONFIG _CONFIG7H, _EBTRB_OFF_7H
Now if I use CONFIG I obtain mistakes in FCMEN = OFF and BORV = 3
gpasm-0.13.5 beta prog1.asm 11-4-2007 04:29:20
PAGE 1
00033 CONFIG PLLDIV = 5, CPUDIV =
OSC4_PLL6, USBDIV = 2
300000 0E3C 00034 CONFIG FOSC = HSPLL_HS, IESO = OFF
;,FCMEN = OFF
00035 CONFIG PWRT = OFF, BOR = ON,
VREGEN = ON ;,BORV = 3
300002 1E2F 00036 CONFIG WDT = OFF, WDTPS = 32768
300004 81FF 00037 CONFIG MCLRE = ON, LPT1OSC = OFF,
PBADEN = OFF, CCP2MX = ON
300006 FF81 00038 CONFIG STVREN = ON, LVP = OFF,
XINST = OFF, DEBUG = OFF
00039 CONFIG CP0 = OFF, CP1 = OFF, CP2 =
OFF, CP3 = OFF
300008 C00F 00040 CONFIG CPB = OFF, CPD = OFF
00041 CONFIG WRT0 = OFF, WRT1 = OFF,
WRT2 = OFF, WRT3 = OFF
30000A E00F 00042 CONFIG WRTB = OFF, WRTC = OFF,
WRTD = OFF
00043 CONFIG EBTR0 = OFF, EBTR1 = OFF,
EBTR2 = OFF, EBTR3 = OFF
30000C 400F 00044 CONFIG EBTRB = OFF
00045
Error [176] : CONFIG Directive Error: (setting not found for selected
processor)
30000C 400F 00046 CONFIG FCMEN = OFF
Error [176] : CONFIG Directive Error: (specified value not valid for
directive)
00047 CONFIG BORV = 3
I have modified the file p18f4550.inc, but one sees that it is not there
where looks gpasm at the assemble.
[nestor@deselectronica prog1]$ cat
/usr/share/gputils/header/p18f4550.inc | grep _FCMEN_OFF_1H
_FCMEN_OFF_1H EQU H'BF' ; Fail-Safe Clock Monitor disabled
[nestor@deselectronica prog1]$ cat
/usr/share/gputils/header/p18f4550.inc | grep _FCMEN_ON_1H
_FCMEN_ON_1H EQU H'FF' ; Fail-Safe Clock Monitor enabled
[nestor@deselectronica prog1]$
Now changing the N by M into my program and leaving _FCMEN_OFF_1H and
_FCMEN_ON_1H in my head file
/usr/share/gputils/header/p18f4550.inc, FCMEN_OFF_iH mistake disappears
but that of BORV = 3 continues:
300000 0E3C 00046 CONFIG FCMEM = OFF
Error [176] : CONFIG Directive Error: (specified value not valid for
directive)
00047 CONFIG BORV = 3
Not which will be the mistake, but for the present time I will continue
using __CONFIG
in my opinion gpasm would do what MPLAB did ... a warning, but that
assemble.
Regards
Néstor A. Marchesini
Chajari-Entre Rios-Argentina