Part Number: TMS320F28075
Other Parts Discussed in Thread: C2000WARE
Hi Team,
My customer want to extract the version number from the source code, and use the number to rename the object file.
Now they're using bat script + CCS Post-build steps to achieve it.
They use bat instruction 'tokens' to extract the version number and give this value to a variable str1 they named. Then transfer this value to name 'new' which represent the object file.
The issue they encountered is: after executed, the file name still be 'new', not the version number.
Here is their bat script:
@echo off setlocal enabledelayedexpansion for /f "tokens=2,3" %%i in (CFG_SysParaInit.h) do ( if %%i==DSP_VERSION ( set str1=%%j set str2=TPaa!str1! echo !str2! ) ) for /f "tokens=2,3" %%i in (CFG_SysParaInit.h) do ( if %%i==DSP_DEBUG_VERSION ( set str3=%%j set str4=_D!str3! set new1=!str2!!str4!_075 echo !new1! ) ) for /f "tokens=2,3" %%i in (CFG_SysParaInit.h) do ( if %%i==DSP_VERSION2 ( set str5=%%j set str6=TPaa!str5! echo !str6! set new2=!str6!!str4!_075 echo !new2! ) ) for /f "tokens=2,3" %%i in (CFG_SysParaInit.h) do ( if %%i==HIL_TEST ( set str=%%j if "!str!"=="0" ( cd "../../.././CPU1_FLASH" copy WIS215KW_TL3_inv_f28075.hex WIS215KW_TL3_inv_f28075bak.hex ren WIS215KW_TL3_inv_f28075bak.hex !new2!.hex ) if "!str!"=="1" ( cd "../../.././CPU1_FLASH" copy WIS215KW_TL3_inv_f28075.hex WIS215KW_TL3_inv_f28075bak.hex ren WIS215KW_TL3_inv_f28075bak.hex !new1!.hex ) ) ) pause
Could you please provide us some help?
--
Thanks & Regards
Yale