|
|
View previous topic :: View next topic |
Author |
Message |
John Morley
Joined: 09 Aug 2004 Posts: 97
|
Robust USB Bootloader.....??? |
Posted: Tue Jun 11, 2013 1:36 pm |
|
|
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
|
|
Posted: Wed Jun 12, 2013 6:30 am |
|
|
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
|
|
Posted: Wed Jun 12, 2013 12:01 pm |
|
|
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
|
|
Posted: Wed Jun 12, 2013 12:06 pm |
|
|
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 |
|
|
|
|
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
|