Serial bootloader as part of a HCS08 Codewarrior project

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Serial bootloader as part of a HCS08 Codewarrior project

4,297 Views
copernicus
Contributor I
Hi all.

AN2295 describes a Serial bootloader which is loaded into a protected area at the top of HCS08 memory (in my case a 9S08GB60). Then you are able to load your main application afterwards through the serial port.
I am trying to create a user application in Codewarrior which already contains the serial bootloader, AND the main user application. The benefit of this is the program can be programmed at the factory using the much quicker BDM interface, and then upgraded later in the field using the serial bootloader. My problem is that in a C project, execution wants to start at _Entrypoint and not the bootloader code. Can anyone give me some pointers on how to integrate the serial bootloader as part of a larger C project in Codewarrior? (I'm also using processor expert).

Thanks.
Neil.
Labels (1)
Tags (1)
0 Kudos
Reply
4 Replies

1,034 Views
the_andie
Contributor I
hi copernicus,

do you have a solution for this problem?

andie
0 Kudos
Reply

1,034 Views
copernicus
Contributor I
Hi andie

I have been pulled of the project for now to do something else, but will be back on it soon. The short answer is, no I have not found a solution yet. I don't think we need to redirect the reset vector as Tim suggested, just make it point to the bootloader code, then the bootloader can do its thing, and then jump to the main program. I believe the problem I was having is that Processor Expert wants to control everything, and I was unable to get it to point the reset vector to the bootloader code. It always wanted to point it to _Entrypoint. When I'm back on the project, I'll find the solution and post it here (that it if someone else doesn't beat me to it :smileyhappy:

Neil.
0 Kudos
Reply

1,034 Views
chapster
Contributor I
I have the same problem using the HC908AP32.  I can paste my user code into the bootloader file which redirects the interrupt vectors.  I can then type in my original interrupt vector addresses int othe redirected areas.  However, I do not know what the first 8 bytes are used for before the relocated table (85B0-85B8) as they change from the original bootloader code to the bootloader code with my user code in. 
Anyone know as I now have no way of reading the micro image with the full code + bootloader?
0 Kudos
Reply

1,034 Views
RoadKill_CodeKi
Contributor I
Neil,

It appears that you are trying to do the same thing I am. You may want to check out the thread I started on this forum on interrupt redirection, as I'm sure you may run into this as well. I am still investigating how to convince PE to redirect the reset vector, as it doesn't seem to want to do so.

I am also using AN2295 as a basis for boot loader code and my desire is to keep both boot and main code in the same project for some of the same reasons you state.

-Tim
0 Kudos
Reply