Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.electronics.design > #382541 > unrolled thread

OT: MPLAB build dies (linker prob)

Started byRobert Baer <robertbaer@localnet.com>
First post2015-10-23 20:54 -0700
Last post2015-10-27 03:07 -0400
Articles 18 — 7 participants

Back to article view | Back to sci.electronics.design


Contents

  OT: MPLAB build dies (linker prob) Robert Baer <robertbaer@localnet.com> - 2015-10-23 20:54 -0700
    Re: OT: MPLAB build dies (linker prob) "P E Schoen" <paul@pstech-inc.com> - 2015-10-24 01:25 -0400
      Re: OT: MPLAB build dies (linker prob) Robert Baer <robertbaer@localnet.com> - 2015-10-24 11:43 -0700
        Re: OT: MPLAB build dies (linker prob) Martin Riddle <martin_ridd@verizon.net> - 2015-10-24 15:19 -0400
      Re: OT: MPLAB build dies (linker prob) Robert Baer <robertbaer@localnet.com> - 2015-10-26 00:27 -0800
    Re: OT: MPLAB build dies (linker prob) "P E Schoen" <paul@pstech-inc.com> - 2015-10-24 01:50 -0400
      Re: OT: MPLAB build dies (linker prob) Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2015-10-24 11:07 +0300
      Re: OT: MPLAB build dies (linker prob) Robert Baer <robertbaer@localnet.com> - 2015-10-24 12:22 -0700
        Re: MPLAB build dies (linker prob) "P E Schoen" <paul@pstech-inc.com> - 2015-10-24 17:14 -0400
          Re: MPLAB build dies (linker prob) Robert Baer <robertbaer@localnet.com> - 2015-10-26 00:30 -0800
        Re: OT: MPLAB build dies (linker prob) M Philbrook <jamie_ka1lpa@charter.net> - 2015-10-24 21:35 -0400
          Re: OT: MPLAB build dies (linker prob) Robert Baer <robertbaer@localnet.com> - 2015-10-26 00:34 -0800
            Re: OT: MPLAB build dies (linker prob) Martin Brown <|||newspam|||@nezumi.demon.co.uk> - 2015-10-26 12:22 +0000
              Re: MPLAB build dies (linker prob) "P E Schoen" <paul@pstech-inc.com> - 2015-10-26 17:06 -0400
            Re: OT: MPLAB build dies (linker prob) M Philbrook <jamie_ka1lpa@charter.net> - 2015-10-26 20:31 -0500
              Re: MPLAB build dies (linker prob) "P E Schoen" <paul@pstech-inc.com> - 2015-10-26 21:15 -0400
                Re: MPLAB build dies (linker prob) M Philbrook <jamie_ka1lpa@charter.net> - 2015-10-26 21:35 -0500
    Re: OT: MPLAB build dies (linker prob) rickman <gnuarm@gmail.com> - 2015-10-27 03:07 -0400

#382541 — OT: MPLAB build dies (linker prob)

FromRobert Baer <robertbaer@localnet.com>
Date2015-10-23 20:54 -0700
SubjectOT: MPLAB build dies (linker prob)
Message-ID<yhDWx.79926$pF6.30543@fx06.iad>
   Here is part of the code:
         ORG     0x0B00
tab3:
         MOVLW   High(tab3_data)
         ADDWF   timhi,W
         MOVWF   PCLATH
         MOVLW   Low(tab3_data)
         ADDWF   timlo,W
         BTFSC   STATUS,C
         INCF    PCLATH,F
         MOVWF   PCL     ; computed GOTO into data
; ------------------
tab3_data:          ;; at 0x0B08
         FILL    0x34F6, 0x0F07 - $ + 1
; ----------------------------------------------
         ORG     0x1000  ; PAGE 0-4095 allowed by assembler/linker
tab4:
         MOVLW   High(tab4_data)
         ADDWF   timhi,W
         MOVWF   PCLATH
         MOVLW   Low(tab4_data)
         ADDWF   timlo,W
         BTFSC   STATUS,C
         INCF    PCLATH,F
         MOVWF   PCL     ; computed GOTO into data
; ------------------
tab4_data:          ;; at 0x1008
         FILL    0x34F5, 0x1407 - $ + 1
; ----------------------------------------------
         ORG     0x1500
tab5:
         MOVLW   High(tab5_data)
         ADDWF   timhi,W
         MOVWF   PCLATH
         MOVLW   Low(tab5_data)
         ADDWF   timlo,W
         BTFSC   STATUS,C
         INCF    PCLATH,F
         MOVWF   PCL     ; computed GOTO into data
; ------------------
tab5_data:          ;; at 0x1508
         FILL    0x34F5, 0x1907 - $ + 1
; ----------------------------------------------
; BALANCE DEFAULT 0x3FFF
        END
**
   The assembled code is OK, see NO errors.
   The only clue beyond the fact that the build barfs, is the *.map file:
MPLINK 4.39, Linker
Linker Error Map File - Created Fri Oct 23 20:25:02 2015

*Warning* - This is only a partial map file due to a link time error.
    Only sections which were allocated prior to the error are shown below.

CODEPAGES:
  Memory  Start   End     Section  Address  Size(Bytes)
-------  ------  ------  -------  -------  ---------
    page  0x0000  0x0fff  .org_0   0x0000     0x0000
                          .org_1   0x0000     0x0008
                          .org_2   0x0010     0x0056
                          .org_3   0x0100     0x0810
                          .org_4   0x0600     0x0810
                          .org_5   0x0b00     0x0812
** END COPY

   Therefore, there is a severe page range problem that needs fixing.
   How?
   (thanks in advance)

[toc] | [next] | [standalone]


#382545

From"P E Schoen" <paul@pstech-inc.com>
Date2015-10-24 01:25 -0400
Message-ID<n0f4k2$fdj$1@dont-email.me>
In reply to#382541
"Robert Baer"  wrote in message news:yhDWx.79926$pF6.30543@fx06.iad...

>   Here is part of the code:
         ORG     0x0B00
tab3:
         MOVLW   High(tab3_data)
         ADDWF   timhi,W
         MOVWF   PCLATH
         MOVLW   Low(tab3_data)
         ADDWF   timlo,W
         BTFSC   STATUS,C
         INCF    PCLATH,F
         MOVWF   PCL     ; computed GOTO into data
; ------------------
tab3_data:          ;; at 0x0B08
         FILL    0x34F6, 0x0F07 - $ + 1
; ----------------------------------------------
         ORG     0x1000  ; PAGE 0-4095 allowed by assembler/linker
tab4:
         MOVLW   High(tab4_data)
         ADDWF   timhi,W
         MOVWF   PCLATH
         MOVLW   Low(tab4_data)
         ADDWF   timlo,W
         BTFSC   STATUS,C
         INCF    PCLATH,F
         MOVWF   PCL     ; computed GOTO into data
; ------------------
tab4_data:          ;; at 0x1008
         FILL    0x34F5, 0x1407 - $ + 1
; ----------------------------------------------
         ORG     0x1500
tab5:
         MOVLW   High(tab5_data)
         ADDWF   timhi,W
         MOVWF   PCLATH
         MOVLW   Low(tab5_data)
         ADDWF   timlo,W
         BTFSC   STATUS,C
         INCF    PCLATH,F
         MOVWF   PCL     ; computed GOTO into data
; ------------------
tab5_data:          ;; at 0x1508
         FILL    0x34F5, 0x1907 - $ + 1
; ----------------------------------------------
; BALANCE DEFAULT 0x3FFF
        END
**
>   The assembled code is OK, see NO errors.
>   The only clue beyond the fact that the build barfs, is the *.map file:
> MPLINK 4.39, Linker
> Linker Error Map File - Created Fri Oct 23 20:25:02 2015

> *Warning* - This is only a partial map file due to a link time error.
>     Only sections which were allocated prior to the error are shown below.

CODEPAGES:
  Memory  Start   End     Section  Address  Size(Bytes)
-------  ------  ------  -------  -------  ---------
    page  0x0000  0x0fff  .org_0   0x0000     0x0000
                          .org_1   0x0000     0x0008
                          .org_2   0x0010     0x0056
                          .org_3   0x0100     0x0810
                          .org_4   0x0600     0x0810
                          .org_5   0x0b00     0x0812
** END COPY

>   Therefore, there is a severe page range problem that needs fixing.
>   How?
>   (thanks in advance)

I think you are misusing the FILL directive. Here is what the documentation 
says:

4.33 fill – SPECIFY PROGRAM MEMORY FILL VALUE
4.33.1 Syntax
[label] fill expr,count
4.33.2 Description
Generates count occurrences of the program word or byte (PIC18 devices), 
expr. If
bounded by parentheses, expr can be an assembler instruction.
4.33.3 Usage
This directive is used in the following types of code: absolute or 
relocatable. For
information on types of code, see Section 1.6 “Assembler Operation”.
This directive is often used to force known data into unused program memory. 
This
helps ensure that if code ever branches to an unused area at run time, a 
fail-safe
condition occurs. For example, it is not uncommon to see this used with the 
watchdog
timer (WDT) on a PIC16 device. Unused program memory would be filled with 
goto or
branch instructions to prevent execution of the clrwdt instruction in code, 
which
would cause the device to reset. See the device data sheet for more 
information on the
WDT.
4.33.4 See Also
data dw org
4.33.5 Simple Examples
Example 1: PIC10/12/16 MCU’s
fill 0x1009, 5 ; fill with a constant
fill (GOTO RESET_VECTOR), NEXT_BLOCK-$

See:
http://ww1.microchip.com/downloads/en/DeviceDoc/33014J.pdf

I only use assembler for really small programs, or for special cases where I 
need to absolutely control the code location and implementation. It's really 
much easier to use C, and there are some low-cost compilers you can use.

Paul 

[toc] | [prev] | [next] | [standalone]


#382580

FromRobert Baer <robertbaer@localnet.com>
Date2015-10-24 11:43 -0700
Message-ID<8jQWx.260176$nK6.12055@fx31.iad>
In reply to#382545
P E Schoen wrote:
> "Robert Baer" wrote in message news:yhDWx.79926$pF6.30543@fx06.iad...
>
>> Here is part of the code:
> ORG 0x0B00
> tab3:
> MOVLW High(tab3_data)
> ADDWF timhi,W
> MOVWF PCLATH
> MOVLW Low(tab3_data)
> ADDWF timlo,W
> BTFSC STATUS,C
> INCF PCLATH,F
> MOVWF PCL ; computed GOTO into data
> ; ------------------
> tab3_data: ;; at 0x0B08
> FILL 0x34F6, 0x0F07 - $ + 1
> ; ----------------------------------------------
> ORG 0x1000 ; PAGE 0-4095 allowed by assembler/linker
> tab4:
> MOVLW High(tab4_data)
> ADDWF timhi,W
> MOVWF PCLATH
> MOVLW Low(tab4_data)
> ADDWF timlo,W
> BTFSC STATUS,C
> INCF PCLATH,F
> MOVWF PCL ; computed GOTO into data
> ; ------------------
> tab4_data: ;; at 0x1008
> FILL 0x34F5, 0x1407 - $ + 1
> ; ----------------------------------------------
> ORG 0x1500
> tab5:
> MOVLW High(tab5_data)
> ADDWF timhi,W
> MOVWF PCLATH
> MOVLW Low(tab5_data)
> ADDWF timlo,W
> BTFSC STATUS,C
> INCF PCLATH,F
> MOVWF PCL ; computed GOTO into data
> ; ------------------
> tab5_data: ;; at 0x1508
> FILL 0x34F5, 0x1907 - $ + 1
> ; ----------------------------------------------
> ; BALANCE DEFAULT 0x3FFF
> END
> **
>> The assembled code is OK, see NO errors.
>> The only clue beyond the fact that the build barfs, is the *.map file:
>> MPLINK 4.39, Linker
>> Linker Error Map File - Created Fri Oct 23 20:25:02 2015
>
>> *Warning* - This is only a partial map file due to a link time error.
>> Only sections which were allocated prior to the error are shown below.
>
> CODEPAGES:
> Memory Start End Section Address Size(Bytes)
> ------- ------ ------ ------- ------- ---------
> page 0x0000 0x0fff .org_0 0x0000 0x0000
> .org_1 0x0000 0x0008
> .org_2 0x0010 0x0056
> .org_3 0x0100 0x0810
> .org_4 0x0600 0x0810
> .org_5 0x0b00 0x0812
> ** END COPY
>
>> Therefore, there is a severe page range problem that needs fixing.
>> How?
>> (thanks in advance)
>
> I think you are misusing the FILL directive. Here is what the
> documentation says:
>
> 4.33 fill – SPECIFY PROGRAM MEMORY FILL VALUE
> 4.33.1 Syntax
> [label] fill expr,count
> 4.33.2 Description
> Generates count occurrences of the program word or byte (PIC18 devices),
> expr. If
> bounded by parentheses, expr can be an assembler instruction.
> 4.33.3 Usage
> This directive is used in the following types of code: absolute or
> relocatable. For
> information on types of code, see Section 1.6 “Assembler Operation”.
> This directive is often used to force known data into unused program
> memory. This
> helps ensure that if code ever branches to an unused area at run time, a
> fail-safe
> condition occurs. For example, it is not uncommon to see this used with
> the watchdog
> timer (WDT) on a PIC16 device. Unused program memory would be filled
> with goto or
> branch instructions to prevent execution of the clrwdt instruction in
> code, which
> would cause the device to reset. See the device data sheet for more
> information on the
> WDT.
> 4.33.4 See Also
> data dw org
> 4.33.5 Simple Examples
> Example 1: PIC10/12/16 MCU’s
> fill 0x1009, 5 ; fill with a constant
> fill (GOTO RESET_VECTOR), NEXT_BLOCK-$
>
> See:
> http://ww1.microchip.com/downloads/en/DeviceDoc/33014J.pdf
>
> I only use assembler for really small programs, or for special cases
> where I need to absolutely control the code location and implementation.
> It's really much easier to use C, and there are some low-cost compilers
> you can use.
>
> Paul
   NOPE:
