Ken Van Hoeylandt 431fa84ffb
Merge develop into main (#161)
- Fix CoreS3 boot failure (I2C now returns bool instead of err_result_t)
- Flashing scripts now erase before flashing (to ensure it's a clean install)
- M5Stack Core2 and CoreS3: Experimental SPI speed increase
2025-01-12 00:38:19 +01:00

22 lines
639 B
PowerShell

param(
$port
)
if ((Get-Command "esptool" -ErrorAction SilentlyContinue) -eq $null)
{
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
$json = Get-Content .\Binaries\flasher_args.json -Raw | ConvertFrom-Json
$jsonClean = $json.flash_files -replace '[\{\}\@\;]', ''
$jsonClean = $jsonClean -replace '[\=]', ' '
cd Binaries
$command = "esptool --port $port erase_flash"
Invoke-Expression $command
$command = "esptool --port $port -b 460800 write_flash $jsonClean"
Invoke-Expression $command
cd ..