The Godfather talking
Share your stuff or I will make you regret it.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 18, 2024, 12:56:06 12:56


Login with username, password and session length


Pages: [1]
Print
Author Topic: PIC bootloader with Linux software?  (Read 7728 times)
0 Members and 1 Guest are viewing this topic.
Cain
Junior Member
**
Offline Offline

Posts: 81

Thank You
-Given: 165
-Receive: 102


« on: May 28, 2013, 06:30:04 18:30 »

Anyone recommending a good bootloader for PIC16F/PIC18F with working Linux software?

I've been testing the Tiny Bootloader and it works great to download new HEX-files on Windows but trying to find a working Linux software have been proving to be hard. Piklab supports Tiny Bootloader but have problems compiling/running on headless machines (relies on KDE) and when testing the Windows build of piklab-prog it's slow as hell, takes ~30 second before it finds the PIC and starts downloading anything...

Are there anything that works as good as OptiBoot and avrdude for the PIC?
« Last Edit: May 28, 2013, 06:40:36 18:40 by Cain » Logged
Gallymimu
Hero Member
*****
Offline Offline

Posts: 704

Thank You
-Given: 151
-Receive: 214


« Reply #1 on: May 29, 2013, 03:57:53 15:57 »

Did you see these lists?

Supposedly these have linux host programs:
http://www.microchip.com/forums/m424874-print.aspx

the next one claims to have a shell script for bootloading but this is an HID bootloader (USB)
http://elco.crsndoo.com/wordpress/2011/03/microchip-hid-bootloader-from-linux/

Here is one for tiny bootloader written in python if you haven't tried it yet.
http://sourceforge.net/projects/tinybldlin/

Logged
Sideshow Bob
Cracking Team
Hero Member
****
Offline Offline

Posts: 982

Thank You
-Given: 230
-Receive: 960



« Reply #2 on: May 29, 2013, 06:35:25 18:35 »

Would it not be more easy to get a PICKIT or clone. And then use MPLABX that now are supported by Linux. As this solutions also offer some debugging. I think MPLABX now support PICKIT2. And PICKIT2 clones are quite cheap now. PICKIT2 do not support all PICs. But still the support list is more than adequate
Logged

I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
Gallymimu
Hero Member
*****
Offline Offline

Posts: 704

Thank You
-Given: 151
-Receive: 214


« Reply #3 on: May 29, 2013, 07:32:22 19:32 »

I assumed he actually needed a bootloader for an application, but otherwise Bob you are quite right, much easier!
Logged
Cain
Junior Member
**
Offline Offline

Posts: 81

Thank You
-Given: 165
-Receive: 102


« Reply #4 on: May 30, 2013, 06:00:12 06:00 »

Thanks for the input but as mentioned above I need to be able to flash the PIC via serialports on a headless machine (i.e CLI only) running Debian. I have PICKit2 and 3 but doesn't solve this problem and MPLABX requires X to run.

I do this with AVR's using avrdude and it works great and was hoping to find a simlilar working "picdude" sofware. Preferable in plain C since flash space is very limited so trying to avoid heavy packages like Phyton/Perl etc.

Last night I found C code for a CLI program (written by Joseph Heenan) but unfortunately it does not work! It compiles OK on Debian (armel) but fails to detect the PIC18F2620 running Tiny Bootloader, same HW works in Windows when I try it there using tinybldWin.exe.

Anyone have this working on Linux?

http://code.google.com/p/pic-bootloaders/downloads/list

Logged
Sideshow Bob
Cracking Team
Hero Member
****
Offline Offline

Posts: 982

Thank You
-Given: 230
-Receive: 960



« Reply #5 on: May 30, 2013, 08:48:55 08:48 »

I am not a linux person. But I think Microchip have made a command line tool to run under Linux for both PICKIT 2 and PICKIT 3. Just google "pickit 2 command line" or "pickit 3 command line"
Logged

I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
Gallymimu
Hero Member
*****
Offline Offline

Posts: 704

Thank You
-Given: 151
-Receive: 214


« Reply #6 on: May 30, 2013, 02:35:13 14:35 »

Thanks for the input but as mentioned above I need to be able to flash the PIC via serialports on a headless machine (i.e CLI only) running Debian. I have PICKit2 and 3 but doesn't solve this problem and MPLABX requires X to run.

I do this with AVR's using avrdude and it works great and was hoping to find a simlilar working "picdude" sofware. Preferable in plain C since flash space is very limited so trying to avoid heavy packages like Phyton/Perl etc.

Last night I found C code for a CLI program (written by Joseph Heenan) but unfortunately it does not work! It compiles OK on Debian (armel) but fails to detect the PIC18F2620 running Tiny Bootloader, same HW works in Windows when I try it there using tinybldWin.exe.

Anyone have this working on Linux?

http://code.google.com/p/pic-bootloaders/downloads/list

Anyone recommending a good bootloader for PIC16F/PIC18F with working Linux software?

I've been testing the Tiny Bootloader and it works great to download new HEX-files on Windows but trying to find a working Linux software have been proving to be hard. Piklab supports Tiny Bootloader but have problems compiling/running on headless machines (relies on KDE) and when testing the Windows build of piklab-prog it's slow as hell, takes ~30 second before it finds the PIC and starts downloading anything...

Are there anything that works as good as OptiBoot and avrdude for the PIC?



Where exactly did you mention needing to use the serial port in your original post?

Kinda frustrating to offer help when you don't even ask the right question!

Good luck.
Logged
Cain
Junior Member
**
Offline Offline

Posts: 81

Thank You
-Given: 165
-Receive: 102


« Reply #7 on: May 31, 2013, 06:00:59 18:00 »

Where exactly did you mention needing to use the serial port in your original post?

My bad! As you spotted I did not specifiy serial port in my first post but we all make misstakes, sorry Wink

Anyway, thanks for the input so far to both of you but the PICkit 2/3 is not the solution! After some more testing the PIC Tiny Bootloader work nicely on Windows all I need to find is some software that runs equally well on Linux (Debian).

Wished I had the C skill to fix whats broken in Joseph Heenan's program...

« Last Edit: May 31, 2013, 06:10:14 18:10 by Cain » Logged
ChumKiuFoshan
Inactive

Offline Offline

Posts: 2

Thank You
-Given: 4
-Receive: 1


« Reply #8 on: August 30, 2019, 05:39:06 17:39 »

Just for future reference, if someone have interest in this stuff, here below a link for a Python script that is able to work (tested practically) with the TinyBootloader under Linux.

https://sourceforge.net/projects/tinybldlin/files/

I've tested it in a RPi2 model B with Python 2.7, connection was through the serial port.

This link was already written above but this is just to put in evidence that this is able to work nicely inside a RPi environment.

Bye
« Last Edit: August 30, 2019, 05:56:04 17:56 by ChumKiuFoshan » Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC