You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VSCode v1.56+ changed how modifications made by the workspace are handled. There is a setting for enabling modificaitons from the workspace, but this is planned to be deprecated in favor of the workspace trust system. Update the readme with images and instructions for enabling both of these features. When workspace trust takes over, the workspace modification setting can be removed and the setup should still work with minimal effort.
This should be a cleaner way to overwrite the Path variable for the integrated terminal without having to create a custom terminal profile. A custom terminal profile is an option, but I still would need to enable workspace trust to set it as the default. So the choice has been made to stick with the terminal.integrated.env setting for overwriting the path variable in case users want to create custom profiles, as the environment variables set here should persist across all profiles and terminal sessions.
"MAXIM_PATH":"C:\\Maxim",//<-- This is the root installation directory of the Maxim LP Micros Toolchain. Change this if you used a non-default installation location.
6
+
"MAXIM_PATH":"C:\\Maxim",
7
7
8
-
"target":"MAX32665",/*<-- Change to the correct target micro.
9
-
Options :
10
-
MAX3263x
11
-
MAX32520
12
-
MAX32600
13
-
MAX32620
14
-
MAX32625
15
-
MAX32650
16
-
MAX32660
17
-
MAX32665-MAX32668 (Set MAX32665 if you are using of these)
"MAXIM_PATH":"C:\\Maxim",//<-- This is the root installation directory of the Maxim LP Micros Toolchain. Change this if you used a non-default installation location.
6
+
"MAXIM_PATH":"C:\\Maxim",
7
7
8
-
"target":"MAX32665",/*<-- Change to the correct target micro.
9
-
Options :
10
-
MAX3263x
11
-
MAX32520
12
-
MAX32600
13
-
MAX32620
14
-
MAX32625
15
-
MAX32650
16
-
MAX32660
17
-
MAX32665-MAX32668 (Set MAX32665 if you are using of these)
"MAXIM_PATH":"C:\\MaximSDK", //<-- This is the root installation directory of the Maxim Micros Toolchain. Change this if you used a non-default installation location.
"MAXIM_PATH":"C:\\MaximSDK", //<-- This is the root installation directory of the Maxim Micros Toolchain. Change this if you used a non-default installation location.
Copy file name to clipboardExpand all lines: readme.md
+73-37Lines changed: 73 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ This is a [Visual Studio Code](https://code.visualstudio.com/)-based development
5
5
6
6
7
7
# Requirements
8
-
Before getting started, ensure that you have installed all of the dependencies below :
8
+
**Before getting started, ensure that you have installed all of the dependencies below** :
9
9
*[Visual Studio Code](https://code.visualstudio.com/)
10
10
*[Maxim Micros SDK](https://www.maximintegrated.com/content/maximintegrated/en/design/software-description.html/swpart=SFW0010820A) (If you are using any of the micros below)
11
11
* MAX32520
@@ -23,11 +23,43 @@ Before getting started, ensure that you have installed all of the dependencies b
23
23
* MAX32650
24
24
* MAX32660
25
25
* MAX32665-MAX32668
26
-
*[C/C++ VSCode Extension](https://github.com/microsoft/vscode-cpptools) (This can be installed from within VSCode via the extension manager. Search for ms-vscode.cpptools)
26
+
*[C/C++ VSCode Extension](https://github.com/microsoft/vscode-cpptools) (This can be installed from within VSCode via the extension manager. Search for `ms-vscode.cpptools`)
27
27
28
28
29
29
# Setup
30
-
This VS Code environment can be injected into any workspace by copying the correct `.vscode` folder and `Makefile` into the root directory of the workspace. You can create a new project from scratch by injecting into an empty directory (Option 1), injecting into a project with existing source code (Option 2), or starting with one of the pre-made project frameworks (Option 3).
30
+
This VS Code workspace modifies environment variables of the integrated terminal. **Before proceeding, please enable workspace trust and workspace modifications, and then restart VSCode.** Open your settings with `File > Preferences > Settings`.
31
+
32
+
Workspace trust can be enabled with the `security.workspace.trust` settings, as shown below.
When opening workspaces and folders for the first time VSCode will now prompt for trust, as shown below. This can be enabled/disabled with the `security.workspace.trust.startupPrompt` settings option.
The .JSON source files within the .vscode folders of this repo contain all of the modifications made by this workspace. Mainly, a few directories are appended to the system Path variable used by the integrated terminal to make the toolchain accessible from the command line.
57
+
58
+
# Project Setup
59
+
Projects can be created by:
60
+
* (Option 1) Injecting the workspace into an empty directory to create a new project.
61
+
* (Option 2) Injecting the workspace into a directory with existing source code to integrate into an existing project.
62
+
* (Option 3) Starting with a pre-made example project.
31
63
32
64
## Option 1 - Creating a New Project
33
65
1. Download the latest correct version of this repo from the [Releases](https://github.com/MaximIntegratedTechSupport/VSCode-Maxim/releases) page for your SDK and extract it to an accessible location.
@@ -46,17 +78,13 @@ This VS Code environment can be injected into any workspace by copying the corre
46
78
47
79
6. Browse to the root directory of the workspace folder created in step 2.
48
80
49
-
7. Launch a new terminal with `Terminal > New Terminal`.
50
-
51
-
8. VS Code will prompt 'Do you allow this workspace to modify your terminal shell?' Click `Allow` and restart VS Code.
52
-
53
-
9. From within VS Code, open the `settings.json` file located in the `.vscode` folder.
81
+
7. From within VS Code, open the `settings.json` file located in the `.vscode` folder.
54
82
55
-
10. Set the `"target"` variable to the correct microcontroller you are using.
83
+
8. Set the `"target"` variable to the correct microcontroller you are using. See [Changing the Target Microcontroller](#Changing-the-Target-Microcontroller) for value strings.
56
84
57
-
11. (Optional) Set the `MAXIM_PATH` variable to to the root directory of your toolchain installation. This is only necessary if you used a non-default installation location.
85
+
9. (Optional) Set the `MAXIM_PATH` variable to to the root directory of your toolchain installation. This is only necessary if you used a non-default installation location.
58
86
59
-
12. That's it! See [Testing the Setup](#Testing-the-Setup) below to verify everything is working properly, [Usage](#Usage) for using the VS Code environment, and [Makefile Configuration](#Makefile-Configuration) for details on adding source code to the project.
87
+
10. That's it! See [Testing the Setup](#Testing-the-Setup) below to verify everything is working properly, [Usage](#Usage) for using the VS Code environment, and [Build System Configuration](#Build-System-Configuration) for deeper configuration options such as adding source files, configuring intellisense paths, etc.
60
88
61
89
## Option 2 - Injecting into an Existing Project
62
90
1. Download the latest correct version of this repo from the [Releases](https://github.com/MaximIntegratedTechSupport/VSCode-Maxim/releases) page for your SDK and extract it to an accessible location.
@@ -82,19 +110,15 @@ This VS Code environment can be injected into any workspace by copying the corre
82
110
83
111
6. Browse to the root directory of the workspace folder located in step 2.
84
112
85
-
7.Launch a new terminal with `Terminal > New Terminal`.
113
+
7.From within VS Code, open the `settings.json` file located in the `.vscode` folder.
86
114
87
-
8.VS Code will prompt 'Do you allow this workspace to modify your terminal shell?' Click `Allow` and restart VS Code.
115
+
8.Set the `"target"` variable to the correct microcontroller you are using. See [Changing the Target Microcontroller](#Changing-the-Target-Microcontroller) for value strings.
88
116
89
-
9.From within VS Code, open the `settings.json` file located in the `.vscode` folder.
117
+
9.(Optional) Set the `MAXIM_PATH` variable to to the root directory of your toolchain installation. This is only necessary if you used a non-default installation location.
90
118
91
-
10.Set the `"target"` variable to the correct microcontroller you are using.
119
+
10.The VS Code environment is now injected, but you will need to do some additional configuration of the Makefile to add in your existing source code to the build process. See [Adding Source Files](#Adding-Source-Files) for more details on this.
92
120
93
-
11. (Optional) Set the `MAXIM_PATH` variable to to the root directory of your toolchain installation. This is only necessary if you used a non-default installation location.
94
-
95
-
12. The VS Code environment is now injected, but you will need to do some additional configuration of the Makefile to add in your existing source code to the build process. See [Adding Source Files](#Adding-Source-Files) for more details on this.
96
-
97
-
13. See [Testing the Setup](#Testing-the-Setup) below to verify everything is working properly, [Usage](#Usage) for using the VS Code environment, and [Makefile Configuration](#Makefile-Configuration) for additional configuration options.
121
+
11. See [Testing the Setup](#Testing-the-Setup) below to verify everything is working properly, [Usage](#Usage) for using the VS Code environment, and [Build System Configuration](#Build-System-Configuration) for deeper configuration options such as adding source files, configuring intellisense paths, etc.
98
122
99
123
## Option 3 - Starting with a Pre-Made Project
100
124
1. Download the latest correct version of this repo from the [Releases](https://github.com/MaximIntegratedTechSupport/VSCode-Maxim/releases) page for your SDK and extract it to an accessible location.
@@ -107,22 +131,18 @@ This VS Code environment can be injected into any workspace by copying the corre
107
131
108
132
5. Browse to the root directory of the extracted framework project from step 2.
109
133
110
-
6. Launch a new terminal with `Terminal > New Terminal`.
111
-
112
-
7. VS Code will prompt 'Do you allow this workspace to modify your terminal shell?' Click `Allow` and restart VS Code.
134
+
6. From within VS Code, open the `settings.json` file located in the `.vscode` folder.
113
135
114
-
8. From within VS Code, open the `settings.json` file located in the`.vscode` folder.
136
+
7. Set the `"target"` variable to the correct microcontroller you are using. See [Changing the Target Microcontroller](#Changing-the-Target-Microcontroller) for value strings.
115
137
116
-
9.Set the `"target"` variable to the correct microcontroller you are using.
138
+
8. (Optional) Set the `MAXIM_PATH` variable to to the root directory of your toolchain installation. This is only necessary if you used a non-default installation location.
117
139
118
-
10. (Optional) Set the `MAXIM_PATH` variable to to the root directory of your toolchain installation. This is only necessary if you used a non-default installation location.
119
-
120
-
11. That's it! See [Testing the Setup](#Testing-the-Setup) below to verify everything is working properly, [Usage](#Usage) for using the VS Code environment, and [Project Configuration](#Project-Configuration) for details on configuring the project.
140
+
9. That's it! See [Testing the Setup](#Testing-the-Setup) below to verify everything is working properly, [Usage](#Usage) for using the VS Code environment, and [Build System Configuration](#Build-System-Configuration) for deeper configuration options such as adding source files, configuring intellisense paths, etc.
121
141
122
142
## Testing the Setup
123
143
After injecting with Option 1 or Option 2, your toolchain should be accessible from the terminal. To test that everything is working properly :
124
144
125
-
* Navigate to the open `TERMINAL` tab on the bottom of the VS Code application. If a terminal is not open, you can open a new terminal with `Terminal > New Terminal` or (Ctrl+Shift+`). You should be able to run the following commands to retrieve version numbers successfully from within the terminal :
145
+
* Navigate to the open `TERMINAL` tab on the bottom of the VS Code application. If a terminal is not open, you can open a new terminal with `Terminal > New Terminal` or (Ctrl+Shift+`). The following commands to retrieve version numbers should be able to be run successfully from within the terminal :
126
146
127
147
*`make -v`
128
148
*`openocd -v`
@@ -159,7 +179,7 @@ The Debugger can be launched with `Run > Start Debugging`, with the shortcut `F5
159
179
* When a debugging session is launched, the Build task will be launched automatically. A successful build must be completed before debugging.
160
180
161
181
162
-
# Project Configuration
182
+
# Build System Configuration
163
183
164
184
## Configuring the Makefile
165
185
The Makefile is the core file for the build system. All configuration tasks such as adding source files to the build, setting compiler flags, and linking libraries are handled via the Makefile. The [GNU Make Manual](https://www.gnu.org/software/make/manual/html_node/index.html) is a good one to have on hand.
@@ -181,22 +201,38 @@ The Makefile is the core file for the build system. All configuration tasks suc
181
201
### Optimization Level
182
202
* The optimization level that the compiler uses can be set by changing the `MXC_OPTIMIZE_CFLAGS` variable. See [GCC Optimization Options](https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html) for more details on available optimization levels. For example, disable optimization with `MXC_OPTIMIZE_CFLAGS = -O0`
183
203
184
-
## VS Code Settings
185
-
### Setting Include Paths for Intellisense
204
+
## Setting Include Paths for Intellisense
186
205
VS Code's intellisense engine must be told where to find the header files for your source code. By default, include paths have been added for Maxim's perpiheral drivers, and all of the sub-directories of the workspace will be searched for header files. If VS Code throws an error on an `#include` statement (and the file exists), then an include path is most likely missing.
187
206
188
207
To add additional include paths :
189
208
1. Open the `\.vscode\c_cpp_properties.json` file.
190
209
191
210
2. Add the include path(s) to the `configurations > includePath` list.
192
211
193
-
###Changing the Target Microcontroller
212
+
## Changing the Target Microcontroller
194
213
1. Open the `\.vscode\settings.json` file.
195
214
196
215
2. Change the `"target"` variable to the correct value for your microcontroller.
197
-
198
-
## Known Issues
199
-
### 'An Exception Occurred' on Main
216
+
Options for the LP Micros SDK are:
217
+
* "MAX3263x"
218
+
* "MAX32520"
219
+
* "MAX32600"
220
+
* "MAX32620"
221
+
* "MAX32625"
222
+
* "MAX32650"
223
+
* "MAX32660"
224
+
* "MAX32665" (for MAX32665-MAX32668)
225
+
226
+
and options for the Maxim Micros SDK are:
227
+
* "MAX32520"
228
+
* "MAX32570"
229
+
* "MAX32655"
230
+
* "MAX32670"
231
+
* "MAX32675"
232
+
* "MAX78000"
233
+
234
+
# Known Issues
235
+
## 'An Exception Occurred' on Main
200
236
There is a known issue when debugging where a false exception is thrown on main when the debugger is started. A temporary workaround can be used to get rid of this false exception message - set a breakpoint on main.
201
237
202
-
This issue does not affect the functionality of the environment.
238
+
This issue does not affect the functionality of the debugger.
0 commit comments