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

How do I put a program in memory that is not at address 0x00

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



Joined: 23 Sep 2009
Posts: 55
Location: Ukraine

View user's profile Send private message Visit poster's website

How do I put a program in memory that is not at address 0x00
PostPosted: Sat Jan 28, 2023 1:56 am     Reply with quote

I want to write my own little bootloader and place it on top of the PIC18 memory, placing only the jump command to the beginning of the bootloader at address zero.
Placing the #ORG directive 0x3000 moves the program in memory to the right address, but at address 0x0000 there is a big chunk with the delay and COM port service routines.
How do I move everything to the end of memory?
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Sat Jan 28, 2023 2:43 am     Reply with quote

First look at the booloader examples. These show exactly how to move
things.
Keys are two things. #BUILD, and how to add the code to relocate
the ISR with jump_to_isr.
Eddy71ua



Joined: 23 Sep 2009
Posts: 55
Location: Ukraine

View user's profile Send private message Visit poster's website

PostPosted: Sat Jan 28, 2023 5:30 am     Reply with quote

Thanks for the tip. Never heard of this directive before. I'm going to read and understand.
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