Skip to content

Commit 81c8a82

Browse files
committed
Add windows drivers for nano esp32 dfu
1 parent ae9dae4 commit 81c8a82

File tree

6 files changed

+89
-0
lines changed

6 files changed

+89
-0
lines changed

.github/scripts/on-release.sh

+2
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ cp -f "$GITHUB_WORKSPACE/package.json" "$PKG_DIR/"
197197
cp -f "$GITHUB_WORKSPACE/programmers.txt" "$PKG_DIR/"
198198
cp -Rf "$GITHUB_WORKSPACE/cores" "$PKG_DIR/"
199199
cp -Rf "$GITHUB_WORKSPACE/libraries" "$PKG_DIR/"
200+
cp -f "$GITHUB_WORKSPACE/post_install.bat" "$PKG_DIR/"
201+
cp -Rf "$GITHUB_WORKSPACE/drivers" "$PKG_DIR/"
200202
cp -f "$GITHUB_WORKSPACE/tools/espota.exe" "$PKG_DIR/tools/"
201203
cp -f "$GITHUB_WORKSPACE/tools/espota.py" "$PKG_DIR/tools/"
202204
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.py" "$PKG_DIR/tools/"

drivers/dpinst-amd64.exe

1020 KB
Binary file not shown.

drivers/dpinst-x86.exe

901 KB
Binary file not shown.

drivers/nanoesp32.cat

20.6 KB
Binary file not shown.

drivers/nanoesp32.inf

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
;
2+
;
3+
; Installs WinUsb
4+
;
5+
6+
[Version]
7+
Signature = "$Windows NT$"
8+
Class = USBDevice
9+
ClassGUID = {88BAE032-5A81-49f0-BC3D-A4FF138216D6}
10+
Provider = %ManufacturerName%
11+
CatalogFile = nanoesp32.cat
12+
DriverVer = 03/03/2020,10.48.00.000
13+
14+
; ========== Manufacturer/Models sections ===========
15+
16+
[Manufacturer]
17+
%ManufacturerName% = Standard,NTamd64
18+
19+
[Standard.NTamd64]
20+
%DeviceName% =USB_Install, USB\VID_2341&PID_0070&MI_00
21+
22+
; ========== Class definition ===========
23+
24+
[ClassInstall32]
25+
AddReg = ClassInstall_AddReg
26+
27+
[ClassInstall_AddReg]
28+
HKR,,,,%ClassName%
29+
HKR,,NoInstallClass,,1
30+
HKR,,IconPath,%REG_MULTI_SZ%,"%systemroot%\system32\setupapi.dll,-20"
31+
HKR,,LowerLogoVersion,,5.2
32+
33+
; =================== Installation ===================
34+
35+
[USB_Install]
36+
Include = winusb.inf
37+
Needs = WINUSB.NT
38+
39+
[USB_Install.Services]
40+
Include = winusb.inf
41+
Needs = WINUSB.NT.Services
42+
43+
[USB_Install.HW]
44+
AddReg=Dev_AddReg
45+
46+
[Dev_AddReg]
47+
HKR,,DeviceInterfaceGUIDs,0x10000,"{51de5bfa-d59d-4f3e-9b36-0b4b210dd53f}"
48+
49+
; [DestinationDirs]
50+
; If your INF needs to copy files, you must not use the DefaultDestDir directive here.
51+
; You must explicitly reference all file-list-section names in this section.
52+
53+
; =================== Strings ===================
54+
55+
[Strings]
56+
ManufacturerName="Arduino"
57+
ClassName="Universal Serial Bus devices"
58+
DeviceName="Nano ESP32 DFU"
59+
REG_MULTI_SZ = 0x00010000

post_install.bat

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@echo off
2+
set ARGS=/SE /SW /SA
3+
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
4+
drivers\dpinst-amd64.exe %ARGS%
5+
) ELSE IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
6+
drivers\dpinst-amd64.exe %ARGS%
7+
) ELSE (
8+
drivers\dpinst-x86.exe %ARGS%
9+
)
10+
11+
@echo off
12+
setlocal
13+
for /f "tokens=4-5 delims=[.] " %%i in ('ver') do @(if %%i==Version (set VERSION=%%j) else (set VERSION=%%i))
14+
if %VERSION% GEQ 10 (
15+
exit /b 0
16+
)
17+
endlocal
18+
19+
REM dpinst /PATH has problems with relative paths, so use absolute path.
20+
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
21+
drivers\dpinst-amd64.exe /PATH %cd%\drivers\prewin10 %ARGS%
22+
) ELSE IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" (
23+
drivers\dpinst-amd64.exe /PATH %cd%\drivers\prewin10 %ARGS%
24+
) ELSE (
25+
drivers\dpinst-x86.exe /PATH %cd%\drivers\prewin10 %ARGS%
26+
)
27+
28+
exit /b 0

0 commit comments

Comments
 (0)