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

tiny bootloader

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



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

tiny bootloader
PostPosted: Sun Oct 14, 2007 6:16 am     Reply with quote

hello,
does anyone know how to achieve this with tiny bootloader?
Quote:
Requirements for your program:
The program must meet this requirement: it must have in the first 4 words of memory a GOTO to the start of the main program. (this is what the majority of the bootloaders require).

I know how to move interrupt vectors and main program:
#define LOADER_END 0x7FF
#define LOADER_SIZE 0x6FF
#build(reset=LOADER_END+1, interrupt=LOADER_END+9)
#org 0, LOADER_END {}
but I don't know how to place GOTO within the first 4 WORDs.
Has anyone tried this before me?
Thank you folks,
Meereck
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Sun Oct 14, 2007 7:30 am     Reply with quote

#build(reset=0x000:0x0007)

This will prevent the compiler from putting anything other than the jump vector below the reset vectors.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
meereck



Joined: 09 Nov 2006
Posts: 173

View user's profile Send private message

PostPosted: Sun Oct 14, 2007 9:56 am     Reply with quote

thnx, works like a charm
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