README 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. fsusb: Software to control the bootloader that comes factory-loaded on
  2. the "PICDEM Full Speed USB" demo board.
  3. Rick Luddy (GPG 1024D/98AA0510) <rickluddy@gmail.com>
  4. Usage:
  5. fsusb <file> program board with <file> and verify
  6. fsusb --program <file> program board with <file> and verify
  7. fsusb --verify <file> verify board against <file>
  8. fsusb --read <file> read board, saving result in <file>
  9. Building:
  10. Just "make" ought to build it, assuming you have libusb and the
  11. associated headers installed.
  12. Caveats:
  13. I have been a bit sloppy with endianness. It works on my x86 system,
  14. but may run into some problems on an opposite system.
  15. I haven't tested the ability to write config memory. I don't have a
  16. programmer to turn off the factory-set write protection (as if I did,
  17. I probably wouldn't need this program in the first place!). It is
  18. implemented (just uncomment a few lines in program_file() in main.c)
  19. and should /probably/ work or at least come close, but no promises.
  20. I haven't implemented a way to read or write the EEPROM. I'm not sure
  21. how it would be represented in the hex file.
  22. It must be either run as root or set suid root to function because of
  23. the way it uses the USB. This means if I made a mistake and have a
  24. buffer overflow somewhere, the software is a local root vulnerability.
  25. I think I haven't made any such mistakes.
  26. Special thanks:
  27. Parts of the USB code and the Makefile were cribbed from usb_pickit by
  28. Orion Sky Lawlor <olawlor@acm.org>. Most of the figuring out the
  29. protocol was done by working backwards from the firmware bootloader
  30. code by Rawin Rojvanit at Microchip.