All Projects → thotypous → mikroe-uhb

thotypous / mikroe-uhb

Licence: MIT License
USB HID Bootloader programming tool for devices manufactured by MikroElektronika

Programming Languages

python
139335 projects - #7 most used programming language
awk
318 projects
Makefile
30231 projects

Projects that are alternatives of or similar to mikroe-uhb

Awesome Embedded
A curated list of awesome embedded programming.
Stars: ✭ 831 (+5440%)
Mutual labels:  microcontroller, embedded, bootloader
pumbaa
Python on Simba.
Stars: ✭ 61 (+306.67%)
Mutual labels:  microcontroller, embedded
Embedded UKF Library
A compact Unscented Kalman Filter (UKF) library for Teensy4/Arduino system (or any real time embedded system in general)
Stars: ✭ 31 (+106.67%)
Mutual labels:  microcontroller, embedded
circuitpython
CircuitPython - a Python implementation for teaching coding with microcontrollers
Stars: ✭ 3,097 (+20546.67%)
Mutual labels:  microcontroller, embedded
Berry
A ultra-lightweight embedded scripting language optimized for microcontrollers.
Stars: ✭ 206 (+1273.33%)
Mutual labels:  microcontroller, embedded
mTower
mTower is Trusted Execution Environment specially designed to be used on MicroController Units (MCUs) supporting ARM TrustZone technology (e.g., Cortex-M23/33/35p). mTower operates well under restrictions typical for such environment – small RAM and ROM sizes, relatively low performance, absence of rich OSes providing variety of services availab…
Stars: ✭ 34 (+126.67%)
Mutual labels:  microcontroller, bootloader
xForth
Experimental Forth cross compiler for tiny devices
Stars: ✭ 53 (+253.33%)
Mutual labels:  microcontroller, embedded
Lib Python
Blynk IoT library for Python and Micropython
Stars: ✭ 140 (+833.33%)
Mutual labels:  microcontroller, embedded
AutomationShield
Arduino library and MATLAB/Simulink API for the AutomationShield Arduino expansion boards for control engineering education.
Stars: ✭ 22 (+46.67%)
Mutual labels:  microcontroller, embedded
mdepx
MDEPX — A BSD-style RTOS
Stars: ✭ 17 (+13.33%)
Mutual labels:  microcontroller, embedded
embLua
Lua for microcontrollers
Stars: ✭ 23 (+53.33%)
Mutual labels:  microcontroller, embedded
Littlefs
A little fail-safe filesystem designed for microcontrollers
Stars: ✭ 2,488 (+16486.67%)
Mutual labels:  microcontroller, embedded
Nrf Hal
A Rust HAL for the nRF family of devices
Stars: ✭ 186 (+1140%)
Mutual labels:  microcontroller, embedded
ewok-kernel
A secure and high performances microkernel for building secure MCU-based IoTs
Stars: ✭ 69 (+360%)
Mutual labels:  microcontroller, embedded
Micropython
MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems
Stars: ✭ 13,439 (+89493.33%)
Mutual labels:  microcontroller, embedded
lwjson
Lightweight JSON parser for embedded systems
Stars: ✭ 66 (+340%)
Mutual labels:  microcontroller, embedded
lwprintf
Lightweight printf library optimized for embedded systems
Stars: ✭ 98 (+553.33%)
Mutual labels:  microcontroller, embedded
Tiny Json
The tiny-json is a versatile and easy to use json parser in C suitable for embedded systems. It is fast, robust and portable.
Stars: ✭ 127 (+746.67%)
Mutual labels:  microcontroller, embedded
Chino Os
A real time operating system for IoT written in C++
Stars: ✭ 139 (+826.67%)
Mutual labels:  microcontroller, embedded
nrf52832-pac
Peripheral Access Crate for the nRF52832 microcontroller
Stars: ✭ 21 (+40%)
Mutual labels:  microcontroller, embedded

mikroe-uhb

Open-source cross-platform USB HID Bootloader programming tool for devices manufactured by MikroElektronika.

Supported devices

ARM devices

This project was tested with a Mikromedia for STM32 development kit. However, from what I understand of the bootloader source code and by reverse engineering the mikroBootloader application supplied by the manufacturer, I believe it should work for any ARM-based development kit currently available from MikroElektronika.

If you plan to test this application using any development kit different from the STM32 ones, please be prepared to use JTAG if something goes wrong (although the bootloader itself has a protection code which should bar most mistakes).

PIC18 devices

This project was tested with a PIC18F4550 device. Many thanks to Kerekes Szilard for providing USB captures and further information.

dsPIC and PIC24 devices

This project was tested with a Mikromedia for dsPIC33EP development kit. Many thanks to Toni Petrovič for providing USB captures and further information.

PIC24 devices were still not tested, but should also be supported by the same backend, as the architectures are much similar and reverse engineering revealed almost identical handling of them by mikroBootloader.

PIC32 devices

This project was tested with a MultiMedia Board for PIC32MX7 development kit. Many thanks to John Comeau for implementing the support and providing us with patches and testing data. It is also reported to work with Mikroelektronika Mini-32.

How to install

On Linux

First, you need to check if you have python-setuptools installed. Then, just run:

make && sudo make install

This application is compatible both with Python 2.7 and with Python 3. The pyudev module is required, but will be installed automatically if it is not already present.

On Windows

We provide standalone binary releases here. Just download the executable and use it. Take a look at the wiki if you want to build your own executable.

On other operating systems

Other operating systems were not tested yet, but the tool should work on any OS supported by cython-hidapi, like OSX and FreeBSD. Try to run python setup.py install. If other steps are needed, please contact us so that the documentation can be updated.

How to use

Printing information about the device

If you just want to see information about a development kit, without programming anything, run:

mikroe-uhb

You need to unplug/plug or reset the kit after issuing the command above, because this application is solely able to talk with the bootloader firmware, which runs only when the device is starting up.

Programming the device

To program a hex file to the device, call:

mikroe-uhb -v file.hex

Then plug the device to the USB port, or press its reset button if it is already plugged to USB.

The -v option is meant to print debugging information during the programming process. It can be ommited if you prefer the programming process to be silent.

How to contribute

Support for other devices

I do not own development kits from MikroElektronika other than the Mikromedia for STM32, so I cannot test this project with other devices. However, support for them is certainly welcome.

Code should be self-documenting. There are also some useful tools for dealing with USB captures made with Wireshark under the devtools directory. Please read the comments.

If you cannot contribute with code, providing USB capture dumps is very useful. They can be obtained the following way:

  • Install this application in your computer, or at least copy the conf/mikroe-uhb.conf file to /etc/modprobe.d. It is meant to prevent your system from detecting the USB HID Bootloader as a usbtouchscreen and messing things up.
  • Install mikroBootloader in a Windows VM inside VirtualBox or other virtualization software with decent USB emulation support.
  • Load the usbmon module (modprobe usbmon) and use Wireshark to start a USB capture. Then, fire mikroBootloader and program your device.
  • Please provide me with the capture file saved by Wireshark and with the hex file you used to program your device.

You can also take USB captures directly on Wireshark for Windows if you install the usbpcap driver and follow the instructions in its website. Please do not forget to use a Wireshark version able to support the driver.

Testing with another development kits

Contributions have helped us to implement support for almost every device currently manufactured by MikroElektronika, but more testing is needed. Please report if you test the tool with another development kit besides the ones enumerated in this document.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].