How to create a bootloader?

Talk about anything you want!
Post Reply
Gary Freegard
Posts: 13
Joined: Thu May 14, 2015 3:38 pm

How to create a bootloader?

Post by Gary Freegard » Tue Nov 03, 2015 5:04 pm

Hi

I have just got hold of an Olimex PIC32-HMZ144, which uses a PIC32MZ2048ECG144, same as FubarinoSDZ and Majenko's SDZL, and would like to create a new bootloader for it, but how do I do it? The program button is on a different pin :(

I can see that I need to change the BoardConfig.h, and I would like to use USB Serial for loading but the other two devices that are using the PIC32MZ are usings UART is there a reason for this, i.e. bootloading via USB doesnt work?

Thanks

Gary

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: How to create a bootloader?

Post by majenko » Tue Nov 03, 2015 6:14 pm

There is no USB on the MZ chips yet, so you have no choice but to use UART serial.

If you grab the very latest version of the bootloader code you will have the results of a pull request I submitted earlier today. This breaks out the configurations into sub-files to make it easier to find the configuration you want.

Making a whole new configuration in MPLAB-X is a bit of a pain - you have to duplicate an existing one, change the board definition, then copy the whole existing configuration and change the board definition used to select it.

For just a one-off where you need to change a button pin it's easier to just change the existing configuration without making a whole new one.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

Gary Freegard
Posts: 13
Joined: Thu May 14, 2015 3:38 pm

Re: How to create a bootloader?

Post by Gary Freegard » Tue Nov 03, 2015 6:56 pm

Hi
There is no USB on the MZ chips yet, so you have no choice but to use UART serial.
:o
Why is this? Just looked at the errata and can see there is some issues with USB but they do have a work around.

And olimex has designed the board with a mini USB connector.

It's not all bad as I do have some FTDI modules around that I can use, once I have created a new bootloader.

Gary

User avatar
majenko
Site Admin
Posts: 2165
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: How to create a bootloader?

Post by majenko » Tue Nov 03, 2015 7:22 pm

It's purely because we haven't yet written the software to support USB on the MZ chips. It's a work in progress at the moment.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

EmbeddedMan
Posts: 597
Joined: Tue May 24, 2011 9:24 pm
Location: Minneapolis, MN
Contact:

Re: How to create a bootloader?

Post by EmbeddedMan » Fri Nov 06, 2015 4:02 am

Gary,

USB for MZ parts does exist, but it's not an open source driver, and so we can't use it in chipKIT. We are working on a solution to this problem, and are getting close - we just can't get the MZ's USB interrupts to fire properly.

*Brian

Post Reply