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

[WIP] IEP-897: FreeRTOS Task View #834

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

[WIP] IEP-897: FreeRTOS Task View #834

wants to merge 1 commit into from

Conversation

alirana01
Copy link
Collaborator

@alirana01 alirana01 commented Oct 17, 2023

Description

Initial work to dump the data from the freertos gdb python package to a simple text file. Will work on windows as the pip package depends on gdb with python support which has issues on mac and linux.

Fixes # (IEP-897)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How has this been tested?

WIP

Test Configuration:

  • ESP-IDF Version: 5.1+
  • OS (Windows):

Checklist

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

Summary by CodeRabbit

  • Refactor: Streamlined the installation process by centralizing the configuration of environment variables, installation of pip packages, and copying of OpenOCD rules into the ToolsUtility class. This change enhances the software's reliability and maintainability.
  • New Feature: Added the ability to install the freertos-gdb package, improving the range of debugging tools available to users.
  • Usability: Updated user-facing messages and tooltips for better clarity during the installation process, enhancing the user experience.
  • Cleanup: Removed unused code and imports, improving the software's efficiency and readability.

@coderabbitai
Copy link

coderabbitai bot commented Oct 17, 2023

Walkthrough

The changes primarily involve refactoring and localization. Functionality related to environment configuration, OpenOCD rules copying, and pip package installation has been moved to ToolsUtility. Localization strings have been updated accordingly. Unused code has been removed.

Changes

File Summary
.../core/tools/util/Messages.java New class Messages added for localization.
.../core/tools/util/ToolsUtility.java New methods added for pip package installation, environment configuration, and OpenOCD rules copying.
.../core/tools/util/messages.properties New localization strings added for OpenOCD rules copying.
.../ui/tools/Messages.java Removed unused string constants.
.../ui/tools/ToolsInstallationHandler.java Refactored to use ToolsUtility. Added installFreertosGdbPipPackage() method.
.../ui/tools/messages.properties Removed unused localization strings. Added new tooltip.
.../ui/update/InstallToolsHandler.java Refactored to use ToolsUtility. Removed unused imports and methods.
.../ui/update/Messages.java Added new string constant for FreeRTOS GDB installation.
.../ui/update/messages.properties Added localization string for FreeRTOS GDB installation.

🐇

"In the land of code, where the shadows lie,

Refactoring reigns, under the cloudless sky.

With each pull request, we make our stand,

Crafting art with a keyboard in hand.

Localization strings, in their rightful place,

Give our software a friendly face.

So here's to the changes, big and small,

In the end, they matter to us all." 🎉


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • Mention @coderabbitai in any review comment for bot assistance.
  • Note: Review comments are made on code diffs or files, not on the PR overview.

Pause Incremental Reviews

  • Insert @coderabbitai: ignore in the PR description to halt the bot's ongoing reviews. Remove the line to resume.
  • Additionally, enter @coderabbitai pause to halt the bot's ongoing reviews as any issue or review comment. To
    resume reviews, enter @coderabbitai resume as any issue or review comment.

@alirana01 alirana01 added the enhancement New feature or request label Oct 17, 2023
@alirana01 alirana01 added this to the 2.11.1 milestone Oct 17, 2023
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Commits Files that changed from the base of the PR and between 0267c08 and 84de9d2.
Files selected for processing (9)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/util/Messages.java (1 hunks)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/util/ToolsUtility.java (9 hunks)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/util/messages.properties (1 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/Messages.java (1 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/ToolsInstallationHandler.java (6 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/messages.properties (1 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/update/InstallToolsHandler.java (5 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/update/Messages.java (1 hunks)
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/update/messages.properties (1 hunks)
Files skipped from review due to trivial changes (6)
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/util/Messages.java
  • bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/util/messages.properties
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/Messages.java
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/messages.properties
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/update/InstallToolsHandler.java
  • bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/update/Messages.java
Additional comments (Suppressed): 13
bundles/com.espressif.idf.core/src/com/espressif/idf/core/tools/util/ToolsUtility.java (6)
  • 26-27: The new hunk imports java.util.ArrayList and java.util.List which were not present in the old hunk. Ensure these new imports are used in the code and are necessary.

  • 343-402: The method installWebSocketClientPipPackage(Queue<String> logQueue) is newly added. It seems to install the websocket-client pip package. Ensure that the package is necessary for the project and that the installation process is compatible with the project's environment.

  • 404-463: The method installFreertosGdbPipPackage(Queue<String> logQueue) is newly added. It seems to install the freertos-gdb pip package. Ensure that the package is necessary for the project and that the installation process is compatible with the project's environment.

  • 465-482: The methods getPipInstallCommand(String pythonPath) and getCommandString(List<String> arguments) are newly added. They seem to be utility methods for pip installation. Ensure that these methods are used in the code and are necessary.

  • 484-494: The method configureRequiredEnvVars(IDFEnvironmentVariables idfEnvironmentVariables) is newly added. It seems to configure environment variables. Ensure that the environment variables being set are necessary for the project and that the configuration process is compatible with the project's environment.

  • 496-575: The method copyOpenOcdRules(Queue<String> logQueue) is newly added. It seems to copy OpenOCD rules. Ensure that the rules being copied are necessary for the project and that the copying process is compatible with the project's environment.

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/tools/ToolsInstallationHandler.java (6)
  • 14-18: The import of java.nio.file.Files and java.nio.file.StandardCopyOption has been removed. Ensure that there are no usages of these classes left in the code.

  • 29-34: The import of org.eclipse.swt.SWT, org.eclipse.swt.widgets.Display, and org.eclipse.swt.widgets.MessageBox has been removed. Ensure that there are no usages of these classes left in the code.

  • 568-577: The methods configEnv() and handleWebSocketClientInstall() have been replaced with ToolsUtility.configureRequiredEnvVars(idfEnvironmentVariables), ToolsUtility.installWebSocketClientPipPackage(logQueue), and ToolsUtility.installFreertosGdbPipPackage(logQueue). Ensure that these new methods provide the same functionality as the old ones.

  • 655-660: The method configEnv() has been removed. Ensure that the environment variables IDF_COMPONENT_MANAGER and IDF_MAINTAINER are being set elsewhere in the code.

  • 854-859: The method copyOpenOcdRules() has been removed. Ensure that the OpenOCD rules are being copied elsewhere in the code.

  • 901-906: The method handleWebSocketClientInstall() has been removed. Ensure that the WebSocket client is being installed elsewhere in the code.

bundles/com.espressif.idf.ui/src/com/espressif/idf/ui/update/messages.properties (1)
  • 23-29: The new hunk introduces a message for installing the freertos-gdb package. Ensure that the corresponding functionality has been implemented in the codebase.
+ InstallToolsHandler_InstallingFreeRtosGdbtMsg=Installing freertos-gdb

@kolipakakondal kolipakakondal marked this pull request as draft February 2, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant