View previous topic :: View next topic |
Author |
Message |
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
bootloader question |
Posted: Wed Jun 09, 2010 3:44 pm |
|
|
I have a rs232 boot loader working in the form of the CCS examples ex_bootloader.c . This is a two step process.
1) using the programmer download the bootloader
2) using the bootloader download the application code
initially and at any other time a new version is needed.
Now I would like to try and modify things as follows
1) using the programmer download the bootloader and the application
2) at any other time a new version is needed download using the bootloader
The reason the fast speed of the programmer and the bootloader is expected to be used only as a contingency if a software patch is needed later.
Is the above possible? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
|
Posted: Wed Jun 09, 2010 7:49 pm |
|
|
Yes that was a great help
First I compiled the bootloader then
I was able to embed the bootloader in the application code
using
#import (file=xxxxx.hex,hex,range=xxxx:yyyy)
Then I compiled the first deliverable and using the programmer the PIC got the first deliverable ( bootloader plus application)
This is a nice solution
the first deliverable is compiled with the #import
and updates are compiled without it. If an update is needed the bootloader via rs232 can install it.
Thanks FvM and PCM_programmer |
|
|
Glen
Joined: 20 Mar 2010 Posts: 3
|
|
Posted: Sat Jun 12, 2010 1:09 pm |
|
|
I've done the same thing, but used a slightly different solution.
1) Download the bootloader with the programmer.
2) Download the application with the bootloader.
3) Upload the bootloader + application image with the programmer.
This gives you an image containing both the bootloader and the application that can be downloaded with the programmer. And the bootloader is in place if future updates to the application are needed.
Glen |
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Sun Jun 13, 2010 1:29 am |
|
|
The said method of reproducing the application image by copying it to a hex file works well, of course. I've applied it
in cases, where the CCS compiler missed to set some necessary configuration bits correctly (particularly for PIC24).
But it's a bit time consuming, and requires access to a target platform. Memory ranges must be selected manually for the
produced image, which is a possible source of faults. It's good, that CCS provides all means to assemble the factory
image by software tools only.
Frank |
|
|
|