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 CCS Technical Support

Relocation of reset and interrupt vectors and #org for bootl

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







Relocation of reset and interrupt vectors and #org for bootl
PostPosted: Wed Jan 15, 2003 6:52 pm     Reply with quote

I have been trying to compile code for the PIC18F8720 that can be downloaded by a bootloader. However, the CCS V3.119 compiler seems not to properly interpret some pragmas correctly and seems to ignore another completely. The following are the pragmas that I have been trying to use to direct the compiler where to place code and to prevent the compiler from using the boot block, 0x0000 to 0x01FF.

#build(reset=0x0100)
#build(interrupt=0x0104)
#org 0x0000,0x01FF {}

The two #build pragmas seem to multiply the value given by two. #build(reset=0x0100) places the reset vector at 0x0200 and #build(interrupt=0x0104) places the interrupt vector at 0x0208. I originally had tried #build(reset=0x0200) and #build(interrupt=0x0208) and the compiler put reset and interrupt at 0x0400 and 0x408, respectively.

According the the compiler documentation, #org 0x0000,0x01FF {} is supposed to prevent the compiler from using the program memory from 0x0000 to 0x01FF. However, the compiler insists on placing code and/or data in this area, regardless of the pragma.

I have tried every combination of the #org statement possible. When I don't use the {}, I get the compiler error "Invalid org range" regardless of the values given, even when I don't include addresses 0-3.
Thoughts?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10731
Gary Smithson
Guest







Re: Relocation of reset and interrupt vectors and #org for b
PostPosted: Wed Jan 15, 2003 9:06 pm     Reply with quote

I can't help very much but I can vouch for the following code to reserve program space in a mid-range family device (PIC16F877). If all is working properly then the family shouldn't matter.

// Reserve 0x0004 through 0x17FF
#org 0x0004, 0x07FF {}
#org 0x0800, 0x0FFF {}
#org 0x1000, 0x17FF {}

This on the other hand would NOT work
// Reserve 0x0004 through 0x17FF
#org 0x0004, 0x17FF {}

Sorry I can't remember the version of the compiler in use at the time but it was 3.xxx. Maybe in todays version the entire range can be given in one statement.

Hope this helps,
Gary S.


:=I have been trying to compile code for the PIC18F8720 that can be downloaded by a bootloader. However, the CCS V3.119 compiler seems not to properly interpret some pragmas correctly and seems to ignore another completely. The following are the pragmas that I have been trying to use to direct the compiler where to place code and to prevent the compiler from using the boot block, 0x0000 to 0x01FF.
:=
:=#build(reset=0x0100)
:=#build(interrupt=0x0104)
:=#org 0x0000,0x01FF {}
:=
:=The two #build pragmas seem to multiply the value given by two. #build(reset=0x0100) places the reset vector at 0x0200 and #build(interrupt=0x0104) places the interrupt vector at 0x0208. I originally had tried #build(reset=0x0200) and #build(interrupt=0x0208) and the compiler put reset and interrupt at 0x0400 and 0x408, respectively.
:=
:=According the the compiler documentation, #org 0x0000,0x01FF {} is supposed to prevent the compiler from using the program memory from 0x0000 to 0x01FF. However, the compiler insists on placing code and/or data in this area, regardless of the pragma.
:=
:=I have tried every combination of the #org statement possible. When I don't use the {}, I get the compiler error "Invalid org range" regardless of the values given, even when I don't include addresses 0-3.
:=Thoughts?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10732
David Aarons
Guest







Re: Relocation of reset and interrupt vectors and #org for b
PostPosted: Thu Jan 16, 2003 10:25 am     Reply with quote

Hi .. Please can you send me your email address and I will send you our bootloader which should get rid of your hassles.

David Aarons
sales@selectsoftware.net



