View previous topic :: View next topic |
Author |
Message |
JBM
Joined: 12 May 2004 Posts: 54 Location: edinburgh, Scotland
|
"The Codeloader" with application |
Posted: Fri Nov 05, 2004 10:49 am |
|
|
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
|
|
Posted: Mon Nov 08, 2004 3:30 pm |
|
|
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
|
Clarification |
Posted: Tue Nov 09, 2004 12:51 pm |
|
|
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
|
|
Posted: Tue Nov 09, 2004 1:49 pm |
|
|
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
|
|
Posted: Tue Nov 09, 2004 2:33 pm |
|
|
The trick is to have the bootloader protect itself. Then you can include the bootloader in your application. |
|
|
|