-
Notifications
You must be signed in to change notification settings - Fork 62
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
Conversation
WalkthroughThis 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
Sequence DiagramsequenceDiagram
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
Poem
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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 toPort_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.binAlso applies to: 85-86
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 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 fromHSP_Init
. If code callsHSP_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 tosdk_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)
Summary by CodeRabbit
Release Notes for HSLinkPro v2.3.0
New Features
Bug Fixes
Chores
Version Update