:=I have been trying to compile code for the PIC18F8720 that can be downloaded by a bootloader. However, the CCS V3.119 compiler seems not to properly interpret some pragmas correctly and seems to ignore another completely. The following are the pragmas that I have been trying to use to direct the compiler where to place code and to prevent the compiler from using the boot block, 0x0000 to 0x01FF.
:=
:=#build(reset=0x0100)
:=#build(interrupt=0x0104)
:=#org 0x0000,0x01FF {}
:=
:=The two #build pragmas seem to multiply the value given by two. #build(reset=0x0100) places the reset vector at 0x0200 and #build(interrupt=0x0104) places the interrupt vector at 0x0208. I originally had tried #build(reset=0x0200) and #build(interrupt=0x0208) and the compiler put reset and interrupt at 0x0400 and 0x408, respectively.
:=
:=According the the compiler documentation, #org 0x0000,0x01FF {} is supposed to prevent the compiler from using the program memory from 0x0000 to 0x01FF. However, the compiler insists on placing code and/or data in this area, regardless of the pragma.
:=
:=I have tried every combination of the #org statement possible. When I don't use the {}, I get the compiler error "Invalid org range" regardless of the values given, even when I don't include addresses 0-3.
:=Thoughts?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10738
Gerrit Faas
Guest







Re: Relocation of reset and interrupt vectors and #org for b
PostPosted: Thu Jan 16, 2003 6:27 pm     Reply with quote

Hello David,

I'm just starting project with 18F6720 for data logging and am looking for a bootloader.

Is it posible to get your bootloader as well.

If so I have included my e-mail address.

Regards,


Gerrit Faas




:=Hi .. Please can you send me your email address and I will send you our bootloader which should get rid of your hassles.
:=
:=David Aarons
:=sales@selectsoftware.net
:=
:=
:=
:=:=I have been trying to compile code for the PIC18F8720 that can be downloaded by a bootloader. However, the CCS V3.119 compiler seems not to properly interpret some pragmas correctly and seems to ignore another completely. The following are the pragmas that I have been trying to use to direct the compiler where to place code and to prevent the compiler from using the boot block, 0x0000 to 0x01FF.
:=:=
:=:=#build(reset=0x0100)
:=:=#build(interrupt=0x0104)
:=:=#org 0x0000,0x01FF {}
:=:=
:=:=The two #build pragmas seem to multiply the value given by two. #build(reset=0x0100) places the reset vector at 0x0200 and #build(interrupt=0x0104) places the interrupt vector at 0x0208. I originally had tried #build(reset=0x0200) and #build(interrupt=0x0208) and the compiler put reset and interrupt at 0x0400 and 0x408, respectively.
:=:=
:=:=According the the compiler documentation, #org 0x0000,0x01FF {} is supposed to prevent the compiler from using the program memory from 0x0000 to 0x01FF. However, the compiler insists on placing code and/or data in this area, regardless of the pragma.
:=:=
:=:=I have tried every combination of the #org statement possible. When I don't use the {}, I get the compiler error "Invalid org range" regardless of the values given, even when I don't include addresses 0-3.
:=:=Thoughts?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10743
Gerrit Faas
Guest







Re: Relocation of reset and interrupt vectors and #org for b
PostPosted: Thu Jan 16, 2003 6:29 pm     Reply with quote

Hello David,

I'm just starting project with 18F6720 for data logging and am looking for a bootloader.

Is it posible to get your bootloader as well.

If so I have included my e-mail address.

Regards,


Gerrit Faas




:=Hi .. Please can you send me your email address and I will send you our bootloader which should get rid of your hassles.
:=
:=David Aarons
:=sales@selectsoftware.net
:=
:=
:=
:=:=I have been trying to compile code for the PIC18F8720 that can be downloaded by a bootloader. However, the CCS V3.119 compiler seems not to properly interpret some pragmas correctly and seems to ignore another completely. The following are the pragmas that I have been trying to use to direct the compiler where to place code and to prevent the compiler from using the boot block, 0x0000 to 0x01FF.
:=:=
:=:=#build(reset=0x0100)
:=:=#build(interrupt=0x0104)
:=:=#org 0x0000,0x01FF {}
:=:=
:=:=The two #build pragmas seem to multiply the value given by two. #build(reset=0x0100) places the reset vector at 0x0200 and #build(interrupt=0x0104) places the interrupt vector at 0x0208. I originally had tried #build(reset=0x0200) and #build(interrupt=0x0208) and the compiler put reset and interrupt at 0x0400 and 0x408, respectively.
:=:=
:=:=According the the compiler documentation, #org 0x0000,0x01FF {} is supposed to prevent the compiler from using the program memory from 0x0000 to 0x01FF. However, the compiler insists on placing code and/or data in this area, regardless of the pragma.
:=:=
:=:=I have tried every combination of the #org statement possible. When I don't use the {}, I get the compiler error "Invalid org range" regardless of the values given, even when I don't include addresses 0-3.
:=:=Thoughts?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10744
IK1WVQ
Guest







