-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetVariables.bat
48 lines (44 loc) · 2.28 KB
/
setVariables.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@ECHO OFF
REM UPDATE THE VARIABLES BELOW TO MATCH THE PDL AND COMPILER FOLDERS
REM Set the PDL version (must match the folder name of the PDL!)
SET ONETHINX_PDL_VERSION=PDL_1.3.1.1499
REM Set the Compiler version (must match the folder name of the Compiler!)
SET ONETHINX_COMPILER_VERSION=gcc-arm-none-eabi-9-2020-q2-update
REM Set th Tools version (must match the folder name of the Tools folder!)
SET ONETHINX_TOOLS_VERSION=tools_2.0
REM AUTOMATED VARIABLES BELOW, DO NOT CHANGE
REM Get current folder
set drive=%~dp0
set drivep=%drive%
if #%drive:~-1%# == #\# set drivep=%drive:~0,-1%
set "drivep=%drivep:\=/%"
REM Set the variables and folder for of this pack
SET ONETHINX_PACK_LOC=%drivep%
ECHO Set ONETHINX_PACK_LOC: %ONETHINX_PACK_LOC%
SETX ONETHINX_PACK_LOC %ONETHINX_PACK_LOC%
ECHO Set ONETHINX_PDL_VERSION: %ONETHINX_PDL_VERSION%
SETX ONETHINX_PDL_VERSION %ONETHINX_PDL_VERSION%
ECHO Set ONETHINX_COMPILER_VERSION: %ONETHINX_COMPILER_VERSION%
SETX ONETHINX_COMPILER_VERSION %ONETHINX_COMPILER_VERSION%
ECHO Set ONETHINX_TOOLS_VERSION: %ONETHINX_TOOLS_VERSION%
SETX ONETHINX_TOOLS_VERSION %ONETHINX_TOOLS_VERSION%
SET ONETHINX_PDL_LOC=%ONETHINX_PACK_LOC%/%ONETHINX_PDL_VERSION%
ECHO Set ONETHINX_PDL_LOC: %ONETHINX_PDL_LOC%
SETX ONETHINX_PDL_LOC %ONETHINX_PDL_LOC%
SET ONETHINX_SVD_LOC=%ONETHINX_PDL_LOC%/devices/svd
ECHO Set ONETHINX_SVD_LOC: %ONETHINX_SVD_LOC%
SETX ONETHINX_SVD_LOC %ONETHINX_SVD_LOC%
SET ONETHINX_COMPILER_LOC=%ONETHINX_PACK_LOC%/%ONETHINX_COMPILER_VERSION%/bin
ECHO Set ONETHINX_COMPILER_LOC: %ONETHINX_COMPILER_LOC%
SETX ONETHINX_COMPILER_LOC %ONETHINX_COMPILER_LOC%
SET ONETHINX_TOOLS_LOC=%ONETHINX_PACK_LOC%/%ONETHINX_TOOLS_VERSION%
ECHO Set ONETHINX_TOOLS_LOC: %ONETHINX_TOOLS_LOC%
SETX ONETHINX_TOOLS_LOC %ONETHINX_TOOLS_LOC%
REM Set the Path to the CMake executable
%drivep%\PackSetup\pathed /REMOVE %ONETHINX_PACK_LOC%/CMake/bin /USER && %drivep%\PackSetup\pathed /ADD %ONETHINX_PACK_LOC%/CMake/bin /USER
REM Set the Path to the Make executable
%drivep%\PackSetup\pathed /REMOVE %ONETHINX_PACK_LOC%/mingw-make /USER && %drivep%\PackSetup\pathed /ADD %ONETHINX_PACK_LOC%/mingw-make /USER
REM Set the Path to the Compiler
%drivep%\PackSetup\pathed /REMOVE %ONETHINX_COMPILER_LOC% /USER && %drivep%\PackSetup\pathed /ADD %ONETHINX_COMPILER_LOC% /USER
@ECHO.
@ECHO Done, Please restart your machine!