gnupic: Re: [gnupic] errors in header p18f4550.inc with gputils 0.13.5-beta


Previous by date: 6 Nov 2007 23:49:30 +0000 Re: [gnupic] PIC32 C32 GCC Source Code Released, Peter Stuge
Next by date: 6 Nov 2007 23:49:30 +0000 Re: [gnupic] PIC32 C32 GCC Source Code Released, Xiaofan Chen
Previous in thread: 6 Nov 2007 23:49:30 +0000 Re: [gnupic] errors in header p18f4550.inc with gputils 0.13.5-beta, David
Next in thread:

Subject: Re: [gnupic] errors in header p18f4550.inc with gputils 0.13.5-beta
From: "Nestor A. Marchesini" ####@####.####
Date: 6 Nov 2007 23:49:30 +0000
Message-Id: <4730FECE.6010209@xinet.com.ar>

El 05/11/07 21:03, David escribió:
>>>> ..
>>>> and it should be:
>>>> _FCMEN_OFF_1H        EQU  H'BF  ; M -> N
>>>> _FCMEN_ON_1H         EQU  H'FF' ; M -> N
> I fixed the bad header file in SVN (r499), and I also updated the
> definitions that made the CONFIG directive fail (r500). More details
> below...

Thank you for fix it. :-)

>>> gputils now supports the CONFIG directive (as opposed to
>>> '__CONFIG'). It looks like these definitions in this and similar
>>> headers should be uncommented now...?
> I did some digging and answered my own question. I don't think they're
> used at all by gpasm either in absolute or relocatable mode, so they
> can stay commented.
>
>   
> As I remember it, MPASM warns you to use the new CONFIG directive
> instead of the old __CONFIG. I don't think gpasm gives that warning,
> but that's a separate issue from these errors. Can you confirm this is
> the warning you're talking about?

You are right, I made a lot of tests and I wrong to write email. ;-)
This is the output of mpasm with mplab 7.62:
 
Clean: Deleting intermediary and output files.Clean: Deleted file 
"C:\WINDOWS\Escritorio\prog1\salida.err".Clean: Deleted file "C:
\WINDOWS\Escritorio\prog1\salida.cod".Clean: Deleted file 
"C:\WINDOWS\Escritorio\prog1\salida.hex".Clean: Deleted file "C:
\WINDOWS\Escritorio\prog1\salida.lst".Clean: Deleted file 
"C:\WINDOWS\Escritorio\prog1\prog1.mcs".Clean: Done.Executing: "C:\Archivos
de programa\Microchip\MPASM Suite\MPAsmWin.exe" /q /p18F4550 
"salida.asm" /l"salida.lst" /e"salida.err"Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 20 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 21 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 22 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 23 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 24 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 25 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 26 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 27 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 28 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 29 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 30 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Warning[230] C:
\WINDOWS\ESCRITORIO\PROG1\SALIDA.ASM 31 : __CONFIG has been deprecated 
for PIC18 devices.  Use directive CONFIG.Loaded C:
\WINDOWS\Escritorio\prog1\salida.cod.BUILD SUCCEEDED: Tue Nov 06 
05:30:33 2007

>> Now if I use CONFIG I obtain mistakes in FCMEN = OFF and BORV = 3
>> ...
>> 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.
> That's correct. These parameters come from libgputils/gpcfg-table.c and
> need to be compiled in. I just updated this file fresh from the
> definitions used in MPASM 5.13 (the version that comes with MPLAB
> 7.62), so the options allowed should be identical now. I tested for
> FCMEN and BORV, so please give those a shot again and (@everyone)
> consider switching over to the CONFIG directive. Microchip is giving
> deprecation warnings for the __CONFIG directive with 18F chips, so we
> should start testing the new CONFIG support and phasing out the old
> __CONFIG for the 18F's.
>
> Thanks a lot for reporting the issue!
>
> David Barnett

I download from svn, compiled the package in tgz to arch and have 
successfully installed.

$ svn co 
https://gputils.svn.sourceforge.net/svnroot/gputils/trunk/gputils 
gputils-0.13.5-svn

I assebled my program and these are the results:

gpasm-0.13.4 beta               prog1.asm   11-6-2007  20:10:30          
PAGE  1
               00033   CONFIG                PLLDIV = 5, CPUDIV = 
OSC4_PLL6, USBDIV = 2
300000 0E3C    00034   CONFIG                FOSC = HSPLL_HS,  FCMEN = 
OFF, IESO = OFF
               00035   CONFIG                PWRT = OFF, BOR = ON, BORV 
= 3, VREGEN = ON
300002 1E3F    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

Here again assemble with the old directive __CONFIG

gpasm-0.13.4 beta               prog1.asm   11-6-2007  20:13:34          
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

In datasheet .pdf file DS39632D-page 286
TABLE 25.1 CONFIGURATION BITS AND DEVICE IDs

- = unimplemented. Shaded cells are unimplemented, read as '0'.

   File Name     Default Unprogrammed Value
CONFIG1H 300001h 00--0101 0x05
CONFIG1L 300000h --000000 0x00
CONFIG2H 300003h ---11111 0x1f
CONFIG2L 300002h --011111 0x1f
CONFIG3H 300005h 1----011 0x83
CONFIG3L 300004h -------- 0x00
CONFIG4H 300006h -------- 0x00
CONFIG4L 300006h 100--1-1 0x85
CONFIG5H 300009h 11------ 0xc0
CONFIG5L 300008h ----1111 0x0f
CONFIG6H 30000Bh 111----- 0xe0
CONFIG6L 30000Ah ----1111 0x0f
CONFIG7H 30000Dh -1------ 0x40
CONFIG7L 30000Ch ----1111 0x0f

It is more correct to see the outcome of the CONFIG of __CONFIG
I do not know very clearly the issue of the mask default 18f4550.
The picp assumes this mask on file picdevrc for 18f4550:

[18F4550:defx]
    cf 3f 1f 3f 83 00 00 85
    c0 0f e0 0f 40 0f 00 00
    00 00 00 0f 00 00 cf 3f
    1f 3f 87 00 00 e5 c0 0f

But for me it should be as follows:

[18F4550:defx]
    05 00 1f 1f 83 00 00 85
    c0 0f e0 0f 40 0f 00 00
    05 00 1f 1f 83 00 00 85
    c0 0f e0 0f 40 00 00 00

I have sent an email on this subject to Jeff (privately), but got no 
response yet.

Regardas
Néstor A. Marchesini
Chajari-Entre Rios-Argentina

Previous by date: 6 Nov 2007 23:49:30 +0000 Re: [gnupic] PIC32 C32 GCC Source Code Released, Peter Stuge
Next by date: 6 Nov 2007 23:49:30 +0000 Re: [gnupic] PIC32 C32 GCC Source Code Released, Xiaofan Chen
Previous in thread: 6 Nov 2007 23:49:30 +0000 Re: [gnupic] errors in header p18f4550.inc with gputils 0.13.5-beta, David
Next in thread:


Powered by ezmlm-browse 0.20.