Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web serial firmware update tool added #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ The pre-built hex file is for ATMega 328P@16MHz; to use a different MCU of the s

When building for Logic Green AVR clones, select "atmega328p" as target. The macro ARDUINO_AVR_LARDU_328E must also be defined, either in the "sys.h" file (using #define) or in the gcc command line (by adding -DARDUINO_AVR_LARDU_328E). This allows the code to know the target is a LGT chip, and set the chip core speed at run time from F_CPU. Recommended values for F_CPU are 32MHz or 16MHz; 8MHz also works but is less reliable.

## Loading Pre-Built hex file to an Arduino Nano using Web Serial

For certain browsers with support for Web Serial APIs (e.g. chrome) you can opt to use the web based serial uploader to upload the above prebuilt binaries that were created with avr-gcc.

[Click Here To Access The Web Serial Arduino Nano Flasher](./tools/webSerialUploader)


## Building with Arduino IDE

Expand Down
59 changes: 59 additions & 0 deletions tools/webSerialUploader/Blink.ino.eightanaloginputs.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
:100000000C945C000C946E000C946E000C946E00CA
:100010000C946E000C946E000C946E000C946E00A8
:100020000C946E000C946E000C946E000C946E0098
:100030000C946E000C946E000C946E000C946E0088
:100040000C9413010C946E000C946E000C946E00D2
:100050000C946E000C946E000C946E000C946E0068
:100060000C946E000C946E00000000002400270029
:100070002A0000000000250028002B0004040404CE
:100080000404040402020202020203030303030342
:10009000010204081020408001020408102001021F
:1000A00004081020000000080002010000030407FB
:1000B000000000000000000011241FBECFEFD8E0B8
:1000C000DEBFCDBF21E0A0E0B1E001C01D92A930AC
:1000D000B207E1F70E945D010C94CC010C94000082
:1000E000E1EBF0E02491EDE9F0E09491E9E8F0E053
:1000F000E491EE23C9F0222339F0233001F1A8F472
:10010000213019F1223029F1F0E0EE0FFF1FEE58F7
:10011000FF4FA591B4912FB7F894EC91811126C0AF
:1001200090959E239C932FBF08952730A9F02830E7
:10013000C9F0243049F7209180002F7D03C0209121
:1001400080002F7720938000DFCF24B52F7724BD48
:10015000DBCF24B52F7DFBCF2091B0002F772093EC
:10016000B000D2CF2091B0002F7DF9CF9E2BDACFF7
:100170003FB7F8948091050190910601A091070185
:10018000B091080126B5A89B05C02F3F19F0019634
:10019000A11DB11D3FBFBA2FA92F982F8827BC01E1
:1001A000CD01620F711D811D911D42E0660F771F09
:1001B000881F991F4A95D1F708958F929F92AF9209
:1001C000BF92CF92DF92EF92FF920E94B8004B0154
:1001D0005C0188EEC82E83E0D82EE12CF12C0E9421
:1001E000B800681979098A099B09683E734081053E
:1001F0009105A8F321E0C21AD108E108F10888EEC0
:10020000880E83E0981EA11CB11CC114D104E10426
:10021000F10429F7FF90EF90DF90CF90BF90AF905F
:100220009F908F9008951F920F920FB60F921124F6
:100230002F933F938F939F93AF93BF93809101012F
:1002400090910201A0910301B0910401309100014D
:1002500023E0230F2D3758F50196A11DB11D2093E2
:1002600000018093010190930201A0930301B093D8
:1002700004018091050190910601A0910701B091C0
:1002800008010196A11DB11D8093050190930601FF
:10029000A0930701B0930801BF91AF919F918F91F7
:1002A0003F912F910F900FBE0F901F90189526E849
:1002B000230F0296A11DB11DD2CF789484B5826020
:1002C00084BD84B5816084BD85B5826085BD85B5FA
:1002D000816085BD80916E00816080936E00109278
:1002E00081008091810082608093810080918100F3
:1002F0008160809381008091800081608093800084
:100300008091B10084608093B1008091B0008160E1
:100310008093B00080917A00846080937A0080910D
:100320007A00826080937A0080917A008160809365
:100330007A0080917A00806880937A001092C100E0
:10034000EDE9F0E02491E9E8F0E08491882399F068
:1003500090E0880F991FFC01E859FF4FA591B491D7
:10036000FC01EE58FF4F859194918FB7F894EC9172
:10037000E22BEC938FBFC0E0D0E081E00E947000E0
:100380000E94DD0080E00E9470000E94DD00209746
:0C039000A1F30E940000F1CFF894FFCF11
:00000001FF
2 changes: 2 additions & 0 deletions tools/webSerialUploader/arduino-web-uploader.v1.1.2.js

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions tools/webSerialUploader/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>WebSerial Arduino Nano Flasher</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- <script src="https://github.com/dbuezas/arduino-web-uploader/releases/download/v1.1.2/main.js"></script> -->
<script src="./arduino-web-uploader.v1.1.2.js"></script>
</head>

<body>
<h1> WebSerial Arduino Nano Flasher</h1>
This page is here to make it easier for those who would like to load in a precompiled binary for an arduino nano instead.
<br>
You will need to open this page on a browser that supports WebSerial API, such as google chrome.
<br>
<a href="../../">Click Here To Jump Back To Readme</a>

<h2> Load Main Application Firmware </h2>
<button arduino-uploader hex-href="../../build/JTAG2UPDI.hex" board="nano" verify>
Upload JTAG2UPDI v3.2.1 to nano/uno/pro/pro-mini [<span class="upload-progress"></span>]
</button>
<br>
<button arduino-uploader hex-href="../../build/JTAG2UPDI.hex" board="nanoOldBootloader" verify>
Upload JTAG2UPDI v3.2.1 to nano with old bootloader (most chinese clones) [<span class="upload-progress"></span>]
</button>

<h2> Test blink Firmware (For Sanity Check) </h2>
<button arduino-uploader hex-href="./Blink.ino.eightanaloginputs.hex" board="nano" verify>
Upload Test Blink Firmware to nano/uno/pro/pro-mini [<span class="upload-progress"></span>]
</button>
<br>
<button arduino-uploader hex-href="./Blink.ino.eightanaloginputs.hex" board="nanoOldBootloader" verify>
Upload Test Blink Firmware to nano with old bootloader (most chinese clones) [<span class="upload-progress"></span>]
</button>


<h2> Source arduino-web-uploader </h2>

The webserial uploader source code is from <a href="https://github.com/dbuezas/arduino-web-uploader">https://github.com/dbuezas/arduino-web-uploader</a>

</body>
</html>