CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Problems with PIC18C601 (Invalid ORG range)

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
landert_stift



Joined: 10 Nov 2005
Posts: 2
Location: Switzerland

View user's profile Send private message

Problems with PIC18C601 (Invalid ORG range)
PostPosted: Thu Nov 10, 2005 8:54 am     Reply with quote

Hi

I'm a new member and I'm still learning English, so it wouldn't be the best English;-)
I have a Problem with the PIC18C601, I wrote a programm with the "MPLAB IDE v7.2" and compiled it with the "PCWH Compiler IDE Version 3.212"! But every time when I compile, the error 126: "Invalid ORG range" comes!!!

After I wrote an example program like this:


Code:
-------------------------------------------
#include <18C601.h>

#fuses HS ,NOWDT, PUT

void main ()
{
while(1);
}
--------------------------------------------


But when I compile, the output shows like this:

Output:
--------------------------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Done.
Executing: "C:\Programme\PICC\Ccsc.exe" "main.c" +FH +DF +LN +T -A +M +Z +Y=9 +EA
>>> Warning 203 "H:\SOMI\PIC- Programm\main.c" Line 7(1,1): Condition always TRUE
--- Info 300 "H:\SOMI\PIC- Programm\main.c" Line 10(0,1): More info: Attempted to create: 00000-00002 for reset
*** Error 126 "H:\SOMI\PIC- Programm\main.c" Line 10(0,1): Invalid ORG range
1 Errors, 1 Warnings.
Halting build on first failure as requested.
BUILD FAILED: Thu Nov 10 15:40:59 2005
--------------------------------------------------------------------------------------

I don't now what to do! What do I have to do to eliminate this problem??

Can someone help me?

Thank's

landert_stift
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Nov 10, 2005 12:41 pm     Reply with quote

The 18C601 has no internal ROM. So in this case, you have to use
the CCS #build() statement to tell the compiler where the external
ROM is located. I was able to make your program compile with
no errors by adding the statement shown in bold below. I got
the address range from Figure 4-1 in the 18C601 data sheet.
Look in the CCS manual for more information on the #build statement.
The manual can be downloaded here:
http://www.ccsinfo.com/ccscmanual.zip

Quote:

#include <18C601.h>
#fuses HS ,NOWDT, PUT

#build(memory=0x00000:0x3FFFF) // Define external memory locations

void main ()
{

while(1);
}
landert_stift



Joined: 10 Nov 2005
Posts: 2
Location: Switzerland

View user's profile Send private message

PostPosted: Thu Nov 10, 2005 3:23 pm     Reply with quote

Thank you very much! Now it works!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group