Although alpha:ONE comes with MicroPython preinstalled, users may want to update the firmware. Below all MicroPython firmwares for the corresponding hardware versions and revisions can be downloaded. Further is explained how to flash the firmware on the board.
MicroPython for alpha:one is a branch out of MicroPython v1.13 for pyboard v1.1, see micropython.org.
Below are listed all MicroPython firmware versions for the corresponding alpha:ONE hardware.
- alpha:ONE v1.0 Rev B:
Zadig, download here zadig.akeo.ie
dfu-util, download here dfu-util.sourceforge.net
PuTTY, download here putty.org
Zadig is used to install the USB driver needed to connect to microcontroller. dfu-util (DFU Device Firmware Update) is used to flash MicroPython on the microcontroller. PuTTY is used as a terminal for communication between host (your computer) and microcontroller.
Instruction to flash MicroPython on alpha:ONE’s microcontroller:
Install the above mentioned software.
Download the MicroPython firmware which corresponds to alpha:ONE’s hardware. Extract the compressed folder and copy the .dfu file (e.g. alphaone_v1.0_Rev_C_micropython_v1.0.dfu) in the dfu-util-0.9-win64 folder (e.g. dfu-util v0.9) - where dfu-util.exe is located.
Connect alpha:ONE to host over USB and open Zadig and install the required USB driver.
With the following steps alpha:ONE will be set in boot mode. Here are two ways of how to do that:
Set in boot mode with hardware:
Hold down the USR switch.
While still holding down USR, press and release the Reset switch.
The LEDs will then cycle green to orange to green+orange and back again.
Keep holding down USR until only the orange LED is lit, and then let go of the USR switch.
The orange LED should flash quickly 4 times, and then turn off.
Now alpha:ONE is in boot mode.
Set in boot mode with software:
No jumper are needed, just connect alpha:ONE to host over USB.
Open Device Manager (Windows), under Ports (COM & LPT) the COM port used by alpha:ONE can be find out.
Open PuTTY select Serial and type in the COM port name under Serial Line (e.g. COM10), let Speed on 9600. Then hit Open to open REPL. In the first lines in REPL the MicroPython version should be stated.
Set alpha:ONE in boot mode with:
import pyb pyb.bootloader()
PuTTY shows that REPL lost connection, alpha:ONE is now in boot mode.
Open a terminal on host, such as Command Prompt, and navigate to the dfu-util folder, where dfu-util.exe is located. Make sure that the MicroPython firmware has been copied into folder (more easy).
Check if alpha:ONE is available by typing dfu-util -l. Lines with FOUND DFU: … should appear.
Flash the MicroPython firmware with dfu-util –alt 0 -D <firmware_name.dfu>, e.g. dfu-util –alt 0 -D alphaone_v1.0_Rev_C_micropython_v1.0.dfu
Wait until the flashing is concluded. Reboot with a power cycle or pressing Reset. The firmware has been flashed successfully and alpha:ONE is ready to be programmed.
MicroPython license information¶
The MIT License (MIT)
© Copyright 2020, systematica GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.