New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32

Post
edorul
New Member
2013/04/16 11:55:16
Hello,
 
I've made a new serial bootloader for Microchip PIC devices named "Tiny PIC Bootloader +" (http://sourceforge.net/projects/tinypicbootload/)
 
Here are some informations about it:
 
Where does it come from?
This Bootloader is based on "Tiny PIC Bootloader" made by Claudiu Chiculita.
PC software is based on "Tiny Pic Bootloader for GNU/Linux" writen in python by Ferezvi.
 
What can it do?
It can program:
- PIC10
- PIC16
- PIC18
- PIC32
 
And this:
- with light modifications to the Bootloader firmware for new devices
- without modifying your application source code or using a special linker script
- via GUI or command line
- with automatic Reset on RTS serial pin
- with autodetect of the right COM port and baud rate (if automatic Reset on RTS serial pin is enabled)
- with HEX code verification to avoid to send a program from a different device family in your PIC (for example: prevent to program a PIC16 ".hex" in a PIC18 device)
- with debug messages capabilities
 
What's next?
It's planned to add:
- PIC12
- PIC24
- dsPIC
- and a better documentation
 
Please give it a try and send me some feedbacks Smile
 
Best regards,
Edorul
sahamzah
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/04/20 01:35:20
Hi Edorul,
 
How to use the command line option? 
i.e. Tinybootloader test.hex com1 
tq
edorul
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/04/20 02:26:38
Hello Sahamzah,
 
There is only one option when using the command line: the name of the ".hex" file.
So "Tiny PIC Bootload +" should be previously configured with the GUI (COM port, baud rate, etc) but only once as the options are stored in the "config.ini" file.
 
So use of command line option is:
TinyPicBootloader+.exe "C:\folder 1\folder 2\folder etc\name of the hex file.hex"
 
If you really need more options in the command line, I can try to add them.
 
Best regards,
Edorul
sahamzah
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/04/20 05:13:35
Hello Edorul,
Thanks and can you add options  like  d:\TinyPicBootloader  <file.hex> <com1> <baudrate9600> 
 
Saiful 
 
 
edorul
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/04/21 01:31:11
Hello Saiful,
 
I've added COM and Baud Rate to command line options:
tinypicbbotloader+.exe "c:\folder 1\folder etc\file name.hex" [COMx [BaudRate]]
 
Examples:
tinypicbootloader+.exe "c:\test file.hex" COM8 9600                 
tinypicbootloader+.exe "c:\test file.hex" com8                 
tinypicbootloader+.exe "c:\test file.hex"
 
You can get the new version here:
http://sourceforge.net/p/...uests/thread/b35c1731/
Can you tell me if it works as expected?
 
Best regards,
Edorul
post edited by edorul - 2013/04/21 01:33:41
sahamzah
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/04/21 18:07:04
Hi Edorul,
Thanks for the new code. I will test it and feedback to you the outcome.
 
Saiful
 
edorul
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/04/23 02:56:24
Hello,
 
For those who want to try "Tiny PIC Bootloader +" but don't know where to start, there is now a "Quickstart guide" in the web site:http://tinypicbootload.sourceforge.net/quickstart.html
 
Best regards,
Edorul
 
sahamzah
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/02 00:10:09
Hi,
I already tested tinybooloader+ with the new command line options but with an error that PIC that I used (16F88) was not supported.
 
 
edorul
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/02 05:30:27
Hello Saiful,
 
I'm sorry for the inconvenience but PIC16F88 wasn't supported because it seems it uses a different block size for flash write and I don't have this device to make some tests.
 
So, I've attached two versions of TinyBootloader+ to this post. The (A) version uses a special write function for PIC16F88 and the (B) version use the general PIC16F function (warning: do not use another "piccodes.ini" than those in archive files). Can you try them, and tell me which version works (or both, or none) ???
 
Best regards,
Edorul
sahamzah
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/06 04:25:00
Dear Edorul,
The A version: It can recognize PIC16F88 but the application  program didn't run
The B version: It can recognize PIC16F88 only once and the application program didn't run.
 
I think the original version was working fine (can recognize PIC16F88 and the application program running) but without the additional command line options.
 
Saiful
 
edorul
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/06 11:53:15
Hello Saiful,
 
These are bad news... But, may be there is a last chance to make it works with the new version attached to this post (as previously do not use another "piccodes.ini" than the one in the archive).
 
