@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
   )

cd ..\
echo memdevice.initfile %cd%\build\coreboot.rom > simnow\temp.txt
echo Serial:0.SetCommPort pipe                 >> simnow\temp.txt
echo debug.enable                              >> simnow\temp.txt
echo debug.execcmd t                           >> simnow\temp.txt

start %simnow%\simnow.exe -f %cd%\simnow\cheetah_1p-1c_emerald.bsd -e %cd%\simnow\temp.txt

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


