rem post_build.bat rem Copyright (c) 2012 Texas Instruments Incorporated ALL RIGHTS RESERVED rem ****************************************************** rem This batch file Generates binary files from .out file rem ****************************************************** setlocal set dirtemp="C:\isdk_temp_%random%_%random%" IF NOT EXIST %dirtemp% ( mkdir %dirtemp% ) set bintmp="%dirtemp%\appl_%random%_%random%_%random%.bin" set com_str=%2 IF NOT x%com_str:tms470_4=%==x%com_str% ( ECHO "COMPILER TMS_470_4_x" call "%~1/utils/tiobj2bin/tiobj2bin.bat" "%~3\%~4.out" %bintmp% "%~2/bin/ofd470.exe" "%~2/bin/hex470.exe" "%~1/utils/tiobj2bin/mkhex4bin.exe" ) ELSE ( ECHO "COMPILER ARM_5_x" call "%~1/utils/tiobj2bin/tiobj2bin.bat" "%~3\%~4.out" %bintmp% "%~2/bin/armofd.exe" "%~2/bin/armhex.exe" "%~1/utils/tiobj2bin/mkhex4bin.exe" ) IF EXIST %bintmp% ( copy /B %bintmp% "%~3\%~4.bin" /Y ) ELSE ( echo Binary file does not exist in path goto FINISH ) cd if "%~6" == "" ( echo Not adding headers goto FINISH ) cd "%~3" if "%~7" == "0" ( rem Generate SPI and SD card Binaries "%~5\isdk_image.exe" %6 "1" "%~4.bin" "%~4" "%~8" "%~9" "%~5\isdk_image.exe" %6 "3" "%~4.bin" "%~4" "%~8" "%~9" goto FINISH ) ELSE ( "%~5\isdk_image.exe" %6 %7 "%~4.bin" "%~4" "%~8" "%~9" ) :FINISH IF EXIST %dirtemp% ( rmdir /s /q %dirtemp% ) echo finished