File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-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+ # Useful to combine with the gh command
19+ # > gh run download -R FrameworkComputer/ec -D temp
20+ # > ./flash_manual_ec.sh temp/
21+ # Or with chromium chroot build
22+ # > ./flash_manual_ec.sh ~/chromiumos/src/platform/ec/build/zephyr/marigold/output/
23+
24+ FLASHUART=ttyUSB0
25+
26+ FLASH_SRC=" $1 /ec.bin"
27+ MONITOR=" $1 /npcx_monitor.bin"
28+ echo " USING ${FLASH_SRC} to flash EC"
29+
30+ # ### DO FLASH
31+ echo " Using NUVOTON Tool ./uartupdatetool"
32+ ./uartupdatetool --port ${FLASHUART} --opr wr --addr 0x200c3020 --file ${MONITOR}
33+ ./uartupdatetool --port ${FLASHUART} --opr wr --auto --addr 0x0000 --file ${FLASH_SRC}
You can’t perform that action at this time.
0 commit comments