diag: sdr/sdtf_test: Fix typo error
[processor-sdk/pdk.git] / packages / pdkAppImageCreate.bat
1 @REM ******************************************************************************\r
2 @REM * FILE PURPOSE: PDK Unit Test and Example Project Creator\r
3 @REM ******************************************************************************\r
4 @REM * FILE NAME: pdkAppImageCreate.bat\r
5 @REM *\r
6 @REM * DESCRIPTION: \r
7 @REM *  The script file is used to create bootable application binaries from the\r
8 @REM *  executable generated by the CCS Projects.\r
9 @REM *\r
10 @REM * Syntax:\r
11 @REM *  pdkAppImageCreate.bat [PDK_PATH] [CG_TOOL_PATH] [APP_PATH] [APP_NAME] [SOC] [PROCESSOR]\r
12 @REM *\r
13 @REM *\r
14 @REM * Copyright (C) 2016-2018, Texas Instruments, Inc.\r
15 @REM *****************************************************************************\r
16 @echo off\r
17 \r
18 set PDK_PATH=%1\r
19 set CG_TOOL_PATH=%2\r
20 set APP_PATH=%3\r
21 set APP_NAME=%4\r
22 set SOC=%5\r
23 set PROCESSOR=%6\r
24 \r
25 @if %SOC% == AM437x (\r
26     goto SOC_AM3_AM4\r
27 )\r
28 @if %SOC% == AM335x (\r
29     goto SOC_AM3_AM4\r
30 )\r
31 @if %SOC% == AM572x (\r
32     goto SOC_AM57XX\r
33 )\r
34 @if %SOC% == AM574x (\r
35     goto SOC_AM57XX\r
36 )\r
37 @if %SOC% == AM571x (\r
38     goto SOC_AM57XX\r
39\r
40 @if %SOC% == am65xx (\r
41     goto SOC_K3\r
42\r
43 @if %SOC% == j721e (\r
44     goto SOC_K3\r
45\r
46 @if %SOC% == K2G (\r
47     goto SOC_K2G\r
48 )\r
49 @if %SOC% == OMAPL137 (\r
50     goto SOC_OMAPL13X\r
51 )\r
52 @if %SOC% == OMAPL138 (\r
53     goto SOC_OMAPL13X\r
54 )\r
55 \r
56 @goto ENDSCRIPT\r
57 \r
58 :SOC_AM57XX\r
59     if %PROCESSOR% == arm (\r
60         set BIN_PATH=%APP_PATH%\r
61         set APP_MPU_CPU0=%APP_PATH%/%APP_NAME%.out\r
62         set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools\r
63         call %PDK_PATH%/ti/boot/sbl/tools/scripts/AM57xImageGen.bat\r
64     )\r
65     if %PROCESSOR% == dsp (\r
66         set BIN_PATH=%APP_PATH%\r
67         set APP_DSP1=%APP_PATH%/%APP_NAME%.out\r
68         set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools\r
69         call %PDK_PATH%/ti/boot/sbl/tools/scripts/AM57xImageGen.bat\r
70     )\r
71     if %PROCESSOR% == m4 (\r
72         set BIN_PATH=%APP_PATH%\r
73         set APP_IPU1_CPU0=%APP_PATH%/%APP_NAME%.out\r
74         set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools\r
75         call %PDK_PATH%/ti/boot/sbl/tools/scripts/AM57xImageGen.bat\r
76     )\r
77     goto ENDSCRIPT\r
78 \r
79 :SOC_K3\r
80     @REM Refer to SBL document for core ID value (0, or 4 bellow).\r
81     if %PROCESSOR% == mpu (\r
82         set BIN_PATH=%APP_PATH%\r
83         set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools\r
84         call %PDK_PATH%/ti/boot/sbl/tools/scripts/K3ImageGen.bat 0 %APP_PATH%/%APP_NAME%.out\r
85     )\r
86     if %PROCESSOR% == mcu (\r
87         set BIN_PATH=%APP_PATH%\r
88         set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools\r
89         call %PDK_PATH%/ti/boot/sbl/tools/scripts/K3ImageGen.bat 4 %APP_PATH%/%APP_NAME%.out\r
90     )\r
91     goto ENDSCRIPT\r
92 :SOC_K2G\r
93     if %PROCESSOR% == arm (\r
94         set BIN_PATH=%APP_PATH%\r
95         set APP_MPU_CPU0=%APP_PATH%/%APP_NAME%.out\r
96         set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools\r
97         call %PDK_PATH%/ti/boot/sbl/tools/scripts/K2GImageGen.bat\r
98     )\r
99     if %PROCESSOR% == dsp (\r
100         set BIN_PATH=%APP_PATH%\r
101         set APP_DSP0=%APP_PATH%/%APP_NAME%.out\r
102         set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools\r
103         call %PDK_PATH%/ti/boot/sbl/tools/scripts/K2GImageGen.bat\r
104     )\r
105     goto ENDSCRIPT\r
106 \r
107 :SOC_AM3_AM4\r
108     %CG_TOOL_PATH%/bin/arm-none-eabi-objcopy -O binary %APP_NAME%.out %APP_NAME%.bin\r
109     %PDK_PATH%/ti/starterware/tools/ti_image/tiimage.exe 0x80000000 NONE %APP_NAME%.bin app )\r
110     goto ENDSCRIPT\r
111 \r
112 :SOC_OMAPL13X\r
113     if %PROCESSOR% == arm (\r
114         set BIN_PATH=%APP_PATH%\r
115         set APP_MPU_CPU0=%APP_PATH%/%APP_NAME%.out\r
116         set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools\r
117         call %PDK_PATH%/ti/boot/sbl/tools/scripts/OMAPL13xImageGen.bat\r
118     )\r
119     if %PROCESSOR% == dsp (\r
120         set BIN_PATH=%APP_PATH%\r
121         set APP_DSP0=%APP_PATH%/%APP_NAME%.out\r
122         set TOOLS_PATH=%PDK_PATH%/ti/boot/sbl/tools\r
123         call %PDK_PATH%/ti/boot/sbl/tools/scripts/OMAPL13xImageGen.bat\r
124     )\r
125     goto ENDSCRIPT\r
126 \r
127 :ENDSCRIPT\r