ds30 Loader - open source bl for PIC18 / PIC24 / dsPIC

Support for Bloader and Screamer

Moderator: phalanx

ds30 Loader - open source bl for PIC18 / PIC24 / dsPIC

Postby pheer » Tue Sep 22, 2009 10:50 am

Hi,
I just wanted you to know that there exist an easy to use open source
bootloader that supports almost all Microchip devices in one package.

Each firmware for a device family supports all current devices in that
family without modification of the actual code. Only minor settings needs to be changed in a separate file.

It supports the following familys: PIC18F, PIC18FJ , PIC24F, PIC24FJ,
PIC24H dsPIC30F, dsPIC33F. Se the homepage for more info
http://picbootloader.com


Micke
Last edited by pheer on Fri Aug 28, 2015 11:25 pm, edited 1 time in total.
pheer
 
Posts: 11
Joined: Tue Sep 22, 2009 10:43 am

Documentation?

Postby hpux735 » Sun Nov 15, 2009 2:47 pm

I've been trying to get setup with this bootloader, but I'm having trouble locating complete documentation.

For example, what is the sequence of events?
How, exactly, do you get started?
What should I expect from the booting process?

I've got the code loaded up in MPLAB, and loaded on the device, but the GUI doesn't report sensical values. I've tried different baud rates, making sure that they match, and that hasn't helped.

Any help would be appreciated, Thanks!
hpux735
 
Posts: 10
Joined: Sun Nov 15, 2009 2:42 pm

Postby pheer » Mon Nov 16, 2009 9:06 am

I understand you're having trouble locating the manual, beceause it
doesn't exist. :oops: I've been thinking of writing a proper manual to the
next release.

Please send me the entire mplab project of the modified firmware and I'll
take a look at it.

Email: micke82 at hotmail dot com
pheer
 
Posts: 11
Joined: Tue Sep 22, 2009 10:43 am

Postby hpux735 » Mon Nov 16, 2009 9:15 am

I was able to figure out that I was supposed to modify the "User init" section in the ds30loader.asm file to match the FOSC, etc. in the settings file. That got me far enough that the GUI talked to the bootloader code. I'm still confused about whether, when loading a file is complete, the bootloader jumps to the application code, or whether I need to reboot the PIC again.

Also, is there a description of the communication protocol? I'm primarily a Mac user, so I'd like to code-up a Mac GUI.

Thanks!
hpux735
 
Posts: 10
Joined: Sun Nov 15, 2009 2:42 pm

Postby pheer » Mon Nov 16, 2009 9:26 am

The gui should run on Mac using Mono, check the Linux / Mac page on the
homepage.

No you don't need to reboot the PIC, it will jump to the user application
after the timeout that will occur after download.

Thanks for the input, I'll answer your question in the coming manual.
pheer
 
Posts: 11
Joined: Tue Sep 22, 2009 10:43 am

Postby hpux735 » Mon Nov 16, 2009 10:04 am

I was able to get the GUI up using mono, however it isn't clear how to match the COM1, COM2, etc. from windows to /dev/tty.usbserial on the mac. How did you do this on the ubuntu test?
hpux735
 
Posts: 10
Joined: Sun Nov 15, 2009 2:42 pm

Postby pheer » Mon Nov 16, 2009 11:50 am

If your com-ports aren't recognized just type in the portname in the port
textbox. In Ubuntu, ports were detected correctly I believe.
pheer
 
Posts: 11
Joined: Tue Sep 22, 2009 10:43 am

Postby hpux735 » Mon Nov 16, 2009 7:01 pm

Thanks, that appears to, kinda, work. I can see activity lights on my board from serial activity. It doesn't correctly detect the board, but I'll figure that out later. I'm working on debugging some other problems at the moment. (My very simple project works correctly with the ICD2, but not with the bootloader, it appears that the oscillator ends up in a different state because the baud rate is some other value)

Anyway, thanks for putting this stuff together. I'm excited about being able to update firmware w/o the ICD2 in the future!
hpux735
 
Posts: 10
Joined: Sun Nov 15, 2009 2:42 pm

Postby pheer » Tue Nov 17, 2009 9:50 am

Sweet! I'm looking forward to have a confirmed Mac user =)
Let me know any progress.
pheer
 
Posts: 11
Joined: Tue Sep 22, 2009 10:43 am

Postby hpux735 » Tue Nov 17, 2009 11:38 am

I have a question...

It looks like the "loadusr" section is located just before the STARTADDR address.
Wouldn't that imply that when the user code should be loaded we just run into the bootloader again?
I couldn't find a goto to 0x002 (or something like that, just after the goto to the bootloader) that would actually load the user program.

Thanks.
hpux735
 
Posts: 10
Joined: Sun Nov 15, 2009 2:42 pm

Postby hpux735 » Tue Nov 17, 2009 2:08 pm

So, I figured that part out. After examining the program memory (downloaded after the bootloader wrote to it using the ICD2) I noticed that the bootloader was rewriting both places with the appropriate program memory addresses...

I'm still trying to figure out what's going on with the oscillator...
hpux735
 
Posts: 10
Joined: Sun Nov 15, 2009 2:42 pm

Postby hpux735 » Tue Nov 17, 2009 3:30 pm

I figured out the problem.

Correct me if I'm wrong, but it appears that it is important to set the config bits you want when you program the device with the bootloader. This way, when you load your program onto the device, the bootloader doesn't need to set them (it isn't recommended for some reason). I've got my oscillator working correctly now.

Thanks again. Hopefully these posts help others starting out with the bootloader. I'm still interested in developing a native Mac OS GUI, maybe I'll try to reverse-engineer the .net GUI code and bootloader asm.
hpux735
 
Posts: 10
Joined: Sun Nov 15, 2009 2:42 pm

Postby pheer » Wed Nov 18, 2009 6:29 am

If you make no other customizations to the bootloader it's most likely important to not write configs. I'll probably cover this topic in the manual.

Can you send me a screenshot of the gui in Mac OS X?

The next release (coming soon) will also contain a commandline tool, with the same features as the gui.
pheer
 
Posts: 11
Joined: Tue Sep 22, 2009 10:43 am

Postby hpux735 » Wed Nov 18, 2009 9:23 am

Image

With the config settings, I see what you mean. I fear I wasn't clear. What I was saying was that if I want some other config settings, I should set them in MPLAB and load them onto the device at the same time as I load the bootloader onto it. This is opposed to loading the config settings with the bootloader.
hpux735
 
Posts: 10
Joined: Sun Nov 15, 2009 2:42 pm

Postby pheer » Thu Nov 26, 2009 7:32 am

Manuals are now available for download on the homepage.
Also the latest gui (1.3.2) should work better in Linux and Mac OS X.
pheer
 
Posts: 11
Joined: Tue Sep 22, 2009 10:43 am

Next

Return to Boot Loading

Who is online

Users browsing this forum: No registered users and 1 guest