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 support@ccsinfo.com

USB Bootloader header

 
Post new topic   Reply to topic    CCS Forum Index -> Code Library
View previous topic :: View next topic  
Author Message
PICoHolic



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

USB Bootloader header
PostPosted: Thu Nov 13, 2008 2:55 am     Reply with quote

Hey,

Here is a modified USB bootloader header file compatible with the Microchip USB HID bootloader that can be found in the USB framework (to be downloaded from http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537044 ). A PC software is also included.

Just include this H file into your project. It sets the reset address and the ISR.


Code:

///////////////////////////////////////////////////////////////////////////
////                     USB_BOOTLOADER.H                              ////
////                                                                   ////
////                                                                   ////
///////////////////////////////////////////////////////////////////////////
//how big is the bootloader?
//the bootloader will reside from address 0x0000 to this location.  the
//application will then sit at this location+1 to the end of program memory.
#define LOADER_SIZE                 (0xFFF)
#define LOADER_START                (0)
#define LOADER_END                  (LOADER_SIZE)
#define APPLICATION_START           (LOADER_SIZE+1)
#define APPLICATION_END             (getenv("PROGRAM_MEMORY")-1)
#define APPLICATION_ISR             (APPLICATION_START+8)

#ifndef _bootloader
 //in the application, this moves the reset and isr vector out of the bootload
 //space.  it then reserves the loader space from being used by the application.
 #build(reset=APPLICATION_START, interrupt=APPLICATION_ISR)
 #org 0, LOADER_END {}
#endif


Enjoy... Wink
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> Code Library 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