@echo off
rem # NOTE, setup an environment variable 'simnow' that points to the simnow install directory
rem # That way, a batch file such as this will work on all machines
if "%simnow%" == "" (
   echo.
   echo === simnow environment variable not found ===
   echo.
   pause
   exit
   )

echo memdevice.initfile %~dp0..\coreboot\build\coreboot.rom > %~dp0temp.txt
echo Serial:0.SetCommPort pipe                 >> %~dp0temp.txt
echo Serial:0.SetMultiplier  10                 >> %~dp0temp.txt
echo debug.enable                              >> %~dp0temp.txt
echo debug.execcmd t                           >> %~dp0temp.txt

start %simnow%\simnow.exe -f %~dp0shiner_family10h.bsd -e %~dp0temp.txt

before starting putty, delay long enough for simnow to open the serial port's named pipe
ping localhost > nul
start %msys_for_coreboot%\tools\putty -serial \\.\pipe\SimNow.Com1


