This document outlines the procedure for updating the mruby/c firmware and what to do if the firmware becomes corrupted.
An additional procedure document is available.https://drive.google.com/file/d/1O62rVQrN4xbb8cWmzLj_xok-11Rifnxv/view

Preparation


Procedure using "MPLAB X IDE"

  1. Launch MPLAB X
  2. Team → git → clone
  3. Repogitory URL:https://github.com/YoshihiroOgura/-pic32mx170_mrubyc.git
  4. For DIP packages, use this circuit or kit; for surface-mount packages, connect the pickit directly to "J3".
  5. Execute write

  6. If it doesn't work, connect the USB cable to supply power or follow the steps below.

  7. Production → Set Project Configration → Custamize...
  8. Conf:[default] → Select the programmer to use from Hardware Tools (e.g., Pickit3).
  9. Apply
  10. Conf:[default] → PICkit3, etc. → Check the Power option.
  11. Apply → OK

Procedure using "MPLAB X IPE"

  1. Launch MPLAB X IPE
  2. Set the project configuration
  3. Family:32-bit MCUs (PIC32)
    Device:PIC32MX170F256B
  4. Press the "Apply" button.
  5. Connect the PC to the pickit3 or pickit4
  6. After a while, the "Tool" item will switch to PICKIT3.
  7. Select "Setting" -> "Advanced Mode". A screen like the following will be displayed.
  8. Enter [microchip] in the "Password" field and click "Log in"
  9. The screen changes and items are displayed on the left side.
  10. Access "Power"
  11. Check the box for "Power target circuit from PICkit3".
  12. Select "Operate" and return to the previous screen.
  13. Press the "Connect" button.
  14. Specify the path to "pic32_170.production.hex" in the "Hex File" field.
  15. Connect the board to the PICkit3.
  16. Click "Program" to start writing.
  17. If "Programming complete" is displayed in the "Output" field, the writing is complete.