@echo off
title=uart download
set WORK_PATH=%~dp0
set CURR_PATH=%cd%
cd %WORK_PATH%
:start
echo,
echo      Uart Download
echo,
set /p input=please input the serial port num:
goto download
:download
echo com%input%
sftool -p COM%input% -c SF32LB56 -m nor write_flash "lcpu\lcpu.hex\ER_IROM2.hex" "bootloader\bootloader.bin@0x1C020000" "main.bin@0x14000000" "ftab\ftab.bin@0x1C000000"

if "%ENV_ROOT%"=="" pause

