Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add project wizard doc fix openocd configs #651

Merged
merged 5 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ Click <kbd>F1</kbd> to show Visual studio code actions, then type **ESP-IDF** to
| Doctor command | | |
| Erase flash memory from device | <kbd>⌘</kbd> <kbd>I</kbd> <kbd>R</kbd> | <kbd>Ctrl</kbd> <kbd>E</kbd> <kbd>R</kbd> |
| Execute custom task | <kbd>⌘</kbd> <kbd>I</kbd> <kbd>J</kbd> | <kbd>Ctrl</kbd> <kbd>E</kbd> <kbd>J</kbd> |
| Flash (DFU) your project | | |
| Flash (UART) your project | | |
| Flash (with JTag) | | |
| Full clean project | <kbd>⌘</kbd> <kbd>I</kbd> <kbd>X</kbd> | <kbd>Ctrl</kbd> <kbd>E</kbd> <kbd>X</kbd> |
Expand Down
1 change: 1 addition & 0 deletions docs/ONBOARDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
10. [ESP-ADF, ESP-MDF and other frameworks](./tutorial/additional_frameworks.md)
11. [eFuse Explorer](./tutorial/efuse.md)
12. [Rainmaker](./tutorial/rainmaker.md)
13. [New project wizard](./new_project_wizard.md)

## Documentation

Expand Down
27 changes: 27 additions & 0 deletions docs/tutorial/new_project_wizard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# New project wizard

This feature allows you to create a new project using the ESP-IDF, ESP-ADF and ESP-MDF frameworks and configure the extension settings and the project name.

1. Click menu View -> Command Palette... and search for the **ESP-IDF: New Project**.

<p>
<img src="../../media/tutorials/new_project/new_project_init.png" alt="New project wizard" height="500">
</p>

2. Choose the project name, the directory to create this new project, the Espressif board you are using (or any general Espressif device) and the serial port of the device. You could also choose to import any component directory `component-dir` to the new project which will be copied to the new project's directory `components` sub directory (`<project-dir>/components/component-dir`).

> **NOTE:** If using the custom board option, please take a look at [Configuring of OpenOCD for specific target](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-guides/jtag-debugging/tips-and-quirks.html#configuration-of-openocd-for-specific-target) for more information about these openOCD configuration files and the [debugging tutorial](./debugging.md) for values examples.

3. After that click the `Choose Template` button and choose a template from Extension template and, if configured; ESP-IDF, ESP-ADF and ESP-MDF frameworks.

<p>
<img src="../../media/tutorials/new_project/new_project_templates.png" alt="New project templates" height="500">
</p>

4. Choose your desired template and click the `Create project using template <template-name>` button where `<template-name>` is the name of the selected template.

brianignacio5 marked this conversation as resolved.
Show resolved Hide resolved
5. After the project is created, a notification window will show up to open the newly created project or not.

<p>
<img src="../../media/tutorials/new_project/new_project_templates.png" alt="New project templates" height="500">
</p>
1 change: 1 addition & 0 deletions docs/tutorial/toc.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
10. [ESP-ADF, ESP-MDF and other frameworks](./additional_frameworks.md)
11. [eFuse Explorer](./efuse.md)
12. [Rainmaker](./rainmaker.md)
13. [New project wizard](./new_project_wizard.md)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/newProject/newProjectPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ export class NewProjectPanel {
) {
const defConfigFiles =
newProjectArgs.boards && newProjectArgs.boards.length > 0
? newProjectArgs.boards[0].configFiles
: newProjectArgs.targetList[0].configFiles;
? newProjectArgs.boards[0].configFiles.join(",")
: newProjectArgs.targetList[0].configFiles.join(",");
this.panel.webview.postMessage({
boards: newProjectArgs.boards,
command: "initialLoad",
Expand Down
11 changes: 7 additions & 4 deletions src/newProject/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* Project: ESP-IDF VSCode Extension
* File Created: Tuesday, 27th July 2021 4:35:42 pm
* Copyright 2021 Espressif Systems (Shanghai) CO LTD
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -52,7 +52,10 @@ export async function setCurrentSettingsInTemplate(
if (mdfPathDir) {
settingsJson["idf.espMdfPath" + isWin] = mdfPathDir;
}
settingsJson["idf.openOcdConfigs"] = openOcdConfigs.split(",");
settingsJson["idf.openOcdConfigs"] =
openOcdConfigs.indexOf(",") !== -1
? openOcdConfigs.split(",")
: [openOcdConfigs];
if (port.indexOf("no port") === -1) {
settingsJson["idf.port" + isWin] = port;
}
Expand Down