File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Only works on NPCX EC chips
4+ # Every Framework system, except 11-13th Gen Intel
5+ #
6+ # Using bare UART adapter with manual reset/flashmode buttons
7+ # Usage:
8+ # 0. Connect USB-UART adapter to EC UART (TX, RX, GND)
9+ # 1. Hold down flashmode button (5.1k from EC UART TX to GND)
10+ # 2. Press and release EC reset button (RST short to GND)
11+ # 3. Run this script to flash
12+ # ./flash_manual_ec.sh ~/Downloads/sunflower/
13+ # Where the folder contains ec.bin and npcx_monitor.bin
14+ # If the adapter shows up at a different port, set it in an environment variable:
15+ # env FLASHUART=ttyUSB1 ./flash_manual_ec.sh ~/Downloads/sunflower/
16+ # 4. Press and release EC reset button to boot EC again
17+
18+ FLASHUART=ttyUSB0
19+
20+ FLASH_SRC=" $1 /ec.bin"
21+ MONITOR=" $1 /npcx_monitor.bin"
22+ echo " USING ${FLASH_SRC} to flash EC"
23+
24+ # ### DO FLASH
25+ echo " Using NUVOTON Tool ./uartupdatetool"
26+ ./uartupdatetool --port ${FLASHUART} --opr wr --addr 0x200c3020 --file ${MONITOR}
27+ ./uartupdatetool --port ${FLASHUART} --opr wr --auto --addr 0x0000 --file ${FLASH_SRC}
You can’t perform that action at this time.
0 commit comments