fatal: out of memory (pbpw.exe)


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Aug 2005
    Posts
    95

    Default fatal: out of memory (pbpw.exe)

    I get this error when I compile this. fatal: out of memory (pbpw.exe)
    My system has a 4 gig of memory.

    Code:
    high PORTB.2 'CHIP SELECT
    shiftout PORTB.1,PORTB.0,0,[%00000001,10,%11111111,%10000001,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000,_
                                          11,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000,_
                                          12,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000,_
                                          13,%11111111,%00000000,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000,_
                                          14,%11111111,%00000000,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000,_
                                          15,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000,_
                                          16,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000,_
                                          17,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000,%00000001]
    LOW  PORTB.2 'CHIP SELECT

    Any ideas. Sphere.
    Last edited by Sphere; - 21st August 2011 at 12:00.

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: fatal: out of memory (pbpw.exe)

    Hi,
    Splitting that major SHIFTOUT statement into multiple made it work here.
    Code:
    High PORTB.2 'CHIP SELECT
      Shiftout PORTB.1,PORTB.0,0,[%00000001,10,%11111111,%10000001,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000]
     
      Shiftout PortB.1,PortB.0,0,[11,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000]
     
      Shiftout PortB.1,PortB.0,0,[12,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000]
     
      Shiftout PortB.1,PortB.0,0,[13,%11111111,%00000000,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000]
     
      Shiftout PortB.1,PortB.0,0,[14,%11111111,%00000000,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000]
     
      Shiftout PortB.1,PortB.0,0,[15,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000]
     
      Shiftout PortB.1,PortB.0,0,[16,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000]
     
      Shiftout PortB.1,PortB.0,0,[17,%11111111,%00111100,%11111111,%11111111,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000,%00000000, %00000000,%00000001]
    LOW  PORTB.2 'CHIP SELECT
    Since there seems to be a lot of repeating zeros in each "packet" you might be able to replace that with a subroutine, something like:
    Code:
    i VAR BYTE
    ZeroCount VAR BYTE
     
    High PORTB.2 'CHIP SELECT
     
    Shiftout PORTB.1,PORTB.0,0,[%00000001,10,%11111111,%10000001,%11111111,%11111111]
    ZeroCount = 46 : GOSUB ShiftThoseZerosOut
     
    Shiftout PortB.1,PortB.0,0,[11,%11111111,%00111100,%11111111,%11111111]
    ZeroCount = 46 : GOSUB ShiftThoseZerosOut
     
    Shiftout PortB.1,PortB.0,0,[12,%11111111,%00111100,%11111111,%11111111]
    ZeroCount = 46 : GOSUB ShiftThoseZerosOut
     
    Shiftout PortB.1,PortB.0,0,[13,%11111111,%00000000,%11111111,%11111111]
    ZeroCount = 46 : GOSUB ShiftThoseZerosOut
     
    Shiftout PortB.1,PortB.0,0,[14,%11111111,%00000000,%11111111,%11111111]
    ZeroCount = 46 : GOSUB ShiftThoseZerosOut
     
    Shiftout PortB.1,PortB.0,0,[15,%11111111,%00111100,%11111111,%11111111]
    ZeroCount = 46 : GOSUB ShiftThoseZerosOut
     
    Shiftout PortB.1,PortB.0,0,[16,%11111111,%00111100,%11111111,%11111111]
    ZeroCount = 46 : GOSUB ShiftThoseZerosOut
     
    Shiftout PortB.1,PortB.0,0,[17,%11111111,%00111100,%11111111,%11111111]
    ZeroCount = 45 : GOSUB ShiftThoseZerosOut
     
    Shiftout PortB.1,PortB.0,0,[%00000001]
     
    LOW  PORTB.2 'CHIP SELECT
     
     
     
    ShiftThoseZerosOut:
     
    For i = 1 to ZeroCount
      shiftout PORTB.1,PORTB.0,0,[0]
    NEXT
    RETURN
    I may not have the number of zeros correct but you get the idea, the size of the code shrunk to 1/4 in size.

    /Henrik.

    EDIT: I'm getting sick of this editor. Everything looks fine when i click Preview post then when I post it looks completely different and I have to go back and add linefeeds etc. And the code window that looked perfect in the preview, with horizontal scroll now looks like crap. Aaarg....what am I doing wrong.
    Last edited by HenrikOlsson; - 21st August 2011 at 13:07.

  3. #3
    Join Date
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default Re: fatal: out of memory (pbpw.exe)

    I already tried your solution and it works but I just wondered why you couldn't do it the way I posted. The reason why you see a lot of zeros in my code is that im testing a new glcd that is only line addressable so you have update the full width of the display + it also allows multi line updating of the display witch it what I posted. I was just trying to maximise the speed of the screen update.

    Thanks for the reply Sphere.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,604


    Did you find this post helpful? Yes | No

    Default Re: fatal: out of memory (pbpw.exe)

    Hi,
    Which PIC are you using? If it has a MSSP module you can use that to speed up the communcations conciderably. There's no commands available to use it, like with HSEROUT, but once it's setup it's pretty trivial. There's an example on MELABS site that shows you how to work it.

    /Henrik.

  5. #5
    Join Date
    Aug 2005
    Posts
    95


    Did you find this post helpful? Yes | No

    Default Re: fatal: out of memory (pbpw.exe)

    The pic im using is a PIC18LF46K22 and it does have an MSSP module. Just a question on using the MSSP in terms of speed, are we talking 2x 3x 4x speed increase. I can currently completely fill the screen in less than a second.

    Sphere.

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: fatal: out of memory (pbpw.exe)

    If it's to output screen to a GLCD or whatever else, I would ever use multiple shiftout but a LookupTable (in the codespace OR EEPROM) + Shiftout Loop (or MSSP), way more code efficient, more flexible too.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts