← Back to Pull requests

fix(CMSIS): Fix parallel build race in MAX78000/MAX78002 RISC-V loader projects #1654

Closed
unknown closed this pull request without merging on Nov 23, 2026 11:13 UTC
View on GitHub
unknown unknown commented on Nov 23, 2026 10:57 UTC
Author

Description

Projects built with RISCV_LOAD=1 (e.g. Examples/MAX78000/RV_ARM_Loader) generate $(ARM_MAP_FILE) by running a nested arm-only make RISCV_LOAD=0 in the same BUILD_DIR. With a parallel build (make -j), the outer make compiles and links the same objects and libraries at the same time as the nested build, so the two can overwrite each other's files.

This shows up in CI ("Build All Examples", make -r -j 8) as sporadic link failures in RV_ARM_Loader, with a different board and a different missing symbol each time:

  • EvKit_V1: undefined reference to 'MXC_TFT_PreInit'

  • Aud01_RevA: undefined reference to 'SystemInit', 'PreInit' and 'SystemCoreClock'

  • FTHR_RevA: failed in another attempt
  • Every other project passes, and the failing target is always build/max78000.map. A source or board configuration problem would fail the same board consistently, so this looks like a build race. Re-running CI sometimes passes.

    The change makes the outer build's objects and libraries wait (order-only prerequisite) for $(ARM_MAP_FILE), so the arm-only build runs first and the outer build then finds everything up to date. It applies only when RISCV_LOAD=1 and RISCV_CORE is empty, so standalone ARM builds, standalone RISC-V builds, and the nested/RISC-V app builds (RISCV_LOAD=0) are unchanged. It is applied to both max78000.mk and max78002.mk, which share the same logic. The change uses only features that work with Make 3.81.

    Signed-off-by: Vladislav Pejic <Vladislav.Pejic@analog.com>

    Checklist Before Requesting Review

  • PR Title follows correct guidelines.

  • Description of changes and all other relevant information.

  • (Optional) Link any related GitHub issues

  • (Optional) Provide info on any relevant functional testing/validation. For API changes or significant features, this is not optional.

  • _______________________________________________________________________________

    Diff: 245 lines (+183 / -62) across 3 files Reviewer: ttmut Review duration: 16m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 245 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.329
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1654"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 38.9% (MEDIUM) · Higher = larger blast radius
    38.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.3% · Safe to merge
    15.3%