Linker error: Not enough ROM main

General discussion on mikroPascal.
Post Reply
Author
Message
thespacewizard
Posts: 1
Joined: 17 Nov 2008 21:49

Linker error: Not enough ROM main

#1 Post by thespacewizard » 28 Nov 2008 23:50

When trying to burn a program onto a P16F690 chip, the error message: Linker Error: Not enough ROM main, appears

How shall I overcome this problem?

Thanks in advance!

mwcook
Posts: 3
Joined: 16 Dec 2008 00:34

Re: Linker error: Not enough ROM main

#2 Post by mwcook » 16 Dec 2008 00:37

thespacewizard wrote:When trying to burn a program onto a P16F690 chip, the error message: Linker Error: Not enough ROM main, appears

How shall I overcome this problem?

Thanks in advance!
Hi,

I also get the same error when I cross the 50% of ROM used. Is this a limitation of the compiler?

MIke

rmteo
Posts: 1330
Joined: 19 Oct 2006 17:46
Location: Colorado, USA

#3 Post by rmteo » 16 Dec 2008 00:40

Are you using the DEMO version of the compiler?
Why pay for overpriced toys when you can have
professional grade tools for FREE!!! :D :D :D

goran.marinkovic
mikroElektronika team
Posts: 265
Joined: 25 Nov 2008 09:09

#4 Post by goran.marinkovic » 16 Dec 2008 11:16

Hi,

Please read carefully ,,PIC Specifics" topic in help section of your compiler.
And especially pay attention on PIC16 specifics.

Regards

mwcook
Posts: 3
Joined: 16 Dec 2008 00:34

#5 Post by mwcook » 17 Dec 2008 02:31

goran.marinkovic wrote:Hi,

Please read carefully ,,PIC Specifics" topic in help section of your compiler.
And especially pay attention on PIC16 specifics.

Regards
Thanks for this Tip. (and to answer rmteo, this issue occurs in both demo and paid version)

Apparently what I am seeing is the "no single routine should exceed one page (2,000 instructions)" limitation. When I look at the asm output of the compiler, I see that my program is right at 2000 lines of assembly code.

However I'm a bit confused with the Help section suggestion to break the routine into several chunks. Can you point me to the right direction to do this?

Thanks,
Mike

rmteo
Posts: 1330
Joined: 19 Oct 2006 17:46
Location: Colorado, USA

#6 Post by rmteo » 17 Dec 2008 02:35

Use procedures and/or functions. This is a limitation of the PIC16s. Note that this is not the case with PIC18s.
Why pay for overpriced toys when you can have
professional grade tools for FREE!!! :D :D :D

piort
Posts: 1379
Joined: 28 Dec 2005 16:42
Location: Laval,Québec,Canada,Earth... :-)
Contact:

#7 Post by piort » 17 Dec 2008 03:56

hi,
if you dont know how use procedure and function, post your code here and im sure alots of ppl will make you few ( and many) suggestion ;-)

mwcook
Posts: 3
Joined: 16 Dec 2008 00:34

#8 Post by mwcook » 18 Dec 2008 05:20

Thanks. Yes, I use both procedures and functions but my main routine is longer than normal because of some time critical processing.

So does that mean 1/2 of the ROM space is reserved for procedures and functions while the other half is for the Main rountine?

Mike

janni
Posts: 5373
Joined: 18 Feb 2006 13:17
Contact:

#9 Post by janni » 18 Dec 2008 10:41

mwcook wrote:So does that mean 1/2 of the ROM space is reserved for procedures and functions while the other half is for the Main rountine?
If you like statistics, then it's 1/4 of program space available for main in processors with 8 kwords ROM :wink: .

I think, I'd have to live really long to see a large main that cannot be broken into smaller pieces. Just look closely at your code and I'm sure you'll be able to separate chunks of code that may be exported into procedures and functions - most probably leading to some optimisation, as well.

And if you don't see a way to do it, just post the code here and you'll see what others can do to it :lol: .

Post Reply

Return to “mikroPascal General”