Skip to content

aikudo/PIC24-HID-Bootloader-QT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QT USB HID Bootloader for PIC24

Allows you integrate USB HID Bootloader into your QT software.

Our project is based on Microchip Libraries for Applications v2013-06-15. That package contains HID Bootloader demo project which located in following folder

C:\MLA\USB\Device - Bootloaders\HID\software_cross_platform

We have refactored that project (split GUI and bootloader) to let your QT app operate with Microchip protocol using our shared classes. Also we extended bootloader with some useful functions like separate device read, write, verify, save to file, work with specified memory ranges etc.

All the code related to Microchip bootloader protocol was kept untouched and compatible with original MLA demo.

Build project with QT Creator 5.2

  1. Remove all *.pro.user files from all project subfolders
  2. Clear /build directory
  3. Open PIC24-HID-Bootloader.pro in QT Creator
  4. In project settings dialog leave only Desktop Qt 5.*.* MinGW 32bit checkbox and name building directories as PIC24-HID-Bootloader/build/Debug and PIC24-HID-Bootloader/build/Release

Firmware

We tested our project on PIC24F Starter Kit and custom PIC24FJ256GB106 device. Appropriate MCU sources are attached in this repository. Original MLA package also contain sources for other MCU families.

Testing the demo app with PIC24F Starter Kit

  1. Use MPLAB.X IDE to build bootloader program and flash to PIC24F Starter Kit device
  2. Turn analog potentiometer counter-clockwise and run app (LED should be white)
  3. Run QT bootloader app, it should say it's disconnected.
  4. Plug Starter Kit to PC via USB slave cable. LED should blink purple, app notify it's connected.
  5. Open user_program.hex (download here or build from sources)
  6. Click Erase/Write/Verify
  7. Turn potentiometer clockwise and reset device, if LED blinks yellow means user program flashed successfully
  8. Turn potentiometer back to bootloader mode (counter-clockwise) and reset device
  9. Click Read Device and than Save Memory Range to binary file

TODO

  1. Export memory dump to HEX format
  2. Customize Microchip protocol with stream encryption (AES or XTEA)
  3. Open source of Android USB accessory bootloader (contact us for details)

About

Allows integrate USB HID Bootloader into your QT software

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 53.4%
  • C++ 43.2%
  • Makefile 2.3%
  • Other 1.1%