@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 SF32LB52 -m nor write_flash "bootloader\bootloader.bin@0x10008000" "main.bin@0x10020000" "ftab\ftab.bin@0x10000000"

if "%ENV_ROOT%"=="" pause

