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

IEP-925 2.9.1 project combo is empty and launch can throw an exception #739

Merged
merged 4 commits into from
Apr 6, 2023

Conversation

sigmaaa
Copy link
Collaborator

@sigmaaa sigmaaa commented Apr 5, 2023

Description

to show all idf projects, we are checking if a project has an IDF project nature now and passing the active launch target if the default one is missing. Also, to fix the indexer stuck when closing a project, we are returning null in the getCBuildConfiguration method when active launch target is null to avoid exceptions.

Fixes # (IEP-925)

Type of change

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

How has this been tested?

Test 1 (Combo is empty test)

  • create a few espressif IDF projects and few C/C++ projects
  • Launch Terminal -> ESP-IDF Serial Monitor -> Project name combo should contain only esp-idf projects
    Test 2 (launch exception)
  • Right-click on project, Run As -> Run Configurations... -> Double click to create a new project and click 'Run' -> No exception expected
    Test 3 (Indexer stuck on close and reopening the project)
  • build the project, wait for the indexer, and close the project during the indexer running -> project should be able to close and reopen without the indexer stuck. (Verify a few times, since deadlock can be random in this case)

Test Configuration:

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

Dependent components impacted by this PR:

  • build
  • launch
  • ESP-IDF Serial Monitor
  • Indexer
  • project

Checklist

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

Copy link
Collaborator

@kolipakakondal kolipakakondal left a comment

Choose a reason for hiding this comment

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

LGTM

@kolipakakondal
Copy link
Collaborator

Hi @AndriiFilippov Please verify

Copy link
Collaborator

@alirana01 alirana01 left a comment

Choose a reason for hiding this comment

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

LGTM

@kolipakakondal kolipakakondal added this to the v2.9.1 milestone Apr 5, 2023
@AndriiFilippov
Copy link
Collaborator

@sigmaaa hi !

Tested:
OS - Windows 10
ESP-IDF: v5.0.1

I am not able to build new empty project.

create project -> name project and click "Finish' in first window -> build -> error

I try to do "Project Clean" / "Full Project Clean" / "Python Clean" + delete build and sdk folders - but still get the error due to clang is default and I can't change it.
Able to change toolchain just after tools re-installation

(https://mattermost.espressif.cn:6689/espressif/pl/fhoww4rt3pyximi4qcoihzdi1o)

-- Project sdkconfig file C:/Users/AndriiFilippov/eclipse-workspace123/cvb/sdkconfig
CMake Warning at C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/tools/cmake/tool_version_check.cmake:36 (message):
  

  Tool doesn't match supported version from list ['esp-2022r1-11.2.0']:
  C:/Users/AndriiFilippov/.espressif/tools/xtensa-clang/14.0.0-38679f0333/xtensa-esp32-elf-clang/bin/xtensa-esp32-elf-gcc.exe

  Please try to run 'idf.py fullclean' to solve it.

Call Stack (most recent call first):
  C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/esp_common/project_include.cmake:10 (check_expected_tool_version)
  C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/tools/cmake/build.cmake:380 (include)
  C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/tools/cmake/build.cmake:599 (__build_process_project_includes)
  C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/tools/cmake/project.cmake:440 (idf_build_process)
  CMakeLists.txt:58 (project)

-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of time_t
-- Check size of time_t - done
-- Adding linker script C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/soc/esp32/ld/esp32.peripherals.ld
-- App "bootloader" version: v5.0.1-dirty
-- Adding linker script C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/esp_rom/esp32/ld/esp32.rom.api.ld
-- Adding linker script C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp_app_format esp_common esp_hw_support esp_rom esp_system esptool_py freertos hal log main micro-ecc newlib partition_table soc spi_flash xtensa
-- Component paths: C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/bootloader C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/bootloader_support C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/efuse C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/esp_app_format C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/esp_common C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/esp_hw_support C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/esp_rom C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/esp_system C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/esptool_py C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/freertos C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/hal C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/log C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/bootloader/subproject/main C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/bootloader/subproject/components/micro-ecc C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/newlib C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/partition_table C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/soc C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/spi_flash C:/Users/AndriiFilippov/e/EXPEREMENT/esp-idf-v5.0.1/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/AndriiFilippov/eclipse-workspace123/cvb/build/bootloader
ninja: build stopped: subcommand failed.
Build complete (3 errors, 0 warnings): C:\Users\AndriiFilippov\eclipse-workspace123\cvb\build
C:\Users\AndriiFilippov.espressif\python_env\idf5.0_py3.11_env\Scripts\python.exe C:\Users\AndriiFilippov\e\EXPEREMENT\esp-idf-v5.0.1\tools\idf_size.py C:/Users/AndriiFilippov/eclipse-workspace123/cvb/build/app-template.map
C:\Users\AndriiFilippov.espressif\python_env\idf5.0_py3.11_env\Scripts\python.exe C:\Users\AndriiFilippov\e\EXPEREMENT\esp-idf-v5.0.1\components\partition_table\gen_esp32part.py C:\Users\AndriiFilippov\eclipse-workspace123\cvb\build\partition_table\partition-table.bin
Total time taken to build the project: 124,447 ms

@sigmaaa
Copy link
Collaborator Author

sigmaaa commented Apr 5, 2023

Hi @AndriiFilippov,

thanks for noticing it. Fixed in the latest commit. PTAL @kolipakakondal, @alirana01. The problem was, that we provided toolchain file only once for idf configuration and the default getToolChain method sometimes gives the wrong toolchain. So it was necessary to override this method

@sigmaaa
Copy link
Collaborator Author

sigmaaa commented Apr 5, 2023

replaced ICDTLaunchConfigurationConstants.ATTR_TOOL_ARGUMENTS with correct arguments fields for UART and JTAG

@kolipakakondal
Copy link
Collaborator

As confirmed @AndriiFilippov it's already verified with the latest changes, hence merging this pr.

@kolipakakondal kolipakakondal merged commit 8235d27 into master Apr 6, 2023
@kolipakakondal kolipakakondal deleted the IEP-925 branch May 10, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants