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

Microchip USB bootloader

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



Joined: 14 Sep 2006
Posts: 27

View user's profile Send private message

Microchip USB bootloader
PostPosted: Thu Sep 14, 2006 5:59 am     Reply with quote

Hi all
My hardware is now ok. It is based on http://pic18fusb.online.fr/wiki/wikka.php?wakka=UsbBootload with a 2550 instead.

I use Microchip Bootloader package ( http://www.microchip.com/stellent/groups/picmicro_sg/documents/devicedoc/en021827.exe ) modified for 2550.
I can read and erase 2550 memory with the provided PDFSUSB.exe

I tried to apply what I found in this topic
http://www.ccsinfo.com/forum/viewtopic.php?t=26705&highlight=bootloader+relocate and add the following code:
Code:

#if defined(__PCM__)
   #define LOADER_END   0x1FF
   #define LOADER_SIZE   0x1BF
#elif defined(__PCH__)
   #define LOADER_END   0x7FF
   #define LOADER_SIZE   0x6FF
#endif

#ifndef _bootloader

#if defined(__PCM__)
   #build(reset=LOADER_END+1, interrupt=LOADER_END+5)
#elif defined(__PCH__)
   #build(reset=LOADER_END+2, interrupt=LOADER_END+9)
#endif

#org 0, LOADER_END

#endif

The code seems to correctly relocated a 0x800h

Is this modication is enought to be compatible with Microchip USB bootloader ?

Uploading the HEX file failed with "Failed to write CODE DATA".

Regards
NicolasC



Joined: 14 Sep 2006
Posts: 27

View user's profile Send private message

Solved
PostPosted: Fri Sep 15, 2006 11:41 am     Reply with quote

The above code is enought to be compatible with Microchip bootloader

I added NOPBADEN,WRTB to my fuses to remove warning when loading the HEX file :
#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL5,CPUDIV1,VREGEN,NOPBADEN,WRTB


I still have the Warning "Failed to write CODE DATA" and I still don't know what is related but it's operationnal Smile
Joven
Guest







PostPosted: Mon Sep 18, 2006 4:11 am     Reply with quote

Hi

you can put a simple exemple for make upload for the pic.

thanks
NicolasC



Joined: 14 Sep 2006
Posts: 27

View user's profile Send private message

PostPosted: Thu Sep 21, 2006 3:44 pm     Reply with quote

The boot program is provided in the Microchip Bootloader package listed above.

Then add the code above to relocate you program outside of the boot zone.
Be carefull with the configuration bits as they must be compatible with the bootloader. Check the USB bootloader manual.

Regards
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