Skip to content

Commit

Permalink
- Created batch file to generate releases quickly within Windows OS
Browse files Browse the repository at this point in the history
- Added batch file to flash directly from the /build folder VIA ESPTOOL as ESP-IDF doesn't always flash correctly > Again this is for Windows
- Modified the .gitignore to ignore the Release folder
  • Loading branch information
FroggMaster committed Jul 17, 2022
1 parent a017b9d commit 00a48d6
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Ignore ALL files in the Build Directory
# Ignore the Build Directory and ALL files within
build/

# Ignore the Release Directory and ALL files within
Release/

# Ignore the SDKConfig file
*sdkconfig*
sdkconfig.old
sdkconfig
13 changes: 13 additions & 0 deletions flash_build_windows.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@echo off
echo #########################################
echo # ESP32S2 Wifi Penetration Tool Flasher #
echo # By Frog #
echo #########################################
echo.
:: This script is meant for quickly flashing build during Development
:: It will not work if you do not have the ESPTOOL in your project folder or in your PATH
set /p COMINPUT=Please enter the COM port your Wifi Dev Board (ESP32-S2) is connected on for example "COM7":
echo Starting flashing on %COMINPUT%
esptool.exe -p %COMINPUT% -b 115200 --after no_reset write_flash --flash_mode dio --flash_freq 40m --flash_size=keep 0x8000 ./build/partition_table/partition-table.bin 0x1000 ./build/bootloader/bootloader.bin 0x10000 ./build/esp32-wifi-penetration-tool.bin
echo Flashing has completed please press the reset button on your Flipper Zero Wifi Dev Board
pause
34 changes: 34 additions & 0 deletions generate_release.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@ECHO off
cls
:start
echo.
echo 1. Generate Flipper Zero Wifi Devboard (ESP32-S2) Release
echo 2. Generate Generic ESP32 Release
set /p choice=Type the number for the release you would like to generate:
if '%choice%'=='' echo "%choice%" is not a valid option please choose either 1 or 2
if '%choice%'=='1' goto DevBoard
if '%choice%'=='2' goto Generic
echo.
goto start

:DevBoard
echo Generating a Flipper Zero Wifi Devboard (ESP32-S2) Release
pause
for %%h in (ESP32-S2-FlipperZeroWifiDevBoard-Linux ESP32-S2-FlipperZeroWifiDevBoard-Mac ESP32-S2-FlipperZeroWifiDevBoard-Windows) do (
copy /Y .\build\bootloader\bootloader.bin .\Release\Generated\%%h\FW\
copy /Y .\build\partition_table\partition-table.bin .\Release\Generated\%%h\FW\
copy /Y .\build\esp32-wifi-penetration-tool.bin .\Release\Generated\%%h\FW\
)
goto end

:Generic
echo Generating a Generic ESP32 Release
for %%h in (ESP32-Generic-Linux ESP32-Generic-Mac ESP32-Generic-Windows) do (
copy /Y .\build\bootloader\bootloader.bin .\Release\Generated\%%h\FW\
copy /Y .\build\partition_table\partition-table.bin .\Release\Generated\%%h\FW\
copy /Y .\build\esp32-wifi-penetration-tool.bin .\Release\Generated\%%h\FW\
)
goto end
:end
pause
exit

0 comments on commit 00a48d6

Please sign in to comment.