This is a batch script that builds a Ceva Host Example Application. Here's a breakdown of the script:
-
The script starts with the @ECHO off command, which disables the display of commands in the console.
-
The first line ECHO Let's build Ceva Host Example Application! prints a message indicating the start of the build process.
-
The SET src_dir=%CD% command sets the src_dir variable to the current directory.
-
The SET /p tools="Path to SensPro Tools (for example, C:\CEVA-ToolBox\V20\SensPro): " prompts the user to enter the path to SensPro Tools and assigns it to the tools variable.
-
The SET /p SENSPRO_DRIVER_SIMDIR_PATH="Path to SensPro drivers msvc directory (for example, C:\ceva_infrastracture\20211224.2\ceva_infrastructure-win64): " prompts the user to enter the path to SensPro drivers msvc directory and assigns it to the SENSPRO_DRIVER_SIMDIR_PATH variable.
-
The SET /p build_dir="Where to build the binaries (for example, C:\Projects\host_build): " prompts the user to enter the path where the binaries will be built and assigns it to the build_dir variable.
-
The if exist %build_dir%\ ( checks if the build directory already exists by using the EXIST command. If the directory exists, the message "Yes" is displayed. If it doesn't exist, the message "No" is displayed.
-
The ECHO. command displays an empty line for better formatting.
-
The ECHO Select Ceva DSP Core: displays a menu of options for selecting the Ceva DSP Core.
-
The CHOICE /C 123 /M "Enter your choice:" command prompts the user to enter their choice and assigns the selected option to the ERRORLEVEL variable.
-
The IF %ERRORLEVEL%==3 SET CEVA_DSP_CORE=SensPro250 assigns the value "SensPro250" to the CEVA_DSP_CORE variable if the user selects option 3.
-
The IF %ERRORLEVEL%==2 SET CEVA_DSP_CORE=SensPro500 assigns the value "SensPro500" to the CEVA_DSP_CORE variable if the user selects option 2.
-
The IF %ERRORLEVEL%==1 SET CEVA_DSP_CORE=SensPro1000 assigns the value "SensPro1000" to the CEVA_DSP_CORE variable if the user selects option 1.
-
The ECHO. command displays an empty line for better formatting.
-
The ECHO Select Ceva DSP Mode: displays a menu of options for selecting the Ceva DSP Mode.
-
The CHOICE /C 12 /M "Enter your choice:" command prompts the user to enter their choice and assigns the selected option to the ERRORLEVEL variable.
-
The IF %ERRORLEVEL%==2 SET CEVA_DSP_MODE=DBG_API assigns the value "DBG_API" to the CEVA_DSP_MODE variable if the user selects option 2.
-
The IF %ERRORLEVEL%==1 SET CEVA_DSP_MODE=FIS assigns the value "FIS" to the CEVA_DSP_MODE variable if the user selects option 1.
-
The ECHO. command displays an empty line for better formatting.
-
The ECHO Select Ceva DSP RTL Version: displays a menu of options for selecting the Ceva DSP RTL Version.
-
The CHOICE /C 12 /M "Enter your choice:" command prompts the user to enter their choice and assigns the selected option to the ERRORLEVEL variable.
-
The IF %ERRORLEVEL%==2 SET CEVA_DSP_RTL_VERSION=V1.2 assigns the value "V1.2" to the CEVA_DSP_RTL_VERSION variable if the user selects option 2.
-
The IF %ERRORLEVEL%==1 SET CEVA_DSP_RTL_VERSION=V1.1 assigns the value "V1.1" to the CEVA_DSP_RTL_VERSION variable if the user selects option 1.
-
The IF %CEVA_DSP_MODE%==DBG_API SET /p CEVA_DSP_ELF_PATH="Path to DSP .elf (for example, C:\Projects\dsp_build\ceva_dsp_application.elf): " prompts the user to enter the path to the DSP .elf file and assigns it to the CEVA_DSP_ELF_PATH variable if the selected DSP Mode is "DBG_API".
-
The IF %CEVA_DSP_MODE%==DBG_API SET /p SENSPRO_DRIVER_PATH="Path to SensPro drivers tools directory (for example, C:\ceva_infrastracture\20211224.2\ceva_infrastructure-cevatools): " prompts the user to enter the path to the SensPro drivers tools directory and assigns it to the SENSPRO_DRIVER_PATH variable if the selected DSP Mode is "DBG_API".
-
The SET GENERATOR_PLATFORM=Win32 command sets the GENERATOR_PLATFORM variable to "Win32".
-
The IF %CEVA_DSP_MODE%==DBG_API SET GENERATOR_PLATFORM=x64 sets the GENERATOR_PLATFORM variable to "x64" if the selected DSP Mode is "DBG_API".
-
The CALL %tools%\CEVA-SensPro_set.bat command calls the CEVA-SensPro_set.bat script from the SensPro Tools.
-
The @ECHO off command disables the display of commands in the console.
-
The CD %build_dir% command changes the current directory to the build directory.
-
The cmake -G "Visual Studio 12 2013" -A %GENERATOR_PLATFORM% -DSENSPRO_DRIVER_SIMDIR_PATH=%SENSPRO_DRIVER_SIMDIR_PATH% -DCEVA_DSP_ELF_PATH=%CEVA_DSP_ELF_PATH% -DSENSPRO_DRIVER_PATH=%SENSPRO_DRIVER_PATH% -DCEVA_DSP_CORE=%CEVA_DSP_CORE% -DCEVA_DSP_MODE=%CEVA_DSP_MODE% -DCEVA_DSP_RTL_VERSION=%CEVA_DSP_RTL_VERSION% %src_dir% . command runs the cmake command with the specified generator, platform, and variables.
-
The CALL host_example_app.sln command calls the host_example_app.sln solution file.
-
The CD %src_dir% command changes the current directory back to the source directory.
-
The @ECHO on command enables the display of commands in the console.