1) Note linker states "page 0x0000 0x0fff"
2) Note all other FILLs before ORG 0X1000 work properly with linker.
3) Delete all lines after the ORG 0x1000 and add only one code/data 
line, then END.
   SAME barf problem.

[toc] | [prev] | [next] | [standalone]


#382583

FromMartin Riddle <martin_ridd@verizon.net>
Date2015-10-24 15:19 -0400
Message-ID<7amn2b542lrepj1ng0qrs4lmc4jtemjqno@4ax.com>
In reply to#382580
On Sat, 24 Oct 2015 11:43:15 -0700, Robert Baer
<robertbaer@localnet.com> wrote:

>P E Schoen wrote:
>> "Robert Baer" wrote in message news:yhDWx.79926$pF6.30543@fx06.iad...
>>
>>> Here is part of the code:
>> ORG 0x0B00
>> tab3:
>> MOVLW High(tab3_data)
>> ADDWF timhi,W
>> MOVWF PCLATH
>> MOVLW Low(tab3_data)
>> ADDWF timlo,W
>> BTFSC STATUS,C
>> INCF PCLATH,F
>> MOVWF PCL ; computed GOTO into data
>> ; ------------------
>> tab3_data: ;; at 0x0B08
>> FILL 0x34F6, 0x0F07 - $ + 1
>> ; ----------------------------------------------
>> ORG 0x1000 ; PAGE 0-4095 allowed by assembler/linker
>> tab4:
>> MOVLW High(tab4_data)
>> ADDWF timhi,W
>> MOVWF PCLATH
>> MOVLW Low(tab4_data)
>> ADDWF timlo,W
>> BTFSC STATUS,C
>> INCF PCLATH,F
>> MOVWF PCL ; computed GOTO into data
>> ; ------------------
>> tab4_data: ;; at 0x1008
>> FILL 0x34F5, 0x1407 - $ + 1
>> ; ----------------------------------------------
>> ORG 0x1500
>> tab5:
>> MOVLW High(tab5_data)
>> ADDWF timhi,W
>> MOVWF PCLATH
>> MOVLW Low(tab5_data)
>> ADDWF timlo,W
>> BTFSC STATUS,C
>> INCF PCLATH,F
>> MOVWF PCL ; computed GOTO into data
>> ; ------------------
>> tab5_data: ;; at 0x1508
>> FILL 0x34F5, 0x1907 - $ + 1
>> ; ----------------------------------------------
>> ; BALANCE DEFAULT 0x3FFF
>> END
>> **
>>> The assembled code is OK, see NO errors.
>>> The only clue beyond the fact that the build barfs, is the *.map file:
>>> MPLINK 4.39, Linker
>>> Linker Error Map File - Created Fri Oct 23 20:25:02 2015
>>
>>> *Warning* - This is only a partial map file due to a link time error.
>>> Only sections which were allocated prior to the error are shown below.
>>
>> CODEPAGES:
>> Memory Start End Section Address Size(Bytes)
>> ------- ------ ------ ------- ------- ---------
>> page 0x0000 0x0fff .org_0 0x0000 0x0000
>> .org_1 0x0000 0x0008
>> .org_2 0x0010 0x0056
>> .org_3 0x0100 0x0810
>> .org_4 0x0600 0x0810
>> .org_5 0x0b00 0x0812
>> ** END COPY
>>
>>> Therefore, there is a severe page range problem that needs fixing.
>>> How?
>>> (thanks in advance)
>>
>> I think you are misusing the FILL directive. Here is what the
>> documentation says:
>>
>> 4.33 fill – SPECIFY PROGRAM MEMORY FILL VALUE
>> 4.33.1 Syntax
>> [label] fill expr,count
>> 4.33.2 Description
>> Generates count occurrences of the program word or byte (PIC18 devices),
>> expr. If
>> bounded by parentheses, expr can be an assembler instruction.
>> 4.33.3 Usage
>> This directive is used in the following types of code: absolute or
>> relocatable. For
>> information on types of code, see Section 1.6 “Assembler Operation”.
>> This directive is often used to force known data into unused program
>> memory. This
>> helps ensure that if code ever branches to an unused area at run time, a
>> fail-safe
>> condition occurs. For example, it is not uncommon to see this used with
>> the watchdog
>> timer (WDT) on a PIC16 device. Unused program memory would be filled
>> with goto or
>> branch instructions to prevent execution of the clrwdt instruction in
>> code, which
>> would cause the device to reset. See the device data sheet for more
>> information on the
>> WDT.
>> 4.33.4 See Also
>> data dw org
>> 4.33.5 Simple Examples
>> Example 1: PIC10/12/16 MCU’s
>> fill 0x1009, 5 ; fill with a constant
>> fill (GOTO RESET_VECTOR), NEXT_BLOCK-$
>>
>> See:
>> http://ww1.microchip.com/downloads/en/DeviceDoc/33014J.pdf
>>
>> I only use assembler for really small programs, or for special cases
>> where I need to absolutely control the code location and implementation.
>> It's really much easier to use C, and there are some low-cost compilers
>> you can use.
>>
>> Paul
>   NOPE:
>1) Note linker states "page 0x0000 0x0fff"
>2) Note all other FILLs before ORG 0X1000 work properly with linker.
>3) Delete all lines after the ORG 0x1000 and add only one code/data 
>line, then END.
>   SAME barf problem.

Did you include the correct linker file in MPLAB?  There are usually
two for each device, one debug and one release.
You normally set the ram pages not rom pages.

But you are declaring large tables that excede the rom size.

Cheers

[toc] | [prev] | [next] | [standalone]


#382718

