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

"The Codeloader" with application

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



Joined: 12 May 2004
Posts: 54
Location: edinburgh, Scotland

View user's profile Send private message

"The Codeloader" with application
PostPosted: Fri Nov 05, 2004 10:49 am     Reply with quote

I was pointed to The Codeloader yesterday, and have had great success so far, loading an application with it to my 18F452.

I saw a post a while ago about including the application code in the same .HEX file as the bloader, and now I can't find the it! If anyone knows how to do this, (i.e. make the application code over-writable and not the bloader) I'd appreciate some help.
Thanks in advance

-JBM
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Nov 08, 2004 3:30 pm     Reply with quote

If you want to prevent your application code from using the ROM
locations assigned to the bootloader, then do this:

#org 0x7C00, 0x7FFF {}

This is just an example. Edit the start address to reflect the
true starting address of your bootloader.
JBM



Joined: 12 May 2004
Posts: 54
Location: edinburgh, Scotland

View user's profile Send private message

Clarification
PostPosted: Tue Nov 09, 2004 12:51 pm     Reply with quote

Thanks for your reply, but I probably should clarify:
I have the bootaloder compiled to one file ( codeloader.HEX ) and my application in another ( app.HEX ). I've #ORGed out the necessary memory locations so my app doens't overwrite the bloader, but this still means I have to program the PIC with the bloader, and then load the application separately. I can access the bloader from my application, but what I want is to be able to have one .HEX file with the application and the bloader ( to allow for future updates ).

Going down to the assumbly level is *icky* I feel, so any tips here would be appreciated.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Nov 09, 2004 1:49 pm     Reply with quote

I don't didn't look at the Codeloader source, but the web page
says it's written in CCS C. So you probably should be able to
include it in your application.

I once posted some bootloader code, in which the bootloader
and the application are in one project. Maybe if you look at
this page, it will answer your questions.
http://www.ccsinfo.com/forum/viewtopic.php?t=7791
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Nov 09, 2004 2:33 pm     Reply with quote

The trick is to have the bootloader protect itself. Then you can include the bootloader in your application.
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