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 extra button for flashing #774

Merged
merged 3 commits into from
Aug 31, 2022
Merged

Conversation

radurentea
Copy link
Collaborator

@radurentea radurentea commented Aug 5, 2022

Description

Flash button was activating only the "select flash method" command, so I've changed the name of the button and added an extra button for flashing.

Fixes # (VSC-924)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How has this been tested?

Tested on ESP-S2 Chip

  1. Launch VSCode
  2. Create a project using blink template. Click View > Command Palette.. > ESP-IDF: Show Examples Projects
  3. Click menu View -> Command Palette... and search for the ESP-IDF: SDK Configuration editor command
  4. Search for partition_table_custom and select Custom partition table CSV from Partition Table and set the filename. It will search this file in your current project directory.
  5. Click menu View -> Command Pallette... and search for ESP-IDF: Open Partition Table Editor UI
  6. Added the following values:
    image
  7. Clicked on the "Select Flash Method" button and choosed UART
  8. Clicked the "Build" button and waited for it to build the project
  9. Clicked the "Flash" and the project was flashed into the chip
  10. Made sure the build and flashing were complete and succeeded without any errors

Test Configuration:

  • ESP-IDF Version: 4.4
  • OS (Windows,Linux and macOS): macOS

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

@radurentea radurentea self-assigned this Aug 5, 2022
@radurentea radurentea added the bugfix Fixing some issue and bug in this PR label Aug 5, 2022
Copy link
Collaborator

@brianignacio5 brianignacio5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@AndriiFilippov
Copy link
Collaborator

@radurentea hi !

Tested under:
ESP-IDF Version: 4.4
OS - Windows 10

I have fallowed your "How has this been tested?" but got this error during build for (esp32/esp32s2) targets

LOG:

-- Build files have been written to: C:/Users/AndriiFilippov/e/esp-idf/examples/get-started/1/blink/build
[2/1036] Generating ../../partition_table/partition-table.bin
FAILED: partition_table/partition-table.bin C:/Users/AndriiFilippov/e/esp-idf/examples/get-started/1/blink/build/partition_table/partition-table.bin
cmd.exe /C "cd /D C:\Users\AndriiFilippov\e\esp-idf\examples\get-started\1\blink\build\esp-idf\partition_table && c:\Users\AndriiFilippov\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/Users/AndriiFilippov/e/esp-idf/components/partition_table/gen_esp32part.py -q --offset 0x8000 --flash-size 2MB C:/Users/AndriiFilippov/e/esp-idf/examples/get-started/1/blink/partitions.csv C:/Users/AndriiFilippov/e/esp-idf/examples/get-started/1/blink/build/partition_table/partition-table.bin && C:\Users\AndriiFilippov\.espressif\tools\cmake\3.23.1\bin\cmake.exe -E echo "Partition table binary generated. Contents:" && C:\Users\AndriiFilippov\.espressif\tools\cmake\3.23.1\bin\cmake.exe -E echo ******************************************************************************* && c:\Users\AndriiFilippov\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe C:/Users/AndriiFilippov/e/esp-idf/components/partition_table/gen_esp32part.py -q --offset 0x8000 --flash-size 2MB C:/Users/AndriiFilippov/e/esp-idf/examples/get-started/1/blink/build/partition_table/partition-table.bin && C:\Users\AndriiFilippov\.espressif\tools\cmake\3.23.1\bin\cmake.exe -E echo *******************************************************************************"
CSV Error: Partitions overlap. Partition at line 4 sets offset 0x1000. Previous partition ends 0xf000
[3/1036] Generating memory.ld linker script...
ninja: build stopped: subcommand failed.

 *  The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command ninja " terminated with exit code: 1. 

@radurentea
Copy link
Collaborator Author

radurentea commented Aug 12, 2022

@AndriiFilippov Hi, thank you!

It seems that the custom settings were the issue. I've previously attached the screenshot with some custom settings from the vscode documentation we've had for the partition table, not with the actually ones I've tested with.
Here are some working custom settings for the partition table, that I've took from the espressif documentation.

nvs, data, nvs, 0x9000, 0x4000
otadata, data, ota, 0xd000, 0x2000
phy_init, data, phy, 0xf000, 0x1000
factory, app, factory, 0x10000, 1M

I've updated the screenshot from the VSCode documentation with the new custom setting
Screenshot 2022-08-12 at 14 11 58

Can you please test it again using these new settings?

@AndriiFilippov
Copy link
Collaborator

@radurentea
Hi !
Tested under:
OS - Windows / Linux

LGTM

@github-actions
Copy link

Pull request has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

@github-actions github-actions bot added the stale Stale PR or Issue label Aug 31, 2022
@brianignacio5 brianignacio5 removed the stale Stale PR or Issue label Aug 31, 2022
@radurentea radurentea merged commit 55cb908 into master Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fixing some issue and bug in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants