pyMCU v1.0

pyBootloader

What is pyBootloader?

PyBootloader is a special bootloader that allows you to program new firmware to the pyMCU without additional hardware using a simple cross platform python script.

If your pyMCU came pre-loaded with firmware v1.0.8 or higher then you can update your firmware to the latest version when it comes out using the pyBootProgrammer.py script.
you can check your current pyMCU Firmware version by doing the following in python:
import pymcu
mb = pymcu.mcuModule()
mb.mcuInfo()

That will print out info about your pyMCU including the current hardware firmware version



Putting pyMCU into bootloader mode

First off you will need to make sure your pyMCU is in bootloader mode.
The easiest way to do that is to put a resistor from PWM1 to VCC pulling the pin High.
I've used a 3.3K Ohm resistor in the example below but any Ohm resistor will work.
How to use pyBootProgrammer python script

Once in bootloader mode you can program your pyMCU with the latest firmware.
Download pyBootProgrammer if you don't already have it.
Then download the latest firmware if you haven't already, you can get the link to the download and be sure you have the latest version by going to the Version Info Page

Now that you have the programming script and the latest firmware you are ready to update your pyMCU.
From a command prompt run the following command (on windows this is assuming you have your path environment variable set to include your version of python installed, if not you will need to add the entire path to the python executable in the example below)
python c:\downloads\pyBootProgrammer.py -f c:\downloads\pymcu_1_0_8_PIC.hex

You will need to change the path to the pyBootProgrammer.py to reflect your actual location on disk as well as the path to the pymcu firmware hex file.
You can also run pyBootProgrammer with -h to get a help on the available commands.

Once programming is complete remove the resistor to exit the bootloader and load the programmed code.

pyBootloader and pyBootProgrammer are not just limited to pyMCU firmware updates you can use it to load your own code onto the MCU you just have to make sure you set your start address to 0x1C0 so your own program will get properly executed by the bootloader.


How to use pyBootProgrammer GUI app

Once in bootloader mode another option for programming a new firmware or your own custom code is to use the GUI app for programming.
If you have any question feel free to contact me.
Or check the Forums
 
The app is available for Windows, OSX, and Linux.
You can grab the current version over on the Version Info Page
Once you have it running use the File button to browse to and select the appropriate Hex file.
Once selected press the Program button, if the pyMCU is properly detected in bootloader mode you will see info in the Status field and progress on the progress bar.