The scooter's warranty will be voided!
You perform these actions at your own risk. Possible consequences:
- VCU controller failure
- Unstable scooter performance
| Component | Location | Purpose |
|---|---|---|
| Dump / flash scripts | fix_vcu/ (this repo) |
ST-Link + bundled openocd.exe (Windows) and oocd/scripts/ |
| Dump editor | change_sn project |
Patch MEMORY_G3*.bin: SN, firmware key, SHU prep |
The release package ships the editor binary as fix_vcu-<os>-<arch> (historical build name from the change_sn repo). Use it together with the dump/flash scripts from this folder.
Target MCU: AT32F415CBT7 (128 KB flash).
-
Hardware:
- ST-Link v2 programmer
- DUPON cables
- Soldering iron (for TP13V3 contact)
-
Software:
- [STLink driver]
- Release —
fix_vcu-…binary (dump editor) + dump/flash scripts
- Install the ST-Link driver (
dpinst_amd64.exeif included in the release package). - Extract to a folder without non-ASCII characters in the path.
- OpenOCD is bundled in the repo — no separate build required:
openocd.exe— binary in thefix_vcu/rootoocd/scripts/— configs and helper scripts (AT32, ST-Link)
- Run
.batfiles from thefix_vcu/directory (openocd.exeandoocd/must be next to the scripts).
| File | Purpose |
|---|---|
dump_memory.bat |
Read dump → MEMORY_G3.bin |
fix_vcu-windows-….exe |
Dump editor (built from change_sn) |
flash_memory_patched.bat |
Flash MEMORY_G3.bin.patched.bin |
fix_option_bytes.bat |
Clear flash protection on write-protected errors |
A prebuilt OpenOCD binary is included for Windows only (openocd.exe). On macOS there are *_mac.sh helpers, but they expect either:
- a local build at
.local/openocd-artery/bin/openocdviabuild_openocd_artery_mac.sh, or openocdon yourPATH(e.g. Homebrew) if you skip the local build.
chmod +x build_openocd_artery_mac.sh
./build_openocd_artery_mac.sh "https://github.com/ArteryTek/openocd.git" "$(pwd)/.build" "$(pwd)/.local/openocd-artery"Scripts: dump_memory_mac.sh, flash_memory_patched_mac.sh, fix_option_bytes_mac.sh.
Check your ST-Link pinout before connecting.

Important! Disconnect the VCU from the scooter before starting.
| No. | ST-Link | VCU |
|---|---|---|
| 1 | SWDIO | DIO |
| 2 | SWCLK | CLK |
| 3 | GND | GND |
| 4 | 3.3V | TP13V3* |
| 5 | GND** | C45 (temporary) |
*Soldering required (fragile contact!)
**Used only for shorting to C45
- Short pin 5 (GND) to C45
- Run
dump_memory.bat(ordump_memory_mac.sh) - When
oocd\scripts/mem_helper.tcl", line 37appears, release the short - Verify
MEMORY_G3.binexists (128 KB) - In a hex editor (e.g. HxD): Goto
0x1F020— your serial should appear twice. If not, the dump is bad; redo step 1.
Run the release editor binary in the folder with MEMORY_G3.bin.
Menu:
| Option | Action |
|---|---|
| 1 | Your dump: change SN, view/transfer firmware key (VCU version auto-detected) |
| 2 | Other firmware: copy SN + key from your dump into a DUMPS/ template |
| 3 | Make my dump flashable with SHU — erase 22-byte key (0xFF) before SHU Compat flash |
| 4 | Set firmware key manually (22 characters) |
Output: MEMORY_G3.bin.patched.bin.
Region change: option 1 → update SN (14 chars, template 1CGCC++++C++++).
SHU Compat firmware: before flashing Compat images, use option 3 so the dump key at 0x1420 / 0x10420 becomes 0xFF×22. Details: change_sn/README.md, G3_full_dump_key_version_change_sn.md.
The editor does not modify mileage or speed limits in the dump (removed).
- Short GND to C45 again
- Run
flash_memory_patched.bat - Release the short when
oocd\scripts/mem_helper.tcl", line 37appears - Success when you see:
wrote 131072 bytes from file MEMORY_G3.bin.patched.bin to flash bank 0 …
If flash memory write protected:
- Windows:
fix_option_bytes.bat - macOS:
./fix_option_bytes_mac.sh
Important: this script clears write protection (option bytes), but the Flash contents are zeroed — firmware on the VCU is erased and you cannot dump it afterward. Run fix_option_bytes only if you already have a known-good dump (MEMORY_G3*.bin) backed up and verified.
Power-cycle the VCU and retry flashing (use your prepared .patched.bin).
If flash write algorithm aborted by target, add -c "set WORKAREASIZE 0" before -f .../at32.cfg in the OpenOCD command.
open failed→ check ST-Link on the PCinit mode failed→ check VCU wiring
SN already bound to another account:
- Run the dump editor → option 1
- Select
MEMORY_G3.bin.patched.bin - Enter a new 14-character SN
- Flash the new
.patched.bin
SHU / Compat flash issues:
- Menu option 3 (make my dump flashable with SHU) on
MEMORY_G3.bin - Flash the resulting
.patched.bin, then apply Compat firmware via SHU

