chipKIT® Development Platform

Inspired by Arduino™

How to create a bootloader?

Created Tue, 03 Nov 2015 16:04:32 +0000 by Gary Freegard


Gary Freegard

Tue, 03 Nov 2015 16:04:32 +0000

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


majenko

Tue, 03 Nov 2015 17:14:15 +0000

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.


Gary Freegard

Tue, 03 Nov 2015 17:56:07 +0000

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


majenko

Tue, 03 Nov 2015 18:22:21 +0000

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.


EmbeddedMan

Fri, 06 Nov 2015 03:02:02 +0000

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