FromRobert Baer <robertbaer@localnet.com>
Date2015-10-26 00:27 -0800
Message-ID<qBkXx.61$Uq6.6@fx29.iad>
In reply to#382545
P E Schoen wrote:
> "Robert Baer" wrote in message news:yhDWx.79926$pF6.30543@fx06.iad...
>
>> Here is part of the code:
> ORG 0x0B00
> tab3:
> MOVLW High(tab3_data)
> ADDWF timhi,W
> MOVWF PCLATH
> MOVLW Low(tab3_data)
> ADDWF timlo,W
> BTFSC STATUS,C
> INCF PCLATH,F
> MOVWF PCL ; computed GOTO into data
> ; ------------------
> tab3_data: ;; at 0x0B08
> FILL 0x34F6, 0x0F07 - $ + 1
> ; ----------------------------------------------
> ORG 0x1000 ; PAGE 0-4095 allowed by assembler/linker
> tab4:
> MOVLW High(tab4_data)
> ADDWF timhi,W
> MOVWF PCLATH
> MOVLW Low(tab4_data)
> ADDWF timlo,W
> BTFSC STATUS,C
> INCF PCLATH,F
> MOVWF PCL ; computed GOTO into data
> ; ------------------
> tab4_data: ;; at 0x1008
> FILL 0x34F5, 0x1407 - $ + 1
> ; ----------------------------------------------
> ORG 0x1500
> tab5:
> MOVLW High(tab5_data)
> ADDWF timhi,W
> MOVWF PCLATH
> MOVLW Low(tab5_data)
> ADDWF timlo,W
> BTFSC STATUS,C
> INCF PCLATH,F
> MOVWF PCL ; computed GOTO into data
> ; ------------------
> tab5_data: ;; at 0x1508
> FILL 0x34F5, 0x1907 - $ + 1
> ; ----------------------------------------------
> ; BALANCE DEFAULT 0x3FFF
> END
> **
>> The assembled code is OK, see NO errors.
>> The only clue beyond the fact that the build barfs, is the *.map file:
>> MPLINK 4.39, Linker
>> Linker Error Map File - Created Fri Oct 23 20:25:02 2015
>
>> *Warning* - This is only a partial map file due to a link time error.
>> Only sections which were allocated prior to the error are shown below.
>
> CODEPAGES:
> Memory Start End Section Address Size(Bytes)
> ------- ------ ------ ------- ------- ---------
> page 0x0000 0x0fff .org_0 0x0000 0x0000
> .org_1 0x0000 0x0008
> .org_2 0x0010 0x0056
> .org_3 0x0100 0x0810
> .org_4 0x0600 0x0810
> .org_5 0x0b00 0x0812
> ** END COPY
>
>> Therefore, there is a severe page range problem that needs fixing.
>> How?
>> (thanks in advance)
>
> I think you are misusing the FILL directive. Here is what the
> documentation says:
>
> 4.33 fill – SPECIFY PROGRAM MEMORY FILL VALUE
> 4.33.1 Syntax
> [label] fill expr,count
> 4.33.2 Description
> Generates count occurrences of the program word or byte (PIC18 devices),
> expr. If
> bounded by parentheses, expr can be an assembler instruction.
> 4.33.3 Usage
> This directive is used in the following types of code: absolute or
> relocatable. For
> information on types of code, see Section 1.6 “Assembler Operation”.
> This directive is often used to force known data into unused program
> memory. This
> helps ensure that if code ever branches to an unused area at run time, a
> fail-safe
> condition occurs. For example, it is not uncommon to see this used with
> the watchdog
> timer (WDT) on a PIC16 device. Unused program memory would be filled
> with goto or
> branch instructions to prevent execution of the clrwdt instruction in
> code, which
> would cause the device to reset. See the device data sheet for more
> information on the
> WDT.
> 4.33.4 See Also
> data dw org
> 4.33.5 Simple Examples
> Example 1: PIC10/12/16 MCU’s
> fill 0x1009, 5 ; fill with a constant
> fill (GOTO RESET_VECTOR), NEXT_BLOCK-$
>
> See:
> http://ww1.microchip.com/downloads/en/DeviceDoc/33014J.pdf
>
> I only use assembler for really small programs, or for special cases
> where I need to absolutely control the code location and implementation.
> It's really much easier to use C, and there are some low-cost compilers
> you can use.
>
> Paul
   Thanks for the doc reference.

   Has erroneous info.
   See page 82 (PDF P.90) 4.33.2 "If bounded by parentheses, expr can be 
an assembler instruction.".
   Does not work as one would like: FILL (RETLW 0xA5), 7 only emits the 
RETLW and noting more, treating the 0xA5 as a blank (count is OK).
   Try variants and get nowhere; gotta use the hex code for it all: 0x34A5.

[toc] | [prev] | [next] | [standalone]


#382548

From"P E Schoen" <paul@pstech-inc.com>
Date2015-10-24 01:50 -0400
Message-ID<n0f63h$j8h$1@dont-email.me>
In reply to#382541
"Robert Baer"  wrote in message news:yhDWx.79926$pF6.30543@fx06.iad...

>   Here is part of the code:

  tab5_data:          ;; at 0x1508
         FILL    0x34F5, 0x1907 - $ + 1
  ; ----------------------------------------------
  ; BALANCE DEFAULT 0x3FFF
          END

If you are still using the PIC16F648A you have only 4k or 4096 words (14 
bits) of flash memory, which ends at 0xfff. Your last tab5 data starts 
beyond the physical memory at 0x1508 and extends an additional 0x1907 to an 
end address of 2E0F. A memory with addresses to 3FFF would be 16k.

Again, please let us know what you are trying to do.

HTH

Paul 

[toc] | [prev] | [next] | [standalone]


#382553

FromTauno Voipio <tauno.voipio@notused.fi.invalid>
Date2015-10-24 11:07 +0300
Message-ID<n0fe4m$8bc$2@dont-email.me>
In reply to#382548
On 24.10.15 08:50, P E Schoen wrote:
> "Robert Baer"  wrote in message news:yhDWx.79926$pF6.30543@fx06.iad...
>
>>   Here is part of the code:
>
>   tab5_data:          ;; at 0x1508
>          FILL    0x34F5, 0x1907 - $ + 1
>   ; ----------------------------------------------
>   ; BALANCE DEFAULT 0x3FFF
>           END
>
> If you are still using the PIC16F648A you have only 4k or 4096 words (14
> bits) of flash memory, which ends at 0xfff. Your last tab5 data starts
> beyond the physical memory at 0x1508 and extends an additional 0x1907 to
> an end address of 2E0F. A memory with addresses to 3FFF would be 16k.
>
> Again, please let us know what you are trying to do.
>
> HTH
>
> Paul


It seems to me that he's attempting to push the fifth elephant into
a VW Beetle. He's been predestined to use a PIC which is far too small
for teh waveforms he's trying to generate.

-- 

-TV

[toc] | [prev] | [next] | [standalone]


#382584

