@echo off
::start cc254x_ubl_pp.js %2 %3 %4 %5
%~d1
%~d4
chdir %1\..\..\common\cc2540
set fin=%3%.sim
set fout=%3%.bin
set tmp_fin=tmp.sim
set tmp_fout=tmp.bin
del .\%tmp_fin%
del .\%tmp_fout%
copy %fin% .\%tmp_fin%
.\cc254x_sim2bin.exe .\%tmp_fin% .\%tmp_fout%
copy .\%tmp_fout% %fout%
del .\%tmp_fin%
del .\%tmp_fout%