#BUILD(...) directive syntax ???
PostPosted: Mon Jan 20, 2003 12:03 pm     Reply with quote

hi,
see the "DEFAULT" option in #org pragma ....
i solved all my problem with this ..

regards

:=I have been trying to compile code for the PIC18F8720 that can be downloaded by a bootloader. However, the CCS V3.119 compiler seems not to properly interpret some pragmas correctly and seems to ignore another completely. The following are the pragmas that I have been trying to use to direct the compiler where to place code and to prevent the compiler from using the boot block, 0x0000 to 0x01FF.
:=
:=#build(reset=0x0100)
:=#build(interrupt=0x0104)
:=#org 0x0000,0x01FF {}
:=
:=The two #build pragmas seem to multiply the value given by two. #build(reset=0x0100) places the reset vector at 0x0200 and #build(interrupt=0x0104) places the interrupt vector at 0x0208. I originally had tried #build(reset=0x0200) and #build(interrupt=0x0208) and the compiler put reset and interrupt at 0x0400 and 0x408, respectively.
:=
:=According the the compiler documentation, #org 0x0000,0x01FF {} is supposed to prevent the compiler from using the program memory from 0x0000 to 0x01FF. However, the compiler insists on placing code and/or data in this area, regardless of the pragma.
:=
:=I have tried every combination of the #org statement possible. When I don't use the {}, I get the compiler error "Invalid org range" regardless of the values given, even when I don't include addresses 0-3.
:=Thoughts?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10823
Michael Thompson
Guest







Re: Relocation of reset and interrupt vectors and #org for b
PostPosted: Mon Jan 20, 2003 12:59 pm     Reply with quote

:=I have been trying to compile code for the PIC18F8720 that can be downloaded by a bootloader. However, the CCS V3.119 compiler seems not to properly interpret some pragmas correctly and seems to ignore another completely. The following are the pragmas that I have been trying to use to direct the compiler where to place code and to prevent the compiler from using the boot block, 0x0000 to 0x01FF.
:=
:=#build(reset=0x0100)
:=#build(interrupt=0x0104)
:=#org 0x0000,0x01FF {}
:=
:=The two #build pragmas seem to multiply the value given by two. #build(reset=0x0100) places the reset vector at 0x0200 and #build(interrupt=0x0104) places the interrupt vector at 0x0208. I originally had tried #build(reset=0x0200) and #build(interrupt=0x0208) and the compiler put reset and interrupt at 0x0400 and 0x408, respectively.
:=
:=According the the compiler documentation, #org 0x0000,0x01FF {} is supposed to prevent the compiler from using the program memory from 0x0000 to 0x01FF. However, the compiler insists on placing code and/or data in this area, regardless of the pragma.
:=
:=I have tried every combination of the #org statement possible. When I don't use the {}, I get the compiler error "Invalid org range" regardless of the values given, even when I don't include addresses 0-3.
:=Thoughts?
___________________________
This message was ported from CCS's old forum
Original Post ID: 10827
Ron
Guest







Re: Relocation of reset and interrupt vectors and #org for b
PostPosted: Mon Jan 27, 2003 5:03 am     Reply with quote

My compiler (v3.137) tells me 'INVALID ORG RANGE' When using
#org 0x0004, 0x07FF {}
#org 0x0800, 0x0FFF {}
#org 0x1000, 0x17FF {}

