EEPROM CH341A 编程器 - 在 Linux 上读写芯片数据
在本教程中,我们将使用 CH341A 编程器读取、写入和擦除附加芯片上的数据/固件。这是 CH341A 编程器的入门指南。 CH341A编程器允许用户连接各种芯片,以便读取或备份固件或覆盖现有固件。
在本教程中您将学习:
如何编译ch341eeprom软件
如何通过CH341A读取芯片数据
如何通过CH341A向芯片写入数据
如何通过CH341A擦除芯片中的数据
Linux 上的 EEPROM CH341A 编程器
Linux 上有大量软件可用于处理 EEPROM CH341A 编程器。其中许多可以通过标准 Debian 存储库(例如 flashrom
)获得。
然而,经过多次尝试,我无法使用任何工具来识别我的CH341A编程器和芯片。经过几天的搜索,我最终选择了 ch341eeprom 软件。
让我们从所有先决条件开始:
# apt install git make libusb-1.0-0-dev clang
在下一步中,我们将克隆 ch341eeprom 存储库。
git clone https://github.com/plumbum/ch341eeprom.git
现在导航到目录并执行
make
命令来编译源代码:$ cd ch341eeprom $ make
编译软件后,找到可执行文件
ch341eeprom
。现在就可以随意执行新编译的软件了。输出应如下所示:$ ./ch341eeprom ch341eeprom - an i2c EEPROM programming tool for the WCH CH341a IC Version 0.5 copyright (c) 2011 asbokid <ballymunboy@gmail.com> This program comes with absolutely no warranty; This is free software, and you are welcome to redistribute it under certain conditions: GNU GPL v3 License: http://www.gnu.org/licenses/gpl.html Usage: -h, --help display this text -v, --verbose verbose output -d, --debug debug output -s, --size size of EEPROM {24c01|24c02|24c04|24c08|24c16|24c32|24c64|24c128|24c256|24c512|24c1024} -e, --erase erase EEPROM (fill with 0xff) -w, --write write EEPROM with image from filename -r, --read read EEPROM and save image to filename Example: ch341eeprom -v -s 24c64 -w bootrom.bin
将带有芯片的EEPROM CH341A编程器插入USB端口。按照上面的示例执行以下命令,同时更改命令参数以满足您的需要: 读取(备份)大小为24c32的芯片
$ ./ch341eeprom -v -s 24c32 -r firmware.bin
写入尺寸为24c128的芯片
$ ./ch341eeprom -v -s 24c128 -w firmware.bin
擦除芯片尺寸为24c128
$ ./ch341eeprom -v -s 24c128 -e
结论
在本教程中,我们了解了如何使用 EEPROM CH341A 编程器读取、写入和擦除芯片上的数据。正如已经提到的,我无法使用 flashrom 等标准工具通过 CH341A 编程器访问芯片。如果您有不同的经验或其他工具来使用 EEPROM CH341A 编程器,请在下面留下评论。