2
0

update.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <link rel="stylesheet" href="max80.css" />
  5. <title class="update">MAX80: Update</title>
  6. <script src="max80.js"></script>
  7. </head>
  8. <body>
  9. <x-inc src="head.html"></x-inc>
  10. <h1 class="update">Update</h1>
  11. <form class="hw" id="boardid" action="sys/setboardrev" method="post"
  12. onsubmit="uploadform()" data-ref="1" data-ref-url="update.html">
  13. <fieldset>
  14. <legend>Hardware Version</legend>
  15. <label class="unlock">
  16. <b>Unlock Programming</b>
  17. <input type="checkbox" name="unlock" id="unlock" onchange="bropen()">
  18. </label>
  19. <label class="ver">
  20. <b>Hardware Version</b>
  21. <select name="boardrevs" id="boardrevs" onchange="brn()" disabled>
  22. <option value="MAX80 v1">v1.0.0</option>
  23. <option value="MAX80 v2">v2.0.0</option>
  24. <option value="MAX80 v2.0.1">v2.0.1</option>
  25. <option class="other" value="MAX80 v">other...</option>
  26. </select>
  27. <input type="text" name="max80.hw.ver" id="ver"
  28. oninput="brt()" disabled />
  29. </label>
  30. <p id="warnrev" class="warnrev hidden">Be careful: the board
  31. might fail to boot if the board revision is programmed
  32. incorrectly. In that case, reflashing via USB/serial port will
  33. be necessary.</p>
  34. <button type="submit" id="setrev" disabled>Write to flash</button>
  35. </fieldset>
  36. </form>
  37. <form id="upload" action="sys/fwupdate" method="post"
  38. onsubmit="uploadform()" data-ref="10" data-ref-url="status.html">
  39. <fieldset class="fw">
  40. <legend>Firmware</legend>
  41. <p id="norev" class="norev hidden">
  42. BOARD REVISION NOT PROGRAMMED. YOU MUST PROGRAM THE BOARD
  43. REVISION BEFORE UPDATING THE FIRMWARE. MAKE SURE YOU KNOW
  44. WHAT REVISION YOUR BOARD IS BEFORE DOING SO.
  45. </p>
  46. <input type="file" name="file" hidden accept=".fw" onchange="uploadform()" />
  47. <button type="submit" class="fromfile" id="upload.start"
  48. onclick="sib(this,'input').value=''">Update from file</button>
  49. <progress value="0"></progress>
  50. </fieldset>
  51. <output></output>
  52. <div class="onerr">
  53. <h3>Possible troubleshooting steps:</h3>
  54. <ol>
  55. <li class="retry">Try again</li>
  56. <li class="jtag">Make sure no JTAG cable is plugged in</li>
  57. <li class="power">Power cycle board (remove both USB and power off ABC host)</li>
  58. <li class="esp">Separately update ESP32 over USB before trying again</li>
  59. <li class="console">Check serial console for more detailed status messages</li>
  60. </ol>
  61. </div>
  62. <script src="update.js"></script>
  63. </form>
  64. </body>
  65. </html>