PDA

View Full Version : PIC18F2620 "out of memory"??



Ron Marcus
- 30th December 2005, 16:05
I am compiling a program on the 2620, and when I get above 6K bytes programmed, it tells me I am out of memory. This chip is supposed to have 32K of flash... What gives? I am using MCSP, with PBP2.46.
Thanks,
Ron

mister_e
- 30th December 2005, 16:14
could be the use of BRANCH instead of BRANCHL

OR http://www.melabs.com/faq/02039124.htm#02070858

If it doesn't work, try to remove your config fuses

Not better... post your code here or in my PM

Ron Marcus
- 30th December 2005, 16:18
could be the use of BRANCH instead of BRANCHL

OR http://www.melabs.com/faq/02039124.htm#02070858

If it doesn't work, try to remove your config fuses

Not better... post your code here or in my PM

I am not using branches, and I am on XP.

Dave
- 30th December 2005, 22:05
Ron Marcus, Are you by chance declaring too large of an array for the available ram? I have been using these processors and have never "run out of memory". Also check that you are not recursively calling a subroutine. A stack overflow will also give you this message.

Dave Purola,
N8NTA

skimask
- 31st December 2005, 07:31
A bit cryptic on the 1st line...
Is it that Windows is out of memory or the PBP program is too large?
Post some code... let's see what's up...
JDG

Ron Marcus
- 31st December 2005, 14:28
A bit cryptic on the 1st line...
Is it that Windows is out of memory or the PBP program is too large?
Post some code... let's see what's up...
JDG

This is a client's project, and I am not at liberty to post code. That being said, I isolated some code with ";"s and it compiled up to 5980 bytes (in the lower left window of MCSP. To be sure it was not some funky code getting by the assembly process, I isolated alternate blocks of code and it compiled up to 6 k again. I must believe it is in the amount of memory partitioned for PBP.
I read a note on the ME website about an alternate PBP compiler for large programs, but have not had time to implement it. It's unfortunate that "out of memory" can mean so many things. Anyone have to switch over to the "other PBP"?

Melanie
- 31st December 2005, 15:52
The 'out of memory' message probably refers to your PC's available memory during compilation. PBP does not take advantage of all your PC's available RAM, whilst PBPW does.

There is no 'other' PBP (by 'other' I mean another version you have to purchase)... it's just down to the way you invoke it...

A standard example:-

PBP -p16F876A myprog -v

A large memory example:-

PBPW -p16F876A myprog -v

Actually where you run out of memory is probably dependent on your PC... on mine it happens somewhere between a 4k and 6k compilation. You might as well just run PBPW for everything and not have to worry about it again.

Ron Marcus
- 31st December 2005, 18:17
The 'out of memory' message probably refers to your PC's available memory during compilation. PBP does not take advantage of all your PC's available RAM, whilst PBPW does.

There is no 'other' PBP (by 'other' I mean another version you have to purchase)... it's just down to the way you invoke it...

A standard example:-

PBP -p16F876A myprog -v

A large memory example:-

PBPW -p16F876A myprog -v

Actually where you run out of memory is probably dependent on your PC... on mine it happens somewhere between a 4k and 6k compilation. You might as well just run PBPW for everything and not have to worry about it again.

Thanks all. I will try PBP 'Dubya'

Ron

Ron Marcus
- 3rd January 2006, 01:01
OK, I switched over to PBPW and still got the 'out of memory' message around 5900 bytes. Since it was during assembling, and the system uses MPASM, I looked at MPASMWIN. I don't know how to muck around with DOS, so I took the cheesy way out...I changed the names MPASMWIN to MPASM, and MPASM to MPASM1. Now all is well in Whoville! Thanks again for the feedback, and I am seriously thankful for a forum with so much knowledge out there for the asking...

Ron