|
|
View previous topic :: View next topic |
Author |
Message |
Joe Heinrich Guest
|
Program loader... |
Posted: Mon Nov 26, 2001 2:03 pm |
|
|
I'm using the 16F877, It will interact with a PC, (with code I write for the PC). One of the options I would like to include is the ability to replace the program code. I can see that it do-able, just not exactly sure how to get it done...I don't think this is the same as a boot loader... (correct me if I'm wrong.)
A second feature I want is the ability to replace/update only a portion (or a function) of the code. For this part I realize that this function must always start at the same address. (so the non-replaced code can find it.) and the registers the functions calls must also always have the same addresses. It is very likely that the full program gets modified and replaced but the function is still the same. This function will be created by a user(via the PC program) and therefore does not have access to the my source code or the compiler.
How do I 'anchor' registers now, so that in the future as I add/delete variables the variables critical to this function stay put? And like wise for function location?
Joe Heinrich
___________________________
This message was ported from CCS's old forum
Original Post ID: 1326 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
Re: Program loader... |
Posted: Mon Nov 26, 2001 2:22 pm |
|
|
:=I'm using the 16F877, It will interact with a PC, (with code I write for the PC). One of the options I would like to include is the ability to replace the program code. I can see that it do-able, just not exactly sure how to get it done...I don't think this is the same as a boot loader... (correct me if I'm wrong.)
You should look at the #org and #locate statements in the manual
and in the example files. Also look at the C and ASM source
code for a bootloader, found here:
<a href="http://www.workingtex.com/htpic/PIC_bootloader.htm" TARGET="_blank">http://www.workingtex.com/htpic/PIC_bootloader.htm</a>
___________________________
This message was ported from CCS's old forum
Original Post ID: 1327 |
|
|
Shane Rowell Guest
|
Re: Program loader... |
Posted: Mon Nov 26, 2001 4:55 pm |
|
|
I have used the bootloader available at the included link with the ccs compiler. It works great and saves a lot of time.
-Shane
:=I'm using the 16F877, It will interact with a PC, (with code I write for the PC). One of the options I would like to include is the ability to replace the program code. I can see that it do-able, just not exactly sure how to get it done...I don't think this is the same as a boot loader... (correct me if I'm wrong.)
:=
:=A second feature I want is the ability to replace/update only a portion (or a function) of the code. For this part I realize that this function must always start at the same address. (so the non-replaced code can find it.) and the registers the functions calls must also always have the same addresses. It is very likely that the full program gets modified and replaced but the function is still the same. This function will be created by a user(via the PC program) and therefore does not have access to the my source code or the compiler.
:=
:=How do I 'anchor' registers now, so that in the future as I add/delete variables the variables critical to this function stay put? And like wise for function location?
:=
:=Joe Heinrich
___________________________
This message was ported from CCS's old forum
Original Post ID: 1331 |
|
|
Steve Sawtelle Guest
|
Re: Program loader... |
Posted: Tue Nov 27, 2001 9:40 am |
|
|
:=I'm using the 16F877, It will interact with a PC, (with code I write for the PC). One of the options I would like to include is the ability to replace the program code. I can see that it do-able, just not exactly sure how to get it done...I don't think this is the same as a boot loader... (correct me if I'm wrong.)
-- The boot loader allows loading of new software (except the bootloader part of course) over the serial port, so I believe it is what you want. There are several types out there - look thru the achives as thsi comes up pretty often.
:=
:=A second feature I want is the ability to replace/update only a portion (or a function) of the code. For this part I realize that this function must always start at the same address. (so the non-replaced code can find it.) and the registers the functions calls must also always have the same addresses. It is very likely that the full program gets modified and replaced but the function is still the same. This function will be created by a user(via the PC program) and therefore does not have access to the my source code or the compiler.
:=
--- The same idea can be used here, except now your 'bootloader' code is actually the whole program (minus the user loaded part)
:=How do I 'anchor' registers now, so that in the future as I add/delete variables the variables critical to this function stay put? And like wise for function location?
-- As indicated by other responses (ORG and LOCATE)
:=
:=Joe Heinrich
___________________________
This message was ported from CCS's old forum
Original Post ID: 1339 |
|
|
|
|
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
|