gnupic: Re: [gnupic] pic18f24j10
Subject:
Re: [gnupic] pic18f24j10
From:
"Xiaofan Chen" ####@####.####
Date:
2 Jul 2007 00:30:38 +0100
Message-Id: <a276da400707011630s58696e86k5912871c1d0f04b@mail.gmail.com>
On 7/1/07, Michael Ballbach ####@####.#### wrote:
> On Sun, Jul 01, 2007 at 01:11:43PM -0400, George M. Gallant Jr. wrote:
> > Further test reveals a huge .o file. Attached are a test case file
> > exhibiting the problem.
>
> This is due to code in coff.c which tries to pad out the config section
> with defaults. Your device's config address space is not between
> 0x300000 and 0x30000d, which is what this code expects. Your config
> bytes appear to be after 0x3ff8. The result is that the code tries to
> pack all the bytes between 0x3ff8 to 0x30000d with 0xff's.
>
> I suggest this patch which will use the configuration database when
> available to calculate the last valid configuration address. Please let
> us know how it works for you:
>
I have not tried your patch yet but I noticed an interesting thing. If the
code is using absolute mode, gputils does not produce big hex file.
XFCHEN@APSGSGPXFCHEN ~/mcu
$ cat main.asm
LIST P=18F24J10 ;directive to define processor
#include <p18f24j10.inc>
CONFIG WDTEN = OFF ;To use ICD2 as a debugger disable WDT
CONFIG STVREN = ON ;Reset on stack
overflow/underflow enabled
CONFIG XINST = OFF ;Legacy mode
CONFIG CP0 = OFF ;Program memory is not code-protected
CONFIG FOSC = HSPLL ;HS oscillator. PLL enabled
CONFIG FOSC2 = ON ;
CONFIG FCMEN = OFF ;Fail-Safe Clock Monitor disabled
CONFIG IESO = OFF ;Two-Speed Start-up disabled
CONFIG WDTPS = 32768 ;1:32768
ORG 0x0000
Main: nop
bra Main
end
XFCHEN@APSGSGPXFCHEN ~/mcu
$ gpasm -i main.asm
XFCHEN@APSGSGPXFCHEN ~/mcu
$ cat main.hex
:020000040000FA
:040000000000FED727
:063FF800A0F405FFFFF13B
:00000001FF
Regards,
Xiaofan