Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 17d78d7

Browse files
authored
Merge branch 'main' into dev/gcampbell/OutputFolder
2 parents 1c00ea3 + 0890134 commit 17d78d7

25 files changed

+1018
-882
lines changed

.github/workflows/build.yml

-2
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ on:
77
push:
88
branches:
99
- main
10-
- release
1110
tags:
1211
- v*
1312
pull_request:
1413
branches:
1514
- main
16-
- release
1715

1816
jobs:
1917
build:

.vscode/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,12 @@
1111
"**/.git/objects/**": true,
1212
"**/out/*": true,
1313
"**/node_modules/**": true
14+
},
15+
"terminal.integrated.automationProfile.linux": {
16+
"path": "${env:SHELL}",
17+
"env": {
18+
"HOME": "${env:HOME}",
19+
"USER": "${env:USER}"
20+
}
1421
}
1522
}

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## Version 0.4.11
5+
6+
- Release date: February 10, 2022
7+
8+
### Changed
9+
10+
This release includes a major change in internal handling of serial port
11+
communication ([#1450](https://github.com/microsoft/vscode-arduino/pull/1450)),
12+
which is designed to address antivirus false positives from the old serial
13+
monitor. Please report any issues you see with the serial monitor.
14+
15+
- Show all supported boards and set default build directory [#1425](https://github.com/microsoft/vscode-arduino/pull/1425)
16+
- Add option for printing timestamp before each line of Serial Monitor output [#1430](https://github.com/microsoft/vscode-arduino/pull/1430)
17+
- Fix problem with stripping whitespace [#1433](https://github.com/microsoft/vscode-arduino/pull/1433)
18+
- Added Mac shortcuts on readme [#1439](https://github.com/microsoft/vscode-arduino/pull/1439)
19+
- Switch from serial-monitor-cli to node-serialport [#1450](https://github.com/microsoft/vscode-arduino/pull/1450)
20+
421
## Version 0.4.10
522

623
- Release date: January 14, 2022

CONTRIBUTING.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ There are many ways that you can contribute, beyond writing code. The goal of th
99
If you are interested in writing code to fix issues, first look at the issues with the [help-wanted](https://github.com/Microsoft/vscode-arduino/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) label. They should have the context and code pointers needed to get started. If not, then feel free to ask for some, and we will be happy to provide any guidance you need.
1010

1111
When you are doing code fix, please work against [main](https://github.com/microsoft/vscode-arduino/tree/main)
12-
branch and also submit pull request to `main` branch.
13-
Changes will be merged into `release` branch after production release.
12+
branch and also submit pull request to `main` branch. Production releases will be tagged from `main`.
1413

1514

1615

README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ The Arduino CLI can be downloaded from the repository's [release page](https://g
2929
- If you use the CLI you will have to set `arduino.path` since the CLI does not have a default path.
3030

3131
## Installation
32-
Open VS Code and press <kbd>F1</kbd> or <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> to open command palette, select **Install Extension** and type `vscode-arduino`.
32+
Open VS Code and press <kbd>F1</kbd> or <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> *or* <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> to open command palette, select **Install Extension** and type `vscode-arduino`.
3333

34-
Or launch VS Code Quick Open (<kbd>Ctrl</kbd> + <kbd>P</kbd>), paste the following command, and press enter.
34+
Or launch VS Code Quick Open (<kbd>Ctrl</kbd> + <kbd>P</kbd> *or* <kbd>Cmd</kbd> + <kbd>P</kbd> ), paste the following command, and press enter.
3535
```bash
3636
ext install vscode-arduino
3737
```
@@ -42,7 +42,7 @@ You can also install directly from the Marketplace within Visual Studio Code, se
4242
You can find code samples and tutorials each time that you connect a supported device. Alternatively you can visit our [IoT Developer Blog Space](https://devblogs.microsoft.com/iotdev/) or [Get Started Tutorials](https://docs.microsoft.com/azure/iot-hub/iot-hub-arduino-iot-devkit-az3166-get-started).
4343

4444
## Commands
45-
This extension provides several commands in the Command Palette (<kbd>F1</kbd> or <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) for working with `*.ino` files:
45+
This extension provides several commands in the Command Palette (<kbd>F1</kbd> or <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd> *or* <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>P</kbd>) for working with `*.ino` files:
4646

4747
- **Arduino: Board Manager**: Manage packages for boards. You can add 3rd party Arduino board by configuring `Additional Board Manager URLs` in the board manager.
4848
- **Arduino: Change Baud Rate**: Change the baud rate of the selected serial port.
@@ -80,10 +80,12 @@ This extension provides several commands in the Command Palette (<kbd>F1</kbd> o
8080
| `arduino.disableTestingOpen` | Enable/disable automatic sending of a test message to the serial port for checking the open status. The default value is `false` (a test message will be sent). |
8181
| `arduino.skipHeaderProvider` | Enable/disable the extension providing completion items for headers. This functionality is included in newer versions of the C++ extension. The default value is `false`.|
8282
| `arduino.defaultBaudRate` | Default baud rate for the serial port monitor. The default value is 115200. Supported values are 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 74880, 115200, 230400 and 250000 |
83-
| `arduino.defaultTimestampFormat` | Format of timestamp printed before each line of Serial Monitor output. You can find list of all available placeholders [here](https://strftime.org). |
83+
| `arduino.defaultTimestampFormat` | Format of timestamp printed before each line of Serial Monitor output. You can find list of all available placeholders [here](https://github.com/samsonjs/strftime#supported-specifiers). |
8484
| `arduino.disableIntelliSenseAutoGen` | When `true` vscode-arduino will not auto-generate an IntelliSense configuration (i.e. `.vscode/c_cpp_properties.json`) by analyzing Arduino's compiler output. |
85+
| `arduino.analyzeOnOpen` | When true, automatically run analysis when the project is opened. Only works when `arduino.analyzeOnSettingChange` is true. |
86+
| `arduino.analyzeOnSettingChange` | When true, automatically run analysis when board, configuration, or sketch settings are changed. |
8587

86-
The following Visual Studio Code settings are available for the Arduino extension. These can be set in global user preferences <kbd>Ctrl</kbd> + <kbd>,</kbd> or workspace settings (`.vscode/settings.json`). The latter overrides the former.
88+
The following Visual Studio Code settings are available for the Arduino extension. These can be set in global user preferences <kbd>Ctrl</kbd> + <kbd>,</kbd> *or* <kbd>Cmd</kbd> + <kbd>,</kbd> or workspace settings (`.vscode/settings.json`). The latter overrides the former.
8789

8890
```json
8991
{
@@ -122,7 +124,7 @@ The following settings are as per sketch settings of the Arduino extension. You
122124
- `port` - Name of the serial port connected to the device. Can be set by the `Arduino: Select Serial Port` command. For Mac users could be "/dev/cu.wchusbserial1420".
123125
- `board` - Currently selected Arduino board alias. Can be set by the `Arduino: Change Board Type` command. Also, you can find the board list there.
124126
- `output` - Arduino build output path. If not set, Arduino will create a new temporary output folder each time, which means it cannot reuse the intermediate result of the previous build leading to long verify/upload time, so it is recommended to set the field. Arduino requires that the output path should not be the workspace itself or in a subfolder of the workspace, otherwise, it may not work correctly. By default, this option is not set. It's worth noting that the contents of this file could be deleted during the build process, so pick (or create) a directory that will not store files you want to keep.
125-
- `debugger` - The short name of the debugger that will be used when the board itself does not have a debugger and there is more than one debugger available. You can find the list of debuggers [here](https://github.com/Microsoft/vscode-arduino/blob/release/misc/debuggerUsbMapping.json). By default, this option is not set.
127+
- `debugger` - The short name of the debugger that will be used when the board itself does not have a debugger and there is more than one debugger available. You can find the list of debuggers [here](https://github.com/Microsoft/vscode-arduino/blob/main/misc/debuggerUsbMapping.json). By default, this option is not set.
126128
- `prebuild` - External command which will be invoked before any sketch build (verify, upload, ...). For details see the [Pre- and Post-Build Commands](#Pre--and-Post-Build-Commands) section.
127129
- `postbuild` - External command to be run after the sketch has been built successfully. See the afore mentioned section for more details.
128130
- `intelliSenseGen` - Override the global setting for auto-generation of the IntelliSense configuration (i.e. `.vscode/c_cpp_properties.json`). Three options are available:
@@ -198,14 +200,14 @@ Make sure that your Arduino board can work with [STLink](http://www.st.com/en/de
198200

199201
Steps to start debugging:
200202
1. Plug in your board to your development machine properly. For those boards that do not have an on-board debugging chip, you need to use a STLink or JLink connector.
201-
2. Go to the **Debug View** (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>D</kbd>). and set breakpoints in your source files.
203+
2. Go to the **Debug View** (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>D</kbd> *or* <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>D</kbd>). and set breakpoints in your source files.
202204
3. Press <kbd>F5</kbd> to select your debugging environment.
203205
4. When your breakpoint is hit, you can see variables and add expression(s) to watch on the Debug Side Bar.
204206

205207
> To learn more about how to debug Arduino code, visit our [team blog](https://blogs.msdn.microsoft.com/iotdev/2017/05/27/debug-your-arduino-code-with-visual-studio-code/).
206208
207209
## Change Log
208-
See the [Change log](https://github.com/Microsoft/vscode-arduino/blob/release/CHANGELOG.md) for details about the changes in each version.
210+
See the [Change log](https://github.com/Microsoft/vscode-arduino/blob/main/CHANGELOG.md) for details about the changes in each version.
209211

210212
## Supported Operating Systems
211213
Currently this extension supports the following operating systems:
@@ -243,7 +245,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://ope
243245
The [Microsoft Enterprise and Developer Privacy Statement](https://www.microsoft.com/en-us/privacystatement/EnterpriseDev/default.aspx) describes the privacy statement of this software.
244246

245247
## License
246-
This extension is licensed under the [MIT License](https://github.com/Microsoft/vscode-arduino/blob/release/LICENSE.txt). Please see the [Third Party Notice](https://github.com/Microsoft/vscode-arduino/blob/release/ThirdPartyNotices.txt) file for additional copyright notices and terms.
248+
This extension is licensed under the [MIT License](https://github.com/Microsoft/vscode-arduino/blob/main/LICENSE.txt). Please see the [Third Party Notice](https://github.com/Microsoft/vscode-arduino/blob/main/ThirdPartyNotices.txt) file for additional copyright notices and terms.
247249

248250
## Contact Us
249251
If you would like to help build the best Arduino experience with VS Code, you can reach us directly at [gitter chat room](https://gitter.im/Microsoft/vscode-arduino).

azure-pipelines.yml

+5-15
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ parameters:
1515

1616
pr:
1717
- main
18-
- release
1918

2019
trigger:
2120
branches:
2221
include:
2322
- main
24-
- release
2523
tags:
2624
include:
2725
- v*
@@ -32,13 +30,13 @@ pool:
3230
variables:
3331
# MicroBuild requires TeamName to be set.
3432
TeamName: C++ Cross Platform and Cloud
35-
# If the user didn't override the signing type, then only real-sign on tags,
36-
# main, or release.
33+
# If the user didn't override the signing type, then only real-sign on tags or
34+
# the main branch.
3735
${{ if ne(parameters.SignTypeOverride, 'default') }}:
3836
SignType: ${{ parameters.SignTypeOverride }}
39-
${{ if and(eq(parameters.SignTypeOverride, 'default'), or(startsWith(variables['Build.SourceBranch'], 'refs/tags'), eq(variables['Build.SourceBranchName'], 'main'), eq(variables['Build.SourceBranchName'], 'release'))) }}:
37+
${{ if and(eq(parameters.SignTypeOverride, 'default'), or(startsWith(variables['Build.SourceBranch'], 'refs/tags'), eq(variables['Build.SourceBranchName'], 'main'))) }}:
4038
SignType: real
41-
${{ if and(eq(parameters.SignTypeOverride, 'default'), not(or(startsWith(variables['Build.SourceBranch'], 'refs/tags'), eq(variables['Build.SourceBranchName'], 'main'), eq(variables['Build.SourceBranchName'], 'release')))) }}:
39+
${{ if and(eq(parameters.SignTypeOverride, 'default'), not(or(startsWith(variables['Build.SourceBranch'], 'refs/tags'), eq(variables['Build.SourceBranchName'], 'main')))) }}:
4240
SignType: test
4341

4442
steps:
@@ -115,21 +113,13 @@ steps:
115113
includeRootFolder: false
116114
archiveType: zip
117115
archiveFile: $(Build.StagingDirectory)\vscode-arduino.vsix
118-
- script: python .\build\markExecutableFiles.py
119-
displayName: Make serial monitor executable
120116
- task: MSBuild@1
121117
displayName: Sign VSIX
122118
inputs:
123119
solution: .\build\SignVsix.proj
124120
msbuildArguments: /p:SignType=$(SignType)
125121
# MicroBuild signing will always fail on public PRs.
126-
# TODO: Signing the VSIX strips out the "main" executables for
127-
# serial-monitor-cli on Mac and Linux, completely breaking serial
128-
# functionality in the extension on these platforms. For now we disable VSIX
129-
# signing because it's not a strict requirement, but we should investigate
130-
# if we can either add extensions to these files or support extensionless
131-
# files in VSIX signing.
132-
condition: and(false, ne(variables['Build.Reason'], 'PullRequest'))
122+
condition: ne(variables['Build.Reason'], 'PullRequest')
133123
- publish: $(Build.StagingDirectory)\vscode-arduino.vsix
134124
artifact: VS Code extension VSIX
135125
displayName: Publish extension VSIX as artifact

build/SignFiles.proj

-8
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,6 @@
1313
<FilesToSign Include="$(OutDir)\**\*.js" Exclude="$(OutDir)\**\node_modules\**\*.js">
1414
<Authenticode>Microsoft400</Authenticode>
1515
</FilesToSign>
16-
<!-- Authenticode only works on Windows files. If we get the ability to sign Linux and Mac executables, the signing
17-
steps should probably move to the serial-monitor-cli repo instead of doing all the signing here. -->
18-
<FilesToSign Include="$(OutDir)\out\serial-monitor-cli\win32\*.exe">
19-
<Authenticode>Microsoft400</Authenticode>
20-
</FilesToSign>
21-
<FilesToSign Include="$(OutDir)\out\serial-monitor-cli\win32\*.dll">
22-
<Authenticode>Microsoft400</Authenticode>
23-
</FilesToSign>
2416
<FilesToSign Include="$(OutDir)\**\node_modules\**\*.js">
2517
<Authenticode>3PartyScriptsSHA2</Authenticode>
2618
</FilesToSign>

build/markExecutableFiles.py

-31
This file was deleted.

gulpfile.js

+1-23
Original file line numberDiff line numberDiff line change
@@ -63,28 +63,6 @@ gulp.task("node_modules-webpack", (done) => {
6363
});
6464
});
6565

66-
gulp.task("insert-serial-monitor-cli", async (done) => {
67-
const platforms = [
68-
"linux",
69-
"darwin",
70-
"win32",
71-
];
72-
const release = "latest";
73-
const destDir = path.resolve("out", "serial-monitor-cli");
74-
75-
async function downloadAndUnzip(platform) {
76-
const fileName = `${platform}.zip`;
77-
const zipPath = path.join(destDir, fileName);
78-
await download(`https://github.com/microsoft/serial-monitor-cli/releases/${release}/download/${fileName}`,
79-
destDir,
80-
);
81-
await extract(zipPath, { dir: path.join(destDir, platform) });
82-
fs.rmSync(zipPath);
83-
}
84-
85-
Promise.all(platforms.map(downloadAndUnzip)).then(done);
86-
});
87-
8866
gulp.task("ts-compile", () => {
8967
const tsProject = ts.createProject("./tsconfig.json");
9068
return tsProject.src()
@@ -156,7 +134,7 @@ gulp.task("test", (done) => {
156134
});
157135
});
158136

159-
gulp.task("build", gulp.series("clean", "ts-compile", "html-webpack", "node_modules-webpack", "insert-serial-monitor-cli"));
137+
gulp.task("build", gulp.series("clean", "ts-compile", "html-webpack", "node_modules-webpack"));
160138

161139
gulp.task("build_without_view", gulp.series("clean", "ts-compile"));
162140

0 commit comments

Comments
 (0)