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

Robust USB Bootloader.....???

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



Joined: 09 Aug 2004
Posts: 97

View user's profile Send private message

Robust USB Bootloader.....???
PostPosted: Tue Jun 11, 2013 1:36 pm     Reply with quote

Hi,

Can anyone point me in the direction of a robust USB bootloader for use with the CCS compiler? I've been playing around with 'ex_usb_bootloader.c' for a couple of days now, and it sure leaves a lot to be desired! I cannot get the CCS supplied PC client 'ccsbootloader.exe' program to work at all (I get a 'PIC not responding' message each time), and I've only been able to make TeraTerm work for really small application programs, like an LED blinker.....

When I run the bootloader code on my target board, I see 'CCS CDC Bootloader (COM3)' show up in the Device Manager under Windows 7, so the USB functionality appears to be working. I've also added some diagnostics to the bootloader code itself, so I know that it's entering the 'load_program()' routine when I run the code (with a button held down at power up). I've also added some diagnostics to let me know that data is being received by the PIC during program load. With the CCS ccsbootloader.exe program, I see the initial ';HELLO' that this program is (presumably) sending, and then I get the 'PIC not responding' message. With TeraTerm, I do see the correct data arriving for a bit, but more often than not it will die in mid-stride, although again for small applications it does seem to work!

At this point, my actual application is done, so I'm not really looking for another project (ie. troubleshooting/debugging the CCS example bootloader), I'm simply looking for a working USB bootloader!

I'm using PCH v4.121, and a PIC 18F2550.

Thanks,

John
_________________
John Morley
dan king



Joined: 22 Sep 2003
Posts: 119

View user's profile Send private message

PostPosted: Wed Jun 12, 2013 6:30 am     Reply with quote

I've been using the bitwhacker boards sold through Sparkfun for the PIC18F2550/2553 and have had zero issues with it. The source code is available on the site and it makes use of the USB bootloader program supplied by Microchip to transfer the program.

The .hex for the bootloader is provided for a couple oscillator options but since they provide the source (C18 compiler I think) you can modify it if needed.

https://www.sparkfun.com/products/762

http://www.schmalzhaus.com/UBW/index.html

let me know if you have any questions.

Dan
John Morley



Joined: 09 Aug 2004
Posts: 97

View user's profile Send private message

PostPosted: Wed Jun 12, 2013 12:01 pm     Reply with quote

Hi Dan,

Thanks for the tip, that looks very promising!! I got everything installed and working, but didn't actually get it working due to the differences in
configuration bits between the bootloader, and my application. I need to recompile the bootloader anyway to chance the 'magic' activation I/O pin,
so I guess I make my changes there!

Thanks,

John
_________________
John Morley
dan king



Joined: 22 Sep 2003
Posts: 119

View user's profile Send private message

PostPosted: Wed Jun 12, 2013 12:06 pm     Reply with quote

Yah, the config bits are one of the two areas you need to pay close attention. I make sure my application uses the same config as the bootloader so I don't soft brick the target and have to re-flash the bootloader with an ICD.

Also, make sure to set your application to an area of memory where the bootloader doesn't reside.

I use a template to start my apps to keep everything happy.

I was looking at the latest bootloader on the UBW site and it looks like they set the protection bits to prevent overwriting the bootloader and the config bits. I haven't checked that version out yet but probably will

Glad its working out for you.

Dan
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