View previous topic :: View next topic |
Author |
Message |
cristianclc
Joined: 28 Oct 2012 Posts: 2
|
Out of ROM, A segment or the program is too large |
Posted: Sun Oct 28, 2012 9:17 am |
|
|
Hi, I'm working with the 16f1518 pic and when I'm trying to compile my code and I get this message: "Out of ROM, A segment or the program is too large program3".
Looking the call tree tool I realized that all the code is written in the page 0, and the function program3 use 2179 Bytes of ROM!
I know that reducing the code in the function program3 i can solve the problem but I would like to know if there is anyway to tell the compiler which page it has to use, since the pic I'm using has 7 pages and as I said before the compiler just use the page 0! Thanks! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19538
|
|
Posted: Sun Oct 28, 2012 10:03 am |
|
|
The compiler will automatically use other pages. Problem though is that a whole page is just 2048 bytes, so the function you have won't fit in any page. If you split the code up into smaller pieces, then the compiler will juggle these and fit them into other pages as required.
Best Wishes |
|
|
cristianclc
Joined: 28 Oct 2012 Posts: 2
|
|
Posted: Sun Oct 28, 2012 6:45 pm |
|
|
Ttelmah wrote: | The compiler will automatically use other pages. Problem though is that a whole page is just 2048 bytes, so the function you have won't fit in any page. If you split the code up into smaller pieces, then the compiler will juggle these and fit them into other pages as required.
Best Wishes |
Thanks for your help Ttelmah! I really appreaciate it. |
|
|
|