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 CCS Technical Support

Multiple bootloaders using PCD?

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







Multiple bootloaders using PCD?
PostPosted: Wed Aug 05, 2009 7:56 am     Reply with quote

Hi All,

I'm currently developing a project where we would ideally like two things:

1/ The ability to update the firmware of the device over USB
2/ The ability to update the device over the air

For number 1, microchip have a HID USB bootloader that could be used. The PC side is taken care of then since it has already been written. This bootloader will be entered upon power up, but only executes if a button is pressed when being powered up.

For number 2 though, I know I can get the .hex file over the air to off-chip flash memory without a problem (so assume the .hex is available on this flash memory). Writing this to the program memory though would mean heavily modifying the microchip USB bootloader to talk to the flash memory over SPI, examining flags etc. all in C30 which I've never really used before.

So I was thinking about the possibility of using a second bootloader written in CCS C (based on the PCD serial bootloader as a start) which upon power up, checks a flag on the flash memory to see if there is new firmware, if there is, copies the new firmware from the flash memory. This flag would be set once the main application has downloaded the new firmware and verified it.

So power up would go something like:

1/ enter microchip HID bootloader. If button is being pressed, execute the bootloader. If not, go to the second bootloader

2/ check to see if there is new firmware on the external flash memory (by checking flag). If so, update the firmware from the flash memory. If not, go to the main program


Does this sound reasonable? Are there any flaws to this plan?

EDIT: I am using the PIC24FJ256GB110 and PCD 4.096
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Wed Aug 05, 2009 9:01 am     Reply with quote

It sounds reasonable, generally. I don't exactly understand how the Microchip C30 HID bootloader project sets the vector table. Is the bootloader working without any interrupts or do they remap the vectors to the application?

Did you already succeed in combining the bootloader with your application, including interrupts (not considering the intended second bootloader)?

I think, there's a serious problem, that PCD doesn't support some operations required for full control of the vector table and remapping of interrupts.
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