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

HSLink Pro project 2.3.0 #28

Merged
merged 8 commits into from
Jan 2, 2025
Merged

Conversation

HalfSweet
Copy link
Collaborator

@HalfSweet HalfSweet commented Jan 2, 2025

  • 将CherryUSB更新至1.4.2
  • 将hpm sdk更新至1.8.0
  • 加入了端口控制适配V1.1.0硬件

Summary by CodeRabbit

Release Notes for HSLinkPro v2.3.0

  • New Features

    • Enhanced port control with new GPIO management functions
    • Improved USB initialization process
  • Bug Fixes

    • Updated voltage reference threshold for power management
  • Chores

    • Updated CherryUSB subproject to latest commit
    • Updated GitHub workflow pipeline configuration
    • Migrated license from BSD-3-Clause to Apache-2.0
  • Version Update

    • Bumped version from 2.2.4.IO to 2.3.0

Copy link

coderabbitai bot commented Jan 2, 2025

Walkthrough

This pull request introduces several updates to the HSLinkPro project, focusing on workflow improvements, USB initialization changes, and port control enhancements. The GitHub Actions workflow has been renamed and modified to support a new release process triggered by specific tags. The project's bootloader and main application have been updated with more specific USB initialization methods. Additionally, new port control functions have been added to manage GPIO, and the project version has been incremented to 2.3.0.

Changes

File Change Summary
.github/workflows/HSLinkPro-build.yml - Renamed workflow to "HSLinkPro Pipeline"
- Added tag-based release job
- Updated SDK repository path
- Renamed artifact upload step
.github/workflows/create_riscv32_symlink.sh - Script deleted
CherryUSB - Subproject commit updated
projects/HSLink-Pro/bootloader/src/main.c - Updated USB initialization method
projects/HSLink-Pro/common/HSLink_Pro_expansion.c - Added port control functions
- Modified voltage reference threshold
- Updated license identifier
projects/HSLink-Pro/src/.version - Version updated to 2.3.0
projects/HSLink-Pro/src/main.c - Updated USB initialization
- Removed string_descriptors declaration

Sequence Diagram

sequenceDiagram
    participant Workflow as GitHub Actions
    participant Build as Build Job
    participant Release as Release Job
    
    Workflow->>Build: Trigger on push/tag
    Build-->>Build: Compile project
    Build-->>Workflow: Upload artifacts
    
    alt Tag starts with 'refs/tags/'
        Workflow->>Release: Trigger release job
        Release->>Release: Download artifacts
        Release-->>Workflow: Create GitHub Release
    end
Loading

Poem

🐰 A Rabbit's Ode to HSLinkPro's Delight 🚀

Workflows dance, tags take flight,
USB pins now shine so bright,
Ports enabled with rabbit's might,
Version bumped to new height,
Code leaps forward with pure delight!

🌈✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

Actionable comments posted: 0

🧹 Nitpick comments (4)
projects/HSLink-Pro/common/HSLink_Pro_expansion.c (3)

215-226: Consider making port default-off configurable.

Port_Enable_Init defaults to turning the port on (line 225). If the plan is eventually to have the port disabled by default, consider adding a configuration option or environment variable to handle it more flexibly.


228-238: Document port enable/disable methods.

These methods are straightforward but would benefit from short docstrings about their intended usage scenarios and side effects (e.g., indicating which hardware resources they activate or deactivate).


299-299: Re-check commented out port disable.

Removing Port_Disable() effectively leaves the port always enabled once VREF dips below the threshold. If you intended to allow power-down in low-voltage scenarios, reevaluate or reintroduce a call to Port_Disable().

Would you like assistance restoring proper port disable logic or adding a conditional approach?

.github/workflows/HSLinkPro-build.yml (1)

80-80: Trailing spaces detected.

Line 86 has trailing spaces, which can cause lint issues. Consider removing them for a clean CI run.

Proposed fix:

-            releases/Merger.bin    
+            releases/Merger.bin

Also applies to: 85-86

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d8eeec3 and 82a99a7.

📒 Files selected for processing (7)
  • .github/workflows/HSLinkPro-build.yml (4 hunks)
  • .github/workflows/create_riscv32_symlink.sh (0 hunks)
  • CherryUSB (1 hunks)
  • projects/HSLink-Pro/bootloader/src/main.c (1 hunks)
  • projects/HSLink-Pro/common/HSLink_Pro_expansion.c (4 hunks)
  • projects/HSLink-Pro/src/.version (1 hunks)
  • projects/HSLink-Pro/src/main.c (1 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/create_riscv32_symlink.sh
✅ Files skipped from review due to trivial changes (2)
  • projects/HSLink-Pro/src/.version
  • CherryUSB
🧰 Additional context used
🪛 yamllint (1.35.1)
.github/workflows/HSLinkPro-build.yml

[error] 86-86: trailing spaces

(trailing-spaces)


[error] 107-107: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (14)
projects/HSLink-Pro/src/main.c (1)

46-46: Validate USB instance usage.

The switch to board_init_usb(HPM_USB0) looks consistent with supporting USB0. If your hardware or future boards share multiple USB instances, ensure that this is the intended and only usage site or re-check references to alternate USB ports.

projects/HSLink-Pro/bootloader/src/main.c (1)

124-124: Confirm new USB initialization pattern.

By calling board_init_usb(HPM_USB0), the bootloader now aligns with the updated USB initialization approach. Verify that this change fits with your bootloader logic and hardware expectations (e.g., if USB1 usage is never required).

projects/HSLink-Pro/common/HSLink_Pro_expansion.c (4)

4-4: Ensure license change is compatible with project policies.

You’ve switched from BSD-3-Clause to Apache-2.0. Please confirm that the rest of the repository abides by the same license or that a dual-license approach is acceptable.


274-274: Verify repeated initialization behavior.

Port_Enable_Init is invoked from HSP_Init. If code calls HSP_Init multiple times or resets hardware states elsewhere, ensure that re-initializing the port does not conflict with other system components.


292-292: Confirm higher voltage threshold.

Increasing the VREF threshold from 0.6 to 1.6 drastically changes system behavior. Validate that this new threshold aligns with hardware tolerances and intended functional conditions.


295-295: Confirm port enable logic.

Enabling the port when VREF exceeds 1.6 might be correct if the hardware relies on a higher reference voltage. Double-check that this doesn't inadvertently draw current early or conflict with other startup routines.

.github/workflows/HSLinkPro-build.yml (8)

1-1: Workflow rename looks good.

Renaming the workflow to “HSLinkPro Pipeline” clarifies the build’s scope and purpose.


8-9: Tag-based release trigger is correct.

The new tags filter 'HSLinkPro*' allows for well-defined release workflows based on semantic tags. This is a neat enhancement.


31-31: Repository update to hpm_sdk is consistent.

Switching to hpmicro/hpm_sdk.git aligns with upstream changes. Confirm that any references to sdk_env.git are removed elsewhere to prevent confusion.


44-45: Environment variable usage clarified.

Setting HPM_SDK_BASE explicitly is preferable to symbolic links. Keep verifying that the environment variable approach is used consistently in scripts.


49-49: Include CROSS_COMPILE triplet check.

-DCUSTOM_TARGET_TRIPLET=riscv-none-elf is a standard cross-compile approach. Double-check consistency with the toolchain.


55-56: Repeat environment export for APP build.

Re-exporting HPM_SDK_BASE and toolchain path is good for clarity and prevents build ambiguity.


60-60: Custom target usage for app build.

Ensuring the same custom triplet for both bootloader and app helps unify the build. Just confirm the final artifacts behave as expected on device.


87-107: Release job is set up appropriately.

The new release job depends on the build job and is triggered by tags. This is an elegant way to automate your release process.

🧰 Tools
🪛 yamllint (1.35.1)

[error] 107-107: no new line character at the end of file

(new-line-at-end-of-file)

@HalfSweet HalfSweet merged commit cce4250 into cherry-embedded:master Jan 2, 2025
3 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Mar 28, 2025
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.

1 participant