mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
Fix windows flash script (#154)
This commit is contained in:
parent
bf91e7530d
commit
f71a3bea1e
@ -2,19 +2,18 @@ param(
|
|||||||
$port
|
$port
|
||||||
)
|
)
|
||||||
|
|
||||||
if ((Get-Command "esptool.py" -ErrorAction SilentlyContinue) -eq $null)
|
if ((Get-Command "esptool" -ErrorAction SilentlyContinue) -eq $null)
|
||||||
{
|
{
|
||||||
Write-Host "Unable to find esptool.py in your path. Make sure you have Python installed and on your path. Then run `pip install esptool`."
|
Write-Host "Unable to find esptool in your path. Make sure you have Python installed and on your path. Then run `pip install esptool`."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Create flash command based on partitions
|
# Create flash command based on partitions
|
||||||
$json = Get-Content .\build\flasher_args.json -Raw | ConvertFrom-Json
|
$json = Get-Content .\Binaries\flasher_args.json -Raw | ConvertFrom-Json
|
||||||
$jsonClean = $json.flash_files -replace '[\{\}\@\;]', ''
|
$jsonClean = $json.flash_files -replace '[\{\}\@\;]', ''
|
||||||
$jsonClean = $jsonClean -replace '[\=]', ' '
|
$jsonClean = $jsonClean -replace '[\=]', ' '
|
||||||
|
|
||||||
cd Binaries
|
cd Binaries
|
||||||
$command = "esptool.py --connect-attemps 10 --port $port -b 460800 write_flash $jsonClean"
|
$command = "esptool --port $port -b 460800 write_flash $jsonClean"
|
||||||
Invoke-Expression $command
|
Invoke-Expression $command
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user