你好,我使用CH343G來(lái)給ESP32燒錄程序。但是燒錄會(huì)回報(bào)Failed to write to target RAM錯(cuò)誤。搜索結(jié)果表示使用官方驅(qū)動(dòng)可以解決。
我使用http://www.findthetime.net/downloads/CH34XSER_MAC_ZIP.html?確實(shí)可以正常燒錄,但是會(huì)引入一個(gè)比較惡性的bug。CH343G第一次插入U(xiǎn)SB口,或者開(kāi)機(jī)前插入,不會(huì)有任何問(wèn)題。但是拔出以后,該USB口再插就不會(huì)識(shí)別硬件了。換其他USB設(shè)備也不行。
硬件我用自己的板子和官方淘寶店買(mǎi)的CH343適配器(僅連接VIO和3.3V)問(wèn)題一樣,應(yīng)該可排除硬件問(wèn)題。
我的操作系統(tǒng)是Mojave 10.14.6。使用console在系統(tǒng)日志里搜索CH34x,會(huì)返回以下的結(jié)果:
debug08:59:36.106969 -0500kextdentering /Library/Extensions/CH34xVCPDriver.kext
debug08:59:36.107067 -0500kextdentering /Library/Extensions/CH34xVCPDriver.kext/Contents
debug08:59:36.107114 -0500kextdleaving /Library/Extensions/CH34xVCPDriver.kext/Contents
debug08:59:36.107164 -0500kextdleaving /Library/Extensions/CH34xVCPDriver.kext
debug08:59:36.107320 -0500kextdopen(/Library/Extensions/CH34xVCPDriver.kext/Contents/MacOS/CH34xVCPDriver,0x0,0x1b6) = 4
debug08:59:36.107366 -0500kextdopen(/Library/Extensions/CH34xVCPDriver.kext/Contents/MacOS/CH34xVCPDriver,0x0,0x1b6) = 5
debug08:59:36.107538 -0500kextd10339 signing bytes in 4 blob(s) from /Library/Extensions/CH34xVCPDriver.kext/Contents/MacOS/CH34xVCPDriver(x86_64)
debug08:59:36.107600 -0500kextdfailed to fetch /Library/Extensions/CH34xVCPDriver.kext/Contents/_CodeSignature/CodeRequirements-2 error=-10
debug08:59:36.107638 -0500kextdExtracting ticket from bundle: /Library/Extensions/CH34xVCPDriver.kext
debug08:59:36.107690 -0500kextdsuccessfully found stapled ticket for: /Library/Extensions/CH34xVCPDriver.kext
debug08:59:36.139650 -0500kextdopen(/Library/Extensions/CH34xVCPDriver.kext/Contents/Info.plist,0x0,0x1b6) = 4
debug08:59:36.140086 -0500kextdfailed to fetch /Library/Extensions/CH34xVCPDriver.kext/Contents/_CodeSignature/CodeTopDirectory error=-10
debug08:59:36.140708 -0500kextdfailed to fetch /Library/Extensions/CH34xVCPDriver.kext/Contents/_CodeSignature/CodeEntitlements error=-10
debug08:59:36.141739 -0500kextdentering /Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext
debug08:59:36.141831 -0500kextdentering /Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext/Contents
debug08:59:36.141869 -0500kextdleaving /Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext/Contents
debug08:59:36.141901 -0500kextdleaving /Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext
debug08:59:36.142111 -0500kextdopen(/Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext/Contents/MacOS/CH34xVCPDriver,0x0,0x1b6) = 4
debug08:59:36.142182 -0500kextdopen(/Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext/Contents/MacOS/CH34xVCPDriver,0x0,0x1b6) = 5
debug08:59:36.142381 -0500kextd10339 signing bytes in 4 blob(s) from /Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext/Contents/MacOS/CH34xVCPDriver(x86_64)
debug08:59:36.142449 -0500kextdfailed to fetch /Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext/Contents/_CodeSignature/CodeRequirements-2 error=-10
debug08:59:36.142547 -0500kextdExtracting ticket from bundle: /Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext
debug08:59:36.142735 -0500kextdsuccessfully found stapled ticket for: /Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext
debug08:59:36.177356 -0500kextdopen(/Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext/Contents/Info.plist,0x0,0x1b6) = 4
debug08:59:36.177583 -0500kextdfailed to fetch /Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext/Contents/_CodeSignature/CodeTopDirectory error=-10
debug08:59:36.178001 -0500kextdfailed to fetch /Library/StagedExtensions/Library/Extensions/CH34xVCPDriver.kext/Contents/_CodeSignature/CodeEntitlements error=-10
而不能使用的時(shí)候,還會(huì)多以下兩條
debug09:00:30.356210 -0500DockOSErr AEEventImpl::putAttributeDesc(OSType, const AEDesc *)(shas = ["d36608cc1e39f272d10b89eb1287231c9d8cccef;00;00000000;00000000;00000000;0000000000000020;com.apple.app-sandbox.read-write;01;01000004;00000002041f0fa3;01;/users/sundeqing/downloads/ch34xser_mac 3"] result=0
debug09:00:30.356256 -0500DockOSErr AEPutAttributeDesc(AppleEvent *, AEKeyword, const AEDesc *)(shas desc=["d36608cc1e39f272d10b89eb1287231c9d8cccef;00;00000000;00000000;00000000;0000000000000020;com.apple.app-sandbox.read-write;01;01000004;00000002041f0fa3;01;/users/sundeqing/downloads/ch34xser_mac 3"] err=0/noErr