-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.bat
140 lines (131 loc) · 3.64 KB
/
setup.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
@echo off
if "%~1"=="" (
echo Usage: %0 [subfolder]
echo Please specify a subfolder path.
pause
exit /b
)
set "subfolder=%~1"
set "baseDir=%~dp0"
set "targetDir=%baseDir%\%subfolder%\.vscode"
if not exist "%baseDir%\%subfolder%\" (
echo The specified subfolder does not exist in the base directory.
pause
exit /b
)
if exist "%targetDir%" (
echo Folder "%targetDir%" already exists.
) else (
mkdir "%targetDir%"
echo .vscode folder created at "%targetDir%"
)
rem Create cmake-kits.json
echo Creating cmake-kits.json...
> "%targetDir%\cmake-kits.json" (
echo [
echo {
echo "name": "Zephyr build tool",
echo "environmentVariables": {
echo "ZEPHYR_BASE": "",
echo "ZEPHYR_SDK_INSTALL_DIR": ""
echo },
echo "cmakeSettings": {
echo "BOARD": "frdm_mcxn947/mcxn947/cpu0"
echo },
echo "keep": true
echo }
echo ]
)
echo cmake-kits.json created.
rem Create cmake-variants.json
echo Creating cmake-variants.json...
> "%targetDir%\cmake-variants.json" (
echo {
echo "build_type": {
echo "default": "debug",
echo "choices": {
echo "debug": {
echo "short": "debug",
echo "buildType": "debug"
echo },
echo "release": {
echo "short": "release",
echo "buildType": "release"
echo }
echo }
echo }
echo }
)
echo cmake-variants.json created.
rem Create launch.json
echo Creating launch.json...
> "%targetDir%\launch.json" (
echo {
echo "configurations": [
echo {
echo "type": "cppdbg",
echo "name": "Debug project configuration",
echo "request": "launch",
echo "cwd": "${workspaceRoot}",
echo "MIMode": "gdb",
echo "setupCommands": [
echo {"text": "set remotetimeout 600"},
echo {"text": "set debug-file-directory"}
echo ],
echo "program": "",
echo "miDebuggerServerAddress": "",
echo "variables": {
echo "mcuxStopAtSymbol": "main",
echo "mcuxSerialNumber": "",
echo "mcuxAttach": "false",
echo "mcuxRemoteProbeType": ""
echo },
echo "logging": {
echo "engineLogging": false
echo }
echo }
echo ]
echo }
)
echo launch.json created.
rem Create mcuxpresso-tools.json
echo Creating mcuxpresso-tools.json...
> "%targetDir%\mcuxpresso-tools.json" (
echo {
echo "version": "1.1",
echo "toolchainPath": "",
echo "toolchainVersion": "",
echo "linkedProjects": [],
echo "trustZoneType": "none",
echo "multicoreType": "none",
echo "debug": {
echo "linkserver": {},
echo "pemicro": {},
echo "segger": {}
echo },
echo "projectType": "zephyr-workspace",
echo "sdk": {
echo "boardId": "frdm_mcxn947/mcxn947/cpu0",
echo "version": "",
echo "path": ""
echo }
echo }
)
echo mcuxpresso-tools.json created.
rem Create settings.json
echo Creating settings.json...
> "%targetDir%\settings.json" (
echo {
echo "cmake.configureOnOpen": false,
echo "C_Cpp.errorSquiggles": "disabled",
echo "cmake.preferredGenerators": [
echo "Ninja",
echo "Unix Makefiles",
echo "MinGW Makefiles"
echo ],
echo "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
echo "cmake.sourceDirectory": "${workspaceFolder}"
echo }
)
echo settings.json created.
pause