Any clues why Gary S. get's the thing to work?

Best Regards,
Ron

:=I can't help very much but I can vouch for the following code to reserve program space in a mid-range family device (PIC16F877). If all is working properly then the family shouldn't matter.
:=
:=// Reserve 0x0004 through 0x17FF
:=#org 0x0004, 0x07FF {}
:=#org 0x0800, 0x0FFF {}
:=#org 0x1000, 0x17FF {}
:=
:=This on the other hand would NOT work
:=// Reserve 0x0004 through 0x17FF
:=#org 0x0004, 0x17FF {}
:=
:=Sorry I can't remember the version of the compiler in use at the time but it was 3.xxx. Maybe in todays version the entire range can be given in one statement.
:=
:=Hope this helps,
:=Gary S.
:=
:=
:=:=I have been trying to compile code for the PIC18F8720 that can be downloaded by a bootloader. However, the CCS V3.119 compiler seems not to properly interpret some pragmas correctly and seems to ignore another completely. The following are the pragmas that I have been trying to use to direct the compiler where to place code and to prevent the compiler from using the boot block, 0x0000 to 0x01FF.
:=:=
:=:=#build(reset=0x0100)
:=:=#build(interrupt=0x0104)
:=:=#org 0x0000,0x01FF {}
:=:=
:=:=The two #build pragmas seem to multiply the value given by two. #build(reset=0x0100) places the reset vector at 0x0200 and #build(interrupt=0x0104) places the interrupt vector at 0x0208. I originally had tried #build(reset=0x0200) and #build(interrupt=0x0208) and the compiler put reset and interrupt at 0x0400 and 0x408, respectively.
:=:=
:=:=According the the compiler documentation, #org 0x0000,0x01FF {} is supposed to prevent the compiler from using the program memory from 0x0000 to 0x01FF. However, the compiler insists on placing code and/or data in this area, regardless of the pragma.
:=:=
:=:=I have tried every combination of the #org statement possible. When I don't use the {}, I get the compiler error "Invalid org range" regardless of the values given, even when I don't include addresses 0-3.
:=:=Thoughts?
___________________________
This message was ported from CCS's old forum
Original Post ID: 11024
joe06
Guest







Re: Relocation of reset and interrupt vectors and #org for b
PostPosted: Mon Jul 28, 2003 1:49 pm     Reply with quote

I have the same problem, I cannot compile a ORG pragma overriding the reset vector 0x00 to 0x03 !?
did you solve your problem ?
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516442
Eric Elias
Guest







Re: Relocation of reset and interrupt vectors and #org for b
PostPosted: Thu Aug 14, 2003 1:26 pm     Reply with quote

:=I have been trying to compile code for the PIC18F8720 that can be downloaded by a bootloader. However, the CCS V3.119 compiler seems not to properly interpret some pragmas correctly and seems to ignore another completely. The following are the pragmas that I have been trying to use to direct the compiler where to place code and to prevent the compiler from using the boot block, 0x0000 to 0x01FF.
:=
:=#build(reset=0x0100)
:=#build(interrupt=0x0104)
:=#org 0x0000,0x01FF {}
:=
:=The two #build pragmas seem to multiply the value given by two. #build(reset=0x0100) places the reset vector at 0x0200 and #build(interrupt=0x0104) places the interrupt vector at 0x0208. I originally had tried #build(reset=0x0200) and #build(interrupt=0x0208) and the compiler put reset and interrupt at 0x0400 and 0x408, respectively.
:=
:=According the the compiler documentation, #org 0x0000,0x01FF {} is supposed to prevent the compiler from using the program memory from 0x0000 to 0x01FF. However, the compiler insists on placing code and/or data in this area, regardless of the pragma.
:=
:=I have tried every combination of the #org statement possible. When I don't use the {}, I get the compiler error "Invalid org range" regardless of the values given, even when I don't include addresses 0-3.
:=Thoughts?
___________________________
This message was ported from CCS's old forum
Original Post ID: 144516969
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