What do you mean by "the original version was working fine"? Did you mean the original "Tiny PIC Bootloader" from Claudiu Chiculita or the version 0.6.3 of "Tiny PIC Bootloader+"? In fact, "Tiny PIC Bootloader+" was never able to program PIC16F88 :-(
 
Best regards,
Edorul
 
PS: do you use "notinybld16F88.asm" or "tinybld16F88.asm" firmware? 
post edited by edorul - 2013/05/06 12:28:31
sahamzah
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/06 16:52:52
Hello Edorul,
I will try the latest version.
What I meant with the original code is from your first posting (http://sourceforge.net/projects/tinypicbootload/) which works perfect with PIC16F88
 
Saiful
 
 
sahamzah
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/06 21:03:49
Dear Edorul,
 
The latest version  is working successfully with 16F88, tq :).
Only when I called the command line via another software I got this message error : Microsoft.net Framework. Unhandled exception has occurred in your application ...
 
Do you think what might have caused the problem? tq
 
Saiful
 
edorul
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/07 01:32:04
Hello Saiful,
 
I'm glad that PIC16F88 works correctly with the lastest version.
Which firmware do you use: "notinybld16F88.asm" or "tinybld16F88.asm"?  
 
For the error message you get, I can't help you for the moment. 
Can you tell me which is the software you use? I hope it's freely downloadable so I could make some tests... In this case, can you give me the settings used in this soft to launch TinyBootloader+?
 
Best regards,
Edorul
sahamzah
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/07 01:37:51
Hello Edorul,
I just use the hex file provided in the link.
For the software, I use Flowcode from MatrixMultimedia.
 
Saiful
 
edorul
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/08 04:10:14
Hello Saiful,
 
I've downloaded the free version of "Flowcode", so I could make some tests.
TinyPicBootloader+ is now working with it. You can download the latest version here:
http://sourceforge.net/projects/tinypicbootload/files/
 
Your problem was helpfull because it could have happen with other softwares. Thanks for the bug report!
 
Best regards,
Edorul
sahamzah
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/09 02:44:43
Hi Edorul,
Good to hear that you managed to run Tinybootloader+ with Flowcode but sadly said I still could not manage to run it successfully. Is it possible to see how you set the parameters in Build -> Compiler options? Alternatively, you can export  and send the compiler option settings ( *.fcs) to me via email.
 
tq
 
Saiful
 
edorul
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/09 07:53:42
Hello Saiful,
 
You've really have bad luck with my software :-s
 
I've attached to this post a screenshot and the ".fsc" file. I hope it will work with your version of Flowcode.
 
Best regards,
Edorul
sahamzah
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/14 18:56:20
Thanks Edorul.
Now it is working fine :)
 
Saiful
 
edorul
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/05/15 12:18:01
Hello Saiful,
 
These are good news :-)
Thanks for the feedback!
 
Best regards,
Edorul
leonarul
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/06/18 19:09:51
Hello edorul,
I tried you version 0.6.4 bootloader. But i cannot generate pwm at port RB3. when i read the datasheet pic16f88, it said that by default the pwm port is at the RB0..in my code i try to put the configuration bit settings but no effects.. So for port RB0 i can use it for my external interrupt..by the way, your previous version works great!
regards;
Juhari
leonarul
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/06/19 03:36:21
Hello edorul,
I tried you version 0.6.4 bootloader. But i cannot generate pwm at port RB3. when i read the datasheet pic16f88, it said that by default the pwm port is at the RB0..in my code i try to put the configuration bit settings but no effects.. So for port RB0 i can use it for my external interrupt..by the way, your previous version works great!
regards;
Juhari
wilkxt
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/08/23 14:47:04
Hi
Is support to pic16f1459 ?
 
regards
tom
Amampondo
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/10/22 07:02:39
Hello edorul,
I wonder if it was possible to include an option into the GUI where DTR can be selected to reset the µC (for cases where the RTS is already in use and not available)
It's a great tool, thanks for the effort!
Tom
bartt
Super Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2013/10/30 14:49:57
Hi Edorul-
Thanks for your hard work in building your bootloader.
I am interested in the simplest form - the UART based loader. In building the code I noticed that all the code is targeted to the standard flash memory, not the boot flash.
The UART version will fit in the larger pic32 cpus without issue, so why put it into regular flash?
Have you tried it in boot flash space?
Do you have a .LD file for the 795f512L to force the bootloader into boot flash space?
Thanks in advance
Bart
 
wonbinbk
New Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2014/11/04 02:26:39
Hi Edorul-
Need a litle help with your Tiny Bootloader+ on Linux Mint.
On my PC, it can check PIC OK. But when I tried to Program a PIC, the UI just hang up, and no communication had been made. 
I then tried the command line (with mono), and the same result happened. 
Any suggestion? I'm using Linux Mint 17 with Mono 3. My code for PIC is compiled with XC16 but I don't think the HEX file is the problem.
Anyway, thank you very much for this program. Very nice and clear instructions on the bootloader code.
João M. S. Silva
Junior Member
Re:New Serial (UART) Bootloader for Microchip PIC10/16/18 and PIC32 2015/02/18 10:36:37
Hi,
 
We tried to get most of the existing bootloaders working on a PIC18F26J50 but for one reason or the other we couldn't.
 
So we came up with a very simple bootloader (PIC side) and loader (PC side) that we wrote "from scratch" in C (only with a few assembly instructions). Maybe it can help shedding some light on the issues some of us are facing with this.
 
The bootloader and loader are available here: github.com/jmssil/Serial-PIC-Bootloader
 
Any comments and suggestions are welcomed.