FromRobert Baer <robertbaer@localnet.com>
Date2015-10-24 12:22 -0700
Message-ID<lUQWx.115281$756.50945@fx20.iad>
In reply to#382548
P E Schoen wrote:
> "Robert Baer" wrote in message news:yhDWx.79926$pF6.30543@fx06.iad...
>
>> Here is part of the code:
>
> tab5_data: ;; at 0x1508
> FILL 0x34F5, 0x1907 - $ + 1
> ; ----------------------------------------------
> ; BALANCE DEFAULT 0x3FFF
> END
>
> If you are still using the PIC16F648A you have only 4k or 4096 words (14
> bits) of flash memory, which ends at 0xfff. Your last tab5 data starts
> beyond the physical memory at 0x1508 and extends an additional 0x1907 to
> an end address of 2E0F. A memory with addresses to 3FFF would be 16k.
>
> Again, please let us know what you are trying to do.
>
> HTH
>
> Paul
   Would like to have 5 tables filled with 1K RETLW <data>.
   To linearly access using a pointer from 0 to 1023, one needs at least 
8 instructions for a call (or equivalent after a call to them).

   I guess, after subtracting out necessary code space from 4096 
locations, i might have 3840 locations or so.
   That would leave me 768 data points per table,which is better than a 
kick in the head.

   If i assume i can have 3900 locations for data, that gives me 780 
data points per data table; add 8 each for code in the tables would take 
3940 leaving 156 locations for other support code.

   Possible...

[toc] | [prev] | [next] | [standalone]


#382595 — Re: MPLAB build dies (linker prob)

From"P E Schoen" <paul@pstech-inc.com>
Date2015-10-24 17:14 -0400
SubjectRe: MPLAB build dies (linker prob)
Message-ID<n0gs84$cq7$1@dont-email.me>
In reply to#382584
"Robert Baer"  wrote in message news:lUQWx.115281$756.50945@fx20.iad...

>   Would like to have 5 tables filled with 1K RETLW <data>.
>   To linearly access using a pointer from 0 to 1023, one needs at least 8 
> instructions for a call (or equivalent after a call to them).

>   I guess, after subtracting out necessary code space from 4096 locations, 
> i might have 3840 locations or so.
>   That would leave me 768 data points per table,which is better than a 
> kick in the head.

>   If i assume i can have 3900 locations for data, that gives me 780 data 
> points per data table; add 8 each for code in the tables would take 3940 
> leaving 156 locations for other support code.

>   Possible...

Consider the fact that you have only 8 bits for waveform amplitude, so only 
256 possible values. For a sine table, the values for 85 degrees to 95 
degrees are 0.996 to 1.000, which vary only from 254 to 255. So, assuming 
that the table will be used for a repeating pattern, you would need at most 
256 data points. You could construct a two-element table with one value for 
degrees and the other for amplitude. This could be done with 3*256 = 768 
bytes, like this:

Table:
    movlw    0    ;0 degrees
    movwf    deg    ;degrees
    retlw    0    ;Sin (0)
    movlw    1    ;1 degrees
    movwf    deg    ;degrees
    retlw    4    ;Sin (1)
...
    movlw    85    ;85 degrees
    movwf    deg
    retlw    d'254'
    movlw    90    ;90 degrees
    movwf    deg
    retlw    d'255'

Notice that the lower part of the table shows a significant difference in 
value for the minimum angle of 1 degree. But at 85 degrees, the next 
significant change is at 90. Thus, for a sine table, where you really need 
only values from 0 to 90, you can implement the look-up in less than 
90*3=270 bytes. And you could probably do the full 360 degrees by converting 
the angle to an 8 bit value where 360 = 0xff and 0x01 is actually 360/255= 
1.41 degrees which happens to have a sine of 0.024 or an 8 bit 
representation of 0x06.

The problem with a table like this is that you must first search for the 
angle by successive approximation, and then choose an angle that is closest 
to what you seek. And you must increment the call location by 3 for each 
table entry.

If the waveform you are trying to approximate is fairly smooth, you might 
get by with an ordinary look-up table for every five degrees, and use linear 
interpolation between data points. For a sine table, suppose you want the 
value at 3 degrees. The sin(0) is 0x00 and sin(5) is 0.087 or d'22'. The 
interpolated value for sin(3) is (3/5)*(22-0) or 13, which corresponds to 
0.0510, while the actual sin(3) = 0.0523. The error is less than 1 bit for 
an 8 bit amplitude value.

HTH,

Paul

[toc] | [prev] | [next] | [standalone]


#382719 — Re: MPLAB build dies (linker prob)

FromRobert Baer <robertbaer@localnet.com>
Date2015-10-26 00:30 -0800
SubjectRe: MPLAB build dies (linker prob)
Message-ID<%EkXx.2095$0G6.183@fx17.iad>
In reply to#382595
P E Schoen wrote:
> "Robert Baer" wrote in message news:lUQWx.115281$756.50945@fx20.iad...
>
>> Would like to have 5 tables filled with 1K RETLW <data>.
>> To linearly access using a pointer from 0 to 1023, one needs at least
>> 8 instructions for a call (or equivalent after a call to them).
>
>> I guess, after subtracting out necessary code space from 4096
>> locations, i might have 3840 locations or so.
>> That would leave me 768 data points per table,which is better than a
>> kick in the head.
>
>> If i assume i can have 3900 locations for data, that gives me 780 data
>> points per data table; add 8 each for code in the tables would take
>> 3940 leaving 156 locations for other support code.
>
>> Possible...
>
> Consider the fact that you have only 8 bits for waveform amplitude, so
> only 256 possible values. For a sine table, the values for 85 degrees to
> 95 degrees are 0.996 to 1.000, which vary only from 254 to 255. So,
> assuming that the table will be used for a repeating pattern, you would
> need at most 256 data points. You could construct a two-element table
> with one value for degrees and the other for amplitude. This could be
> done with 3*256 = 768 bytes, like this:
>
> Table:
> movlw 0 ;0 degrees
> movwf deg ;degrees
> retlw 0 ;Sin (0)
> movlw 1 ;1 degrees
> movwf deg ;degrees
> retlw 4 ;Sin (1)
> ...
> movlw 85 ;85 degrees
> movwf deg
> retlw d'254'
> movlw 90 ;90 degrees
> movwf deg
> retlw d'255'
>
> Notice that the lower part of the table shows a significant difference
> in value for the minimum angle of 1 degree. But at 85 degrees, the next
> significant change is at 90. Thus, for a sine table, where you really
> need only values from 0 to 90, you can implement the look-up in less
> than 90*3=270 bytes. And you could probably do the full 360 degrees by
> converting the angle to an 8 bit value where 360 = 0xff and 0x01 is
> actually 360/255= 1.41 degrees which happens to have a sine of 0.024 or
> an 8 bit representation of 0x06.
>
> The problem with a table like this is that you must first search for the
> angle by successive approximation, and then choose an angle that is
> closest to what you seek. And you must increment the call location by 3
> for each table entry.
>
> If the waveform you are trying to approximate is fairly smooth, you
> might get by with an ordinary look-up table for every five degrees, and
> use linear interpolation between data points. For a sine table, suppose
> you want the value at 3 degrees. The sin(0) is 0x00 and sin(5) is 0.087
> or d'22'. The interpolated value for sin(3) is (3/5)*(22-0) or 13, which
> corresponds to 0.0510, while the actual sin(3) = 0.0523. The error is
> less than 1 bit for an 8 bit amplitude value.
>
> HTH,
>
> Paul
>
   Well, for sin/cos one needs only the first 22.5 degrees; all else in 
the circle can easily be derived from that.

   And we are going to use arbitrary waveforms; the sin/triangle/square 
were for test purposes.

[toc] | [prev] | [next] | [standalone]


#382607

FromM Philbrook <jamie_ka1lpa@charter.net>
Date2015-10-24 21:35 -0400
Message-ID<MPG.3095fbfede500089989d4b@news.eternal-september.org>
In reply to#382584
In article <lUQWx.115281$756.50945@fx20.iad>, robertbaer@localnet.com 
says...
>  tab5_data: ;; at 0x1508
> > FILL 0x34F5, 0x1907 - $ + 1
> > ; ----------------------------------------------
> > ; BALANCE DEFAULT 0x3FFF
> > END
> >
> > If you are still using the PIC16F648A you have only 4k or 4096 words (14
> > bits) of flash memory, which ends at 0xfff. Your last tab5 data starts
> > beyond the physical memory at 0x1508 and extends an additional 0x1907 to
> > an end address of 2E0F. A memory with addresses to 3FFF would be 16k.
> >
> > Again, please let us know what you are trying to do.
> >
> > HTH
> >
> > Paul
>    Would like to have 5 tables filled with 1K RETLW <data>.
>    To linearly access using a pointer from 0 to 1023, one needs at least 
> 8 instructions for a call (or equivalent after a call to them).
> 
>    I guess, after subtracting out necessary code space from 4096 
> locations, i might have 3840 locations or so.
>    That would leave me 768 data points per table,which is better than a 
> kick in the head.
> 
>    If i assume i can have 3900 locations for data, that gives me 780 
> data points per data table; add 8 each for code in the tables would take 
> 3940 leaving 156 locations for other support code.
> 
>    Possible...
> 
> 

 Do you need all 12bits in each word? 
if not, you could condense the table space by 
bit stuffing.
  You would need to calculate the index of course to
get the correct starting index word and bit group with in that
word, that would give you more space.

 Just a thought really...

Jamie

[toc] | [prev] | [next] | [standalone]


#382720

FromRobert Baer <robertbaer@localnet.com>
Date2015-10-26 00:34 -0800
Message-ID<2IkXx.2096$0G6.1807@fx17.iad>
In reply to#382607
M Philbrook wrote:
> In article<lUQWx.115281$756.50945@fx20.iad>, robertbaer@localnet.com
> says...
>>   tab5_data: ;; at 0x1508
>>> FILL 0x34F5, 0x1907 - $ + 1
>>> ; ----------------------------------------------
>>> ; BALANCE DEFAULT 0x3FFF
>>> END
>>>
>>> If you are still using the PIC16F648A you have only 4k or 4096 words (14
>>> bits) of flash memory, which ends at 0xfff. Your last tab5 data starts
>>> beyond the physical memory at 0x1508 and extends an additional 0x1907 to
>>> an end address of 2E0F. A memory with addresses to 3FFF would be 16k.
>>>
>>> Again, please let us know what you are trying to do.
>>>
>>> HTH
>>>
>>> Paul
>>     Would like to have 5 tables filled with 1K RETLW<data>.
>>     To linearly access using a pointer from 0 to 1023, one needs at least
>> 8 instructions for a call (or equivalent after a call to them).
>>
>>     I guess, after subtracting out necessary code space from 4096
>> locations, i might have 3840 locations or so.
>>     That would leave me 768 data points per table,which is better than a
>> kick in the head.
>>
>>     If i assume i can have 3900 locations for data, that gives me 780
>> data points per data table; add 8 each for code in the tables would take
>> 3940 leaving 156 locations for other support code.
>>
>>     Possible...
>>
>>
>
>   Do you need all 12bits in each word?
> if not, you could condense the table space by
> bit stuffing.
>    You would need to calculate the index of course to
> get the correct starting index word and bit group with in that
> word, that would give you more space.
>
>   Just a thought really...
>
> Jamie
>
   Yes, but..
   How would one go about reading one or two "random" locations?

[toc] | [prev] | [next] | [standalone]


#382728

FromMartin Brown <|||newspam|||@nezumi.demon.co.uk>
Date2015-10-26 12:22 +0000
Message-ID<n0l5u5$lsh$1@speranza.aioe.org>
In reply to#382720
On 26/10/2015 08:34, Robert Baer wrote:
> M Philbrook wrote:
>> In article<lUQWx.115281$756.50945@fx20.iad>, robertbaer@localnet.com
>> says...
>>>
>>>> If you are still using the PIC16F648A you have only 4k or 4096 words
>>>> (14
>>>> bits) of flash memory, which ends at 0xfff. Your last tab5 data starts
>>>> beyond the physical memory at 0x1508 and extends an additional
>>>> 0x1907 to
>>>> an end address of 2E0F. A memory with addresses to 3FFF would be 16k.
>>>>
>>>> Again, please let us know what you are trying to do.
>>>>
>>>> HTH
>>>>
>>>> Paul
>>>     Would like to have 5 tables filled with 1K RETLW<data>.
>>>     To linearly access using a pointer from 0 to 1023, one needs at
>>> least
>>> 8 instructions for a call (or equivalent after a call to them).

Seems like you are using the wrong choice of chip then since your lookup 
table is already larger than available program memory.

Choices are either 3x 1024 or a different PIC with more code space.

>>>     I guess, after subtracting out necessary code space from 4096
>>> locations, i might have 3840 locations or so.
>>>     That would leave me 768 data points per table,which is better than a
>>> kick in the head.
>>>
>>>     If i assume i can have 3900 locations for data, that gives me 780
>>> data points per data table; add 8 each for code in the tables would take
>>> 3940 leaving 156 locations for other support code.
>>>
>>>     Possible...

You need to have one routine to access the table(s) efficiently and 
possibly a routine to return the next sample very efficiently.

>>   Do you need all 12bits in each word?
>> if not, you could condense the table space by
>> bit stuffing.
>>    You would need to calculate the index of course to
>> get the correct starting index word and bit group with in that
>> word, that would give you more space.
>>
>>   Just a thought really...
>>
>> Jamie
>>
>    Yes, but..
>    How would one go about reading one or two "random" locations?

You shouldn't be reading random locations if you are doing an arbirary 
waveform generator - the next sample is deterministic.

-- 
Regards,
Martin Brown

[toc] | [prev] | [next] | [standalone]


#382821 — Re: MPLAB build dies (linker prob)

From"P E Schoen" <paul@pstech-inc.com>
Date2015-10-26 17:06 -0400
SubjectRe: MPLAB build dies (linker prob)
Message-ID<n0m4gj$6mc$1@dont-email.me>
In reply to#382728
"Martin Brown"  wrote in message news:n0l5u5$lsh$1@speranza.aioe.org...

> On 26/10/2015 08:34, Robert Baer wrote:
>>    Yes, but..
>>    How would one go about reading one or two "random" locations?

> You shouldn't be reading random locations if you are doing an arbirary 
> waveform generator - the next sample is deterministic.

That is very true. The processor that has been for some reason pre-chosen 
does not have the ability to read its own code space, so a table look-up is 
the only way to do it. The calling routine can increment the address to get 
sequential reads of 8 bit waveform data which presumably would wrap around 
at some number of samples to produce a recurrent pattern, or perhaps this is 
meant only to produce a burst of a certain period of time.

The calling routine gets the amplitude value in the W register, and then 
there must be some way to produce an analog signal from this value. The most 
common method for a PIC is PWM, and the 16F648A has a 10 bit PWM module, 
although only 8 bits are available. Depending on the frequency of the 
generated waveform (or time between transitions), there needs to be a 
carrier PWM frequency selected which might further limit the resolution to 
less than 8 bits. The PWM output will need to be filtered to remove most of 
the carrier frequency components but also allow faithful reproduction of the 
waveform transitions.

A better way to implement an arbitrary waveform generator may be by means of 
an EEPROM and a DAC, as well as a binary counter to select sequential 
addresses for the waveform. The processor can supply the clock signal to 
determine the frequency, and a reset line to adjust the phase.

Paul 

[toc] | [prev] | [next] | [standalone]


#382843

FromM Philbrook <jamie_ka1lpa@charter.net>
Date2015-10-26 20:31 -0500
Message-ID<MPG.30989e067ad5d84b989d57@news.eternal-september.org>
In reply to#382720
In article <2IkXx.2096$0G6.1807@fx17.iad>, robertbaer@localnet.com 
says...
> 
> M Philbrook wrote:
> > In article<lUQWx.115281$756.50945@fx20.iad>, robertbaer@localnet.com
> > says...
> >>   tab5_data: ;; at 0x1508
> >>> FILL 0x34F5, 0x1907 - $ + 1
> >>> ; ----------------------------------------------
> >>> ; BALANCE DEFAULT 0x3FFF
> >>> END
> >>>
> >>> If you are still using the PIC16F648A you have only 4k or 4096 words (14
> >>> bits) of flash memory, which ends at 0xfff. Your last tab5 data starts
> >>> beyond the physical memory at 0x1508 and extends an additional 0x1907 to
> >>> an end address of 2E0F. A memory with addresses to 3FFF would be 16k.
> >>>
> >>> Again, please let us know what you are trying to do.
> >>>
> >>> HTH
> >>>
> >>> Paul
> >>     Would like to have 5 tables filled with 1K RETLW<data>.
> >>     To linearly access using a pointer from 0 to 1023, one needs at least
> >> 8 instructions for a call (or equivalent after a call to them).
> >>
> >>     I guess, after subtracting out necessary code space from 4096
> >> locations, i might have 3840 locations or so.
> >>     That would leave me 768 data points per table,which is better than a
> >> kick in the head.
> >>
> >>     If i assume i can have 3900 locations for data, that gives me 780
> >> data points per data table; add 8 each for code in the tables would take
> >> 3940 leaving 156 locations for other support code.
> >>
> >>     Possible...
> >>
> >>
> >
> >   Do you need all 12bits in each word?
> > if not, you could condense the table space by
> > bit stuffing.
> >    You would need to calculate the index of course to
> > get the correct starting index word and bit group with in that
> > word, that would give you more space.
> >
> >   Just a thought really...
> >
> > Jamie
> >
>    Yes, but..
>    How would one go about reading one or two "random" locations?

 There's nothing random about it.

 Lets assume for the moment you have 1024 WORDS of 12 bits each.
with your aprouch you only get to use 1024 bytes, this is assuming
that you are using byte size values.

 THat leaves you with 4 bits per WORD not being used.

 you can achieve 50% more bytes if you were to make use of
the extra 4 bits per WORD.

 TotalBits = 1024 * 12 = 12288 bits.

 Because the PIC is a rather underpowered chip to do the 
math a larger one can do, you need to take a different step
in using those extra 4 bits per WORD and not take lots of 
clock time to do it.

 So, the first 1024 can be handled as a direct index however, 
anything over 1024 you would subtract the base "1024" take the 
remainder*2. This index puts you on a WORD where you extract the 
MSBits (4 of them) and step forward once to also get the upper MSBits
to form a Byte.
 
 You would need to preformat the data table of course to do this, which
could be done in a simple PC tool spread sheet etc..

Jamie

[toc] | [prev] | [next] | [standalone]


#382856 — Re: MPLAB build dies (linker prob)

From"P E Schoen" <paul@pstech-inc.com>
Date2015-10-26 21:15 -0400
SubjectRe: MPLAB build dies (linker prob)
Message-ID<n0mj3u$rr1$1@dont-email.me>
In reply to#382843
"M Philbrook"  wrote in message 
news:MPG.30989e067ad5d84b989d57@news.eternal-september.org...

> There's nothing random about it.

>  Lets assume for the moment you have 1024 WORDS of 12 bits each. with your 
> aprouch you only get to use 1024 bytes, this is assuming that you are 
> using byte size values.

> THat leaves you with 4 bits per WORD not being used.

> you can achieve 50% more bytes if you were to make use of the extra 4 bits 
> per WORD.

>  TotalBits = 1024 * 12 = 12288 bits.

> Because the PIC is a rather underpowered chip to do the math a larger one 
> can do, you need to take a different step in using those extra 4 bits per 
> WORD and not take lots of clock time to do it.

> So, the first 1024 can be handled as a direct index however, anything over 
> 1024 you would subtract the base "1024" take the remainder*2. This index 
> puts you on a WORD where you extract the MSBits (4 of them) and step 
> forward once to also get the upper MSBits to form a Byte.

> You would need to preformat the data table of course to do this, which 
> could be done in a simple PC tool spread sheet etc..

For one thing, the PIC16F648A has 4096 words of 14 bits, or 57344 bits. It 
would be possible to format the first word with 8 bits + 6 of the next, and 
the second word would have the 2 remaining bits, plus 8, plus 4 of the next. 
Thus the raw memory could hold 7168 8-bit bytes of data, and each of the 
four blocks of 1024 words could hold 1792 bytes. But the PIC has no internal 
mechanism to read any more than 8 bits of each word, and it can do so only 
by means of the RETLW operation.

The PIC16F1829, also 20 pins, has 8k words, and tables in ROM can also be 
read by using the FSR and INDF registers, but still only the lower 8 bits, 
so nothing is gained. However, this device has the capability of reading 
from and writing to flash memory, accessing all 14 bits. So you could 
transfer data one or more blocks at a time into RAM space, and use that for 
fast sequential access of waveform data. But Flash and EEPROM data access is 
a slow process, so it might mess up the continuity of waveform generation 
unless you have a means of direct memory access (DMA).

It may be advantageous to use SPI or I2C with a MicroSIM card where 
megabytes and even gigabytes of waveform data can be stored, and easily 
swapped out and programmed on a PC or other external device.

Paul 

[toc] | [prev] | [next] | [standalone]


#382858 — Re: MPLAB build dies (linker prob)

FromM Philbrook <jamie_ka1lpa@charter.net>
Date2015-10-26 21:35 -0500
SubjectRe: MPLAB build dies (linker prob)
Message-ID<MPG.3098acfe88ec8006989d5a@news.eternal-september.org>
In reply to#382856
In article <n0mj3u$rr1$1@dont-email.me>, paul@pstech-inc.com says...
> > So, the first 1024 can be handled as a direct index however, anything over 
> > 1024 you would subtract the base "1024" take the remainder*2. This index 
> > puts you on a WORD where you extract the MSBits (4 of them) and step 
> > forward once to also get the upper MSBits to form a Byte.
> 
> > You would need to preformat the data table of course to do this, which 
> > could be done in a simple PC tool spread sheet etc..
> 
> For one thing, the PIC16F648A has 4096 words of 14 bits, or 57344 bits. It 
> would be possible to format the first word with 8 bits + 6 of the next, and 
> the second word would have the 2 remaining bits, plus 8, plus 4 of the next. 
> Thus the raw memory could hold 7168 8-bit bytes of data, and each of the 
> four blocks of 1024 words could hold 1792 bytes. But the PIC has no internal 
> mechanism to read any more than 8 bits of each word, and it can do so only 
> by means of the RETLW operation.
> 
> The PIC16F1829, also 20 pins, has 8k words, and tables in ROM can also be 
> read by using the FSR and INDF registers, but still only the lower 8 bits, 
> so nothing is gained. However, this device has the capability of reading 
> from and writing to flash memory, accessing all 14 bits. So you could 
> transfer data one or more blocks at a time into RAM space, and use that for 
> fast sequential access of waveform data. But Flash and EEPROM data access is 
> a slow process, so it might mess up the continuity of waveform generation 
> unless you have a means of direct memory access (DMA).
> 
> It may be advantageous to use SPI or I2C with a MicroSIM card where 
> megabytes and even gigabytes of waveform data can be stored, and easily 
> swapped out and programmed on a PC or other external device.
> 
> Paul 
> 
> 
> 

I have not worked with an older PiC in years, I was only throwing some
number theories out there, since I've done such coding elsewhere..

  I know about the 8 bit thing but I thought there was a shift function
to move the upper bits down ?

  I anycase, the idea was to read the table from ROM not memory, but you 
claim that is a slow process? I seem to remember something like that 
once that needed a coefficient table and I don't remember having issues 
reading from ROM during program run.

Jamie

[toc] | [prev] | [next] | [standalone]


#382878

Fromrickman <gnuarm@gmail.com>
Date2015-10-27 03:07 -0400
Message-ID<n0n7mn$a4h$2@dont-email.me>
In reply to#382541
I'm curious why you post this here rather than in the comp.arch.embedded 
group.  I'd bet there are a lot more users there than here.


On 10/23/2015 11:54 PM, Robert Baer wrote:
>    Here is part of the code:
>          ORG     0x0B00
> tab3:
>          MOVLW   High(tab3_data)
>          ADDWF   timhi,W
>          MOVWF   PCLATH
>          MOVLW   Low(tab3_data)
>          ADDWF   timlo,W
>          BTFSC   STATUS,C
>          INCF    PCLATH,F
>          MOVWF   PCL     ; computed GOTO into data
> ; ------------------
> tab3_data:          ;; at 0x0B08
>          FILL    0x34F6, 0x0F07 - $ + 1
> ; ----------------------------------------------
>          ORG     0x1000  ; PAGE 0-4095 allowed by assembler/linker
> tab4:
>          MOVLW   High(tab4_data)
>          ADDWF   timhi,W
>          MOVWF   PCLATH
>          MOVLW   Low(tab4_data)
>          ADDWF   timlo,W
>          BTFSC   STATUS,C
>          INCF    PCLATH,F
>          MOVWF   PCL     ; computed GOTO into data
> ; ------------------
> tab4_data:          ;; at 0x1008
>          FILL    0x34F5, 0x1407 - $ + 1
> ; ----------------------------------------------
>          ORG     0x1500
> tab5:
>          MOVLW   High(tab5_data)
>          ADDWF   timhi,W
>          MOVWF   PCLATH
>          MOVLW   Low(tab5_data)
>          ADDWF   timlo,W
>          BTFSC   STATUS,C
>          INCF    PCLATH,F
>          MOVWF   PCL     ; computed GOTO into data
> ; ------------------
> tab5_data:          ;; at 0x1508
>          FILL    0x34F5, 0x1907 - $ + 1
> ; ----------------------------------------------
> ; BALANCE DEFAULT 0x3FFF
>         END
> **
>    The assembled code is OK, see NO errors.
>    The only clue beyond the fact that the build barfs, is the *.map file:
> MPLINK 4.39, Linker
> Linker Error Map File - Created Fri Oct 23 20:25:02 2015
>
> *Warning* - This is only a partial map file due to a link time error.
>     Only sections which were allocated prior to the error are shown below.
>
> CODEPAGES:
>   Memory  Start   End     Section  Address  Size(Bytes)
> -------  ------  ------  -------  -------  ---------
>     page  0x0000  0x0fff  .org_0   0x0000     0x0000
>                           .org_1   0x0000     0x0008
>                           .org_2   0x0010     0x0056
>                           .org_3   0x0100     0x0810
>                           .org_4   0x0600     0x0810
>                           .org_5   0x0b00     0x0812
> ** END COPY
>
>    Therefore, there is a severe page range problem that needs fixing.
>    How?
>    (thanks in advance)


-- 

Rick

[toc] | [prev] | [standalone]


Back to top | Article view | sci.electronics.design


csiph-web