Skip to content

Conversation

@pratheesh-ti
Copy link
Collaborator

@pratheesh-ti pratheesh-ti commented Oct 31, 2025

PR Type

Enhancement, Bug fix


Description

  • Add Python dependencies (pyserial, xmodem, tqdm, pyelftools, construct) for mcelf build support

  • Fix ti-cgt-armllvm_4.0.3.LTS installation path to use $HOME/ti/ instead of nested directory

  • Downgrade MCU+ SDK AM243x from 11.01.00.17 to 11.00.00.15 for version alignment

  • Downgrade MCU+ SDK AM263Px from 11.00.00.19 to 10.02.00.15 for consistency

  • Improve toolchain verification with executable test and conditional diagnostics


Diagram Walkthrough

flowchart LR
  A["CI Workflow"] -->|Add Python packages| B["pip3 install dependencies"]
  A -->|Fix ARM CLANG path| C["ti-cgt-armllvm_4.0.3.LTS installation"]
  A -->|Downgrade SDKs| D["MCU+ SDK versions"]
  B --> E["mcelf build support"]
  C --> F["Correct installation directory"]
  D --> G["AM243x 11.00.00.15"]
  D --> H["AM263Px 10.02.00.15"]
Loading

File Walkthrough

Relevant files
Configuration changes
makefile.yml
CI workflow Python dependencies and SDK version alignment

.github/workflows/makefile.yml

  • Added python3-pip to OS dependencies and installed Python packages
    (pyserial, xmodem, tqdm, pyelftools, construct) for mcelf build
  • Fixed ti-cgt-armllvm_4.0.3.LTS installation prefix from
    $HOME/ti/ti-cgt-armllvm_4.0.3.LTS to $HOME/ti/
  • Downgraded MCU+ SDK AM243x from version 11.01.00.17 to 11.00.00.15
    with corresponding URL and path updates
  • Downgraded MCU+ SDK AM263Px from version 11.00.00.19 to 10.02.00.15
    with corresponding URL and path updates
  • Replaced verbose debug logging with targeted toolchain verification
    test and conditional diagnostics
  • Updated environment variable exports and imports.mak configuration to
    reflect new SDK versions
+24/-19 

@qodo-code-review
Copy link

qodo-code-review bot commented Oct 31, 2025

PR Reviewer Guide 🔍

(Review updated until commit fd24b92)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Caching Keys

New SDK version downgrades and tool paths likely change cache contents; verify cache key uses these version strings so restored cache matches new paths and avoids stale toolchains.

- name: Restore toolchain/SDK cache
  uses: actions/cache@v4
  with:
    path: |
Python Deps Scope

The added pip packages install into the runner; consider using a requirements file and pinning versions to ensure reproducible builds and avoid breakages from upstream changes.

  libgtk2.0-0 libncurses5 libnss3 python3-pip \
  unzip xz-utils wget ca-certificates
pip3 install pyserial xmodem tqdm pyelftools construct
ARM LLVM Path

Installer prefix changed to $HOME/ti/; confirm downstream references and PATH adjustments consistently point to $HOME/ti/ti-cgt-armllvm_4.0.3.LTS and that the directory actually gets created by the installer in this layout.

 ./ti_cgt_armllvm_4.0.3.LTS_linux-x64_installer.bin --mode unattended --prefix "$HOME/ti/"
fi

@qodo-code-review
Copy link

qodo-code-review bot commented Oct 31, 2025

PR Code Suggestions ✨

Latest suggestions up to fd24b92

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix toolchain installation path

Revert the installer prefix for the ARM CLANG CGT to the version-specific path
$HOME/ti/ti-cgt-armllvm_4.0.3.LTS. This ensures the toolchain is installed in
the expected directory, preventing path mismatches in subsequent build steps.

.github/workflows/makefile.yml [77]

-./ti_cgt_armllvm_4.0.3.LTS_linux-x64_installer.bin --mode unattended --prefix "$HOME/ti/"
+./ti_cgt_armllvm_4.0.3.LTS_linux-x64_installer.bin --mode unattended --prefix "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies that changing the installer prefix to $HOME/ti/ while all subsequent steps expect the toolchain at $HOME/ti/ti-cgt-armllvm_4.0.3.LTS is a critical risk that could break the entire build if the installer behavior is not as expected.

High
Use user-scoped pip installs

Add the --user flag to the pip3 install command to prevent potential permission
errors and ensure a user-scoped installation. Also, add the user's local bin
directory to the GITHUB_PATH.

.github/workflows/makefile.yml [37]

-pip3 install pyserial xmodem tqdm pyelftools construct
+pip3 install --user pyserial xmodem tqdm pyelftools construct
+echo "$HOME/.local/bin" >> $GITHUB_PATH
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly recommends using pip3 install --user as a best practice for robustness and to avoid potential permission issues in the CI environment, which is a valuable improvement for maintainability.

Low
General
Fail fast on missing compiler

Modify the toolchain verification step to explicitly fail if tiarmclang is not
found. The current logic masks failures, allowing the workflow to proceed with a
broken toolchain.

.github/workflows/makefile.yml [119]

-test -x "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" && "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" --version || ls -l "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"
+if ! test -x "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang"; then
+  echo "ERROR: tiarmclang not found at expected path" >&2
+  ls -l "$HOME/ti" || true
+  ls -l "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS" || true
+  exit 1
+fi
+"$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" --version
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly points out that the || ls construct masks the exit code of the test, preventing the job from failing when the toolchain is missing. The proposed change correctly enforces a fail-fast behavior, which is critical for CI stability.

Medium
Organization
best practice
Pin pip dependency versions

Pin versions for all pip packages to known-good releases to avoid
non-deterministic CI failures.

.github/workflows/makefile.yml [37]

-+          pip3 install pyserial xmodem tqdm pyelftools construct
++          pip3 install \
++            pyserial==3.5 \
++            xmodem==0.4.6 \
++            tqdm==4.66.5 \
++            pyelftools==0.31 \
++            construct==2.10.70

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 6

__

Why:
Relevant best practice - Pin Python package installations to specific versions to ensure reproducible builds.

Low
  • More

Previous suggestions

Suggestions up to commit cb1731e
CategorySuggestion                                                                                                                                    Impact
Possible issue
Correct AM263Px SDK download URL

Validate that the MD key MD-JVtW1V4WfA in the AM263Px SDK download URL is
correct for version 10.02.00.15, as it is reused from a previous version and may
be invalid.

.github/workflows/makefile.yml [105-112]

 # Install MCU+ SDK AM263Px 10.02.00.15
 if [ ! -d "$HOME/ti/mcu_plus_sdk_am263px_10_02_00_15" ]; then
   cd "$HOME/ti/downloads"
   wget -q --retry-connrefused --waitretry=1 --tries=5 --timeout=30 \
-    https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-JVtW1V4WfA/10.02.00.15/mcu_plus_sdk_am263px_10_02_00_15-linux-x64-installer.run
+    https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-<correct_md_for_10_02_00_15>/10.02.00.15/mcu_plus_sdk_am263px_10_02_00_15-linux-x64-installer.run
   chmod +x mcu_plus_sdk_am263px_10_02_00_15-linux-x64-installer.run
   ./mcu_plus_sdk_am263px_10_02_00_15-linux-x64-installer.run --mode unattended --prefix "$HOME/ti/"
 fi
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a potential issue where the download URL for the downgraded SDK might be incorrect because the MD key was not updated, which could cause the wget command to fail.

Medium
Organization
best practice
Validate installer results and fail

Verify the installer created the expected directory and fail if not, so
downstream steps don't proceed with a broken toolchain path.

.github/workflows/makefile.yml [76]

-./ti_cgt_armllvm_4.0.3.LTS_linux-x64_installer.bin --mode unattended --prefix "$HOME/ti/"
+./ti_cgt_armllvm_4.0.3.LTS_linux-x64_installer.bin --mode unattended --prefix "$HOME/ti/" \
+  && test -x "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" \
+  || { echo "ARM CLANG install failed"; exit 1; }
Suggestion importance[1-10]: 6

__

Why:
Relevant best practice - Keep CI scripts robust and fail-fast: check installer success and validate expected directory layout after unattended installs.

Low
Parameterize SDK version strings

Centralize SDK versions in variables and reference them everywhere to keep URLs,
file names, and paths consistent.

.github/workflows/makefile.yml [87-148]

-# Install MCU+ SDK AM243x 11.00.00.15
-if [ ! -d "$HOME/ti/mcu_plus_sdk_am243x_11_00_00_15" ]; then
+AM243X_SDK_VER=11_00_00_15
+AM243X_SDK_VER_DOTS=11.00.00.15
+# Install MCU+ SDK AM243x $AM243X_SDK_VER_DOTS
+if [ ! -d "$HOME/ti/mcu_plus_sdk_am243x_${AM243X_SDK_VER}" ]; then
   cd "$HOME/ti/downloads"
   wget -q --retry-connrefused --waitretry=1 --tries=5 --timeout=30 \
-    https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-ouHbHEm1PK/11.00.00.15/mcu_plus_sdk_am243x_11_00_00_15-linux-x64-installer.run
-  chmod +x mcu_plus_sdk_am243x_11_00_00_15-linux-x64-installer.run
-  ./mcu_plus_sdk_am243x_11_00_00_15-linux-x64-installer.run --mode unattended --prefix "$HOME/ti/"
+    "https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-ouHbHEm1PK/${AM243X_SDK_VER_DOTS}/mcu_plus_sdk_am243x_${AM243X_SDK_VER}-linux-x64-installer.run"
+  chmod +x "mcu_plus_sdk_am243x_${AM243X_SDK_VER}-linux-x64-installer.run"
+  "./mcu_plus_sdk_am243x_${AM243X_SDK_VER}-linux-x64-installer.run" --mode unattended --prefix "$HOME/ti/"
 fi
-...
-echo "MCU_PLUS_SDK_PATH_AM243X=$HOME/ti/mcu_plus_sdk_am243x_11_00_00_15"
+echo "MCU_PLUS_SDK_PATH_AM243X=$HOME/ti/mcu_plus_sdk_am243x_${AM243X_SDK_VER}" >> $GITHUB_ENV
Suggestion importance[1-10]: 5

__

Why:
Relevant best practice - Avoid hardcoding duplicated version strings; define once and reuse to prevent drift and ease maintenance.

Low
✅ Suggestions up to commit f576c76
CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix incorrect chmod target
Suggestion Impact:The commit updates the chmod command to the correct installer filename, preventing execution permission errors.

code diff:

-            chmod +x mcu_plus_sdk_am243x_11_01_00_17-linux-x64-installer.run
+            chmod +x mcu_plus_sdk_am243x_11_00_00_15-linux-x64-installer.run

Update the chmod command to target the correct installer filename
mcu_plus_sdk_am243x_11_00_00_15-linux-x64-installer.run to fix an execution
permission error.

.github/workflows/makefile.yml [87-94]

 # Install MCU+ SDK AM243x 11.00.00.15
 if [ ! -d "$HOME/ti/mcu_plus_sdk_am243x_11_00_00_15" ]; then
   cd "$HOME/ti/downloads"
   wget -q --retry-connrefused --waitretry=1 --tries=5 --timeout=30 \
     https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-ouHbHEm1PK/11.00.00.15/mcu_plus_sdk_am243x_11_00_00_15-linux-x64-installer.run
-  chmod +x mcu_plus_sdk_am243x_11_01_00_17-linux-x64-installer.run
+  chmod +x mcu_plus_sdk_am243x_11_00_00_15-linux-x64-installer.run
   ./mcu_plus_sdk_am243x_11_00_00_15-linux-x64-installer.run --mode unattended --prefix "$HOME/ti/"
 fi
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a copy-paste error in the chmod command that would cause the workflow to fail, making it a critical bug fix.

High
General
Make compiler check fail-fast

Refactor the compiler verification command to use an if/else block to provide
clearer error messages and ensure the job fails explicitly if the compiler is
not found or fails to execute.

.github/workflows/makefile.yml [118]

-test -x "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" && "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" --version || ls -l "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"
+if [ -x "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" ]; then
+  "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" --version || { echo "ERROR: tiarmclang exists but failed to run"; exit 1; }
+else
+  echo "ERROR: tiarmclang not found at expected path"
+  ls -l "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS" || true
+  exit 1
+fi
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly points out that the || ls fallback can mask the true cause of failure and proposes a more robust check that fails the job explicitly.

Medium
Suggestions up to commit 219ab1f
CategorySuggestion                                                                                                                                    Impact
Possible issue
Make toolchain check fail-safe

Refactor the toolchain verification command to be more robust. Separate the file
existence check from the version check, and provide explicit error messages with
non-zero exit codes for each failure case.

.github/workflows/makefile.yml [118]

-test -x "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" && "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" --version || ls -l "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"
+if [ -x "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" ]; then
+  "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" --version || { echo "tiarmclang found but --version failed"; exit 1; }
+else
+  echo "tiarmclang not found at $HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang"
+  ls -l "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS" || true
+  exit 1
+fi
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a flaw in the shell command logic that could mask failures and proposes a more robust, fail-fast approach with clearer error reporting, which is a critical improvement for a CI workflow.

Medium
General
Verify toolchain via binary presence

Improve the pre-installation check by verifying the existence of the tiarmclang
binary instead of just its parent directory to prevent false positives and
ensure the toolchain is correctly installed.

.github/workflows/makefile.yml [71]

-if [ ! -d "$HOME/ti/ccs_10.3.1/ccs/tools/compiler/ti-cgt-armllvm_4.0.3.LTS" ] && [ ! -d "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS" ]; then
+if [ ! -x "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" ] && [ ! -d "$HOME/ti/ccs_10.3.1/ccs/tools/compiler/ti-cgt-armllvm_4.0.3.LTS" ]; then
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly points out that checking for a directory is not as reliable as checking for the executable, making the installation step more robust against partial or failed previous runs.

Medium
✅ Suggestions up to commit 0b36b45
CategorySuggestion                                                                                                                                    Impact
General
Remove redundant build step
Suggestion Impact:The commit removed the explicit "make -C examples/LCD_interface ..." command from the workflow, aligning with the suggestion to avoid the redundant build step.

code diff:

@@ -191,7 +193,6 @@
           
       - name: Build all via top-level makefile
         run: |
-          make -C examples/LCD_interface MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM243X DEVICE=am243x
           make -j$(nproc) MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM243X DEVICE=am243x
           make -j$(nproc) MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM261X DEVICE=am261x
           make -j$(nproc) MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM263PX DEVICE=am263px          

Remove the redundant build step for examples/LCD_interface, as it is already
built by the subsequent top-level make command.

.github/workflows/makefile.yml [193-197]

 run: |
-  make -C examples/LCD_interface MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM243X DEVICE=am243x
   make -j$(nproc) MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM243X DEVICE=am243x
   make -j$(nproc) MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM261X DEVICE=am261x
   make -j$(nproc) MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM263PX DEVICE=am263px

[Suggestion processed]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a redundant build step added in the PR, which likely increases build time unnecessarily.

Medium
Organization
best practice
Reduce overly verbose logging
Suggestion Impact:The recursive directory listing was commented out and replaced with a conditional that prints tiarmclang --version if present, otherwise does a non-recursive ls, reducing log verbosity.

code diff:

-          ls -lR "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"
+          #ls -lR "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"
+          test -x "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" && "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" --version || ls -l "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"
+          

Replace the recursive list with a targeted check (e.g., print version or key
paths) to reduce noise and runtime.

.github/workflows/makefile.yml [117]

-ls -lR "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"
+test -x "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" && "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" --version || ls -l "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"

[Suggestion processed]

Suggestion importance[1-10]: 6

__

Why:
Relevant best practice - Keep CI logs concise; avoid verbose recursive directory listings that slow runs and exceed log length limits.

Low

@qodo-code-review
Copy link

qodo-code-review bot commented Oct 31, 2025

PR Compliance Guide 🔍

(Compliance updated until commit fd24b92)

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Memory Bounds Violations

Objective: Prevent memory access outside allocated boundaries

Status: Passed

Missing Parameter Validation

Objective: Ensure all function/macro parameters are validated

Status: Passed

Missing Synchronization Between PRUs

Objective: Ensure proper coordination between multiple PRU cores

Status: Passed

Missing Watchdog Handling

Objective: Ensure watchdog is properly serviced to prevent system resets

Status: Passed

Non-Deterministic Code Paths

Objective: Ensure all code paths have predictable, bounded execution times for PRU assembly or C code

Status: Passed

Race Conditions in Shared Memory

Objective: Prevent data corruption from concurrent access to shared resources

Status: Passed

Register Corruption

Objective: Ensure register state is preserved across function calls and interrupts

Status: Passed

Unbounded Loops

Objective: Prevent infinite loops that could hang the PRU indefinitely unless explicitly marked via
comment

Status: Passed

Uncontrolled GPIO States

Objective: Ensure GPIO pins are left in safe states under all conditions

Status: Passed

Undocumented Timing Requirements

Objective: Ensure all timing-critical code sections have documented cycle counts and execution times
for PRU assembly or C code

Status: Passed

Hardcoded Magic Numbers

Objective: Ensure all numeric constants are properly defined and documented

Status: 🏷️
Hardcoded versions: Multiple hardcoded SDK and tool versions (e.g., 11_00_00_15, 10_02_00_15, 4.0.3.LTS) are
added without clear documentation or centralized constants, which may qualify as magic
numbers unless justified in broader CI context.

Referred Code
if [ ! -d "$HOME/ti/mcu_plus_sdk_am243x_11_00_00_15" ]; then
  cd "$HOME/ti/downloads"
  wget -q --retry-connrefused --waitretry=1 --tries=5 --timeout=30 \
    https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-ouHbHEm1PK/11.00.00.15/mcu_plus_sdk_am243x_11_00_00_15-linux-x64-installer.run
  chmod +x mcu_plus_sdk_am243x_11_00_00_15-linux-x64-installer.run
  ./mcu_plus_sdk_am243x_11_00_00_15-linux-x64-installer.run --mode unattended --prefix "$HOME/ti/"
fi

# Install MCU+ SDK AM261x 10.02.00.15
if [ ! -d "$HOME/ti/mcu_plus_sdk_am261x_10_02_00_15" ]; then
  cd "$HOME/ti/downloads"
  wget -q --retry-connrefused --waitretry=1 --tries=5 --timeout=30 \
    https://dr-download.ti.com/software-development/software-development-kit-sdk/MD-h64OlWnQrg/10.02.00.15/mcu_plus_sdk_am261x_10_02_00_15-linux-x64-installer.run
  chmod +x mcu_plus_sdk_am261x_10_02_00_15-linux-x64-installer.run
  ./mcu_plus_sdk_am261x_10_02_00_15-linux-x64-installer.run --mode unattended --prefix "$HOME/ti/"
fi

# Install MCU+ SDK AM263Px 10.02.00.15
if [ ! -d "$HOME/ti/mcu_plus_sdk_am263px_10_02_00_15" ]; then
  cd "$HOME/ti/downloads"
  wget -q --retry-connrefused --waitretry=1 --tries=5 --timeout=30 \


 ... (clipped 41 lines)
Missing Critical Error Handling

Objective: Ensure all critical operations have proper error handling

Status: 🏷️
Unchecked commands: New shell steps perform network installs and executions (pip3 install, wget, installer
runs) without explicit error checks or retries beyond wget flags, risking silent step
success masking partial failures.

Referred Code
      libgtk2.0-0 libncurses5 libnss3 python3-pip \
      unzip xz-utils wget ca-certificates
    pip3 install pyserial xmodem tqdm pyelftools construct

- name: Restore toolchain/SDK cache
  uses: actions/cache@v4
  with:
    path: |
      $HOME/ti
    key: toolchain-mcu-sdk-${{ runner.os }}-v1-ccs20_3_1-pru2_3_3-am243x_11_01_00_17-am261x_10_02_00_15-am263px_11_00_00_19

- name: Install MCU+ SDKs, CCS, SYSCONFIG, TIARMCLANG and PRU CGT if missing
  run: |
    set -e
    mkdir -p "$HOME/ti/downloads"
    cd "$HOME/ti"

    # Install CCS 20.3.1
    if [ ! -d "$HOME/ti/ccs_10.3.1" ]; then
      cd "$HOME/ti/downloads"
      wget -q --retry-connrefused --waitretry=1 --tries=5 --timeout=30 \


 ... (clipped 65 lines)
Silent Failures

Objective: Ensure all error conditions are properly reported and handled

Status: 🏷️
Silent install issues: Installer invocations and pip installs lack explicit error reporting or set -e safeguards,
which may allow failures to go unnoticed in CI unless the shell step inherently fails on
non-zero exits.

Referred Code
      libgtk2.0-0 libncurses5 libnss3 python3-pip \
      unzip xz-utils wget ca-certificates
    pip3 install pyserial xmodem tqdm pyelftools construct

- name: Restore toolchain/SDK cache
  uses: actions/cache@v4
  with:
    path: |
      $HOME/ti
    key: toolchain-mcu-sdk-${{ runner.os }}-v1-ccs20_3_1-pru2_3_3-am243x_11_01_00_17-am261x_10_02_00_15-am263px_11_00_00_19

- name: Install MCU+ SDKs, CCS, SYSCONFIG, TIARMCLANG and PRU CGT if missing
  run: |
    set -e
    mkdir -p "$HOME/ti/downloads"
    cd "$HOME/ti"

    # Install CCS 20.3.1
    if [ ! -d "$HOME/ti/ccs_10.3.1" ]; then
      cd "$HOME/ti/downloads"
      wget -q --retry-connrefused --waitretry=1 --tries=5 --timeout=30 \


 ... (clipped 65 lines)
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

Previous compliance checks

Compliance check up to commit 0b36b45
Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Memory Bounds Violations

Objective: Prevent memory access outside allocated boundaries

Status: Passed

Missing Parameter Validation

Objective: Ensure all function/macro parameters are validated

Status: Passed

Missing Synchronization Between PRUs

Objective: Ensure proper coordination between multiple PRU cores

Status: Passed

Missing Watchdog Handling

Objective: Ensure watchdog is properly serviced to prevent system resets

Status: Passed

Non-Deterministic Code Paths

Objective: Ensure all code paths have predictable, bounded execution times for PRU assembly or C code

Status: Passed

Race Conditions in Shared Memory

Objective: Prevent data corruption from concurrent access to shared resources

Status: Passed

Register Corruption

Objective: Ensure register state is preserved across function calls and interrupts

Status: Passed

Unbounded Loops

Objective: Prevent infinite loops that could hang the PRU indefinitely unless explicitly marked via
comment

Status: Passed

Uncontrolled GPIO States

Objective: Ensure GPIO pins are left in safe states under all conditions

Status: Passed

Undocumented Timing Requirements

Objective: Ensure all timing-critical code sections have documented cycle counts and execution times
for PRU assembly or C code

Status: Passed

Hardcoded Magic Numbers

Objective: Ensure all numeric constants are properly defined and documented

Status: 🏷️
Magic numbers: The new build step uses an implicit default job count by omitting -j on the first make,
and other steps use -j$(nproc); confirm that parallelism settings and any numeric literals
like toolchain version directory names are intentionally hardcoded and documented for CI.

Referred Code
make -C examples/LCD_interface MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM243X DEVICE=am243x
make -j$(nproc) MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM243X DEVICE=am243x
make -j$(nproc) MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM261X DEVICE=am261x
make -j$(nproc) MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM263PX DEVICE=am263px          
Missing Critical Error Handling

Objective: Ensure all critical operations have proper error handling

Status: 🏷️
Build errors: The added explicit make step for examples/LCD_interface lacks error handling or flags to
fail fast beyond default shell behavior; verify the workflow halts and reports errors
clearly if this step fails.

Referred Code
make -C examples/LCD_interface MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM243X DEVICE=am243x
make -j$(nproc) MCU_PLUS_SDK_PATH=$MCU_PLUS_SDK_PATH_AM243X DEVICE=am243x
Silent Failures

Objective: Ensure all error conditions are properly reported and handled

Status: 🏷️
Silent failures: The new diagnostic ls -lR and the added example build step do not explicitly log or
validate outcomes beyond command exit codes; ensure failures are surfaced with clear
messages or set -euo pipefail is in effect for this run block.

Referred Code
    #ls -l "$HOME/ti/"
    #ls -l "$HOME/ti/downloads"
    #ls -l "$HOME/ti/ccs_10.3.1/ccs/tools/compiler"
    #ls -l "$HOME/ti/sysconfig_1.23.1"
    ls -lR "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"
- name: Export toolchain environment
  run: |
    {
      echo "CCS_PATH=$HOME/ti/ccs_10.3.1"

#ls -l "$HOME/ti/ccs_10.3.1/ccs/tools/compiler"
#ls -l "$HOME/ti/sysconfig_1.23.1"
ls -lR "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"

Choose a reason for hiding this comment

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

Suggestion: Reduce overly verbose logging

Suggested change
ls -lR "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"
test -x "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" && "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS/bin/tiarmclang" --version || ls -l "$HOME/ti/ti-cgt-armllvm_4.0.3.LTS"

@pratheesh-ti pratheesh-ti merged commit 48430da into main Oct 31, 2025
1 check passed
@pratheesh-ti pratheesh-ti deleted the pratheesh-ti-patch-1 branch October 31, 2025 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants