Skip to content

chore: fix docs, adopt EMIL cortex_m runtime - #102

Open
gabrielfrasantos wants to merge 1 commit into
mainfrom
chore/emil-321a369-adopt-cortex-runtime
Open

chore: fix docs, adopt EMIL cortex_m runtime#102
gabrielfrasantos wants to merge 1 commit into
mainfrom
chore/emil-321a369-adopt-cortex-runtime

Conversation

@gabrielfrasantos

Copy link
Copy Markdown
Contributor

CLAUDE.md/AGENTS.md had been overwritten with content from the sibling hal-st (STM32) repo; restored hal-ti-specific docs and fixed the same stale hal_tiva/cortex/ references in the Copilot/orchestrator docs.

Bump the EMIL (embedded-infra-lib) pin to 8614b493 (one commit past the requested 321a369d, which predates EMIL adding DataWatchpointAndTrace).

Delete hal_tiva/cortex/{DataWatchpointAndTrace,EventDispatcherCortex, InterruptCortex} and reuse the equivalents now provided by EMIL's hal::cortex_m; trim hal_tiva/default_init (renamed hal_tiva/bringup) to just the Tiva-specific HardwareInitialization() glue, since EMIL's hal.cortex_m.runtime now covers the generic atomics shim, abort/assert, and libc syscall stubs. Reset/SystemTick/SystemTickTimerService/ TimeKeeper are relocated flat under hal_tiva/ (no EMIL replacement exists yet upstream) so hal_tiva/cortex/ can disappear entirely.

Known follow-up: EMIL's InterruptPriority::normal maps to a different hardware NVIC priority level (2) than the previous default (4) - verify against the TM4C datasheet before relying on it in ISR-heavy configurations.

…bringup

CLAUDE.md/AGENTS.md had been overwritten with content from the sibling
hal-st (STM32) repo; restored hal-ti-specific docs and fixed the same
stale hal_tiva/cortex/ references in the Copilot/orchestrator docs.

Bump the EMIL (embedded-infra-lib) pin to 8614b493 (one commit past the
requested 321a369d, which predates EMIL adding DataWatchpointAndTrace).

Delete hal_tiva/cortex/{DataWatchpointAndTrace,EventDispatcherCortex,
InterruptCortex} and reuse the equivalents now provided by EMIL's
hal::cortex_m; trim hal_tiva/default_init (renamed hal_tiva/bringup) to
just the Tiva-specific HardwareInitialization() glue, since EMIL's
hal.cortex_m.runtime now covers the generic atomics shim, abort/assert,
and libc syscall stubs. Reset/SystemTick/SystemTickTimerService/
TimeKeeper are relocated flat under hal_tiva/ (no EMIL replacement
exists yet upstream) so hal_tiva/cortex/ can disappear entirely.

Known follow-up: EMIL's InterruptPriority::normal maps to a different
hardware NVIC priority level (2) than the previous default (4) -
verify against the TM4C datasheet before relying on it in ISR-heavy
configurations.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 25, 2026 18:14
@gabrielfrasantos

Copy link
Copy Markdown
Contributor Author

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.09s
✅ CPP clang-format 6 0 0 0 0.16s
✅ CPP cppcheck 6 0 0 0.06s
✅ DOCKERFILE hadolint 1 0 0 0.11s
✅ JSON jsonlint 9 0 0 0.12s
✅ JSON prettier 9 6 0 0 0.65s
⚠️ MARKDOWN markdownlint 17 0 11 0 1.94s
✅ MARKDOWN markdown-table-formatter 17 0 0 0 0.33s
✅ REPOSITORY betterleaks yes no no 1.27s
✅ REPOSITORY checkov yes no no 20.68s
✅ REPOSITORY git_diff yes no no 0.09s
✅ REPOSITORY grype yes no no 67.49s
✅ REPOSITORY ls-lint yes no no 0.02s
✅ REPOSITORY secretlint yes no no 1.47s
✅ REPOSITORY syft yes no no 1.89s
✅ REPOSITORY trivy yes no no 13.0s
✅ REPOSITORY trivy-sbom yes no no 0.15s
✅ REPOSITORY trufflehog yes no no 3.6s
⚠️ SPELL lychee 42 2 0 1.21s
✅ YAML prettier 8 2 0 0 0.8s
✅ YAML v8r 8 0 0 5.82s
✅ YAML yamllint 8 0 0 0.7s

Detailed Issues

⚠️ SPELL / lychee - 2 errors
📝 Summary
---------------------
🔍 Total...........51
🔗 Unique..........34
✅ Successful......44
⏳ Timeouts.........0
🔀 Redirected.......8
👻 Excluded.........5
❓ Unknown..........0
🚫 Errors...........2
⛔ Unsupported......2

Errors in CONTRIBUTING.md
[ERROR] file://.github/CODEOWNERS (at 38:78) | File not found. Check if file exists and path is correct

Errors in README.md
[ERROR] file://.github/CODEOWNERS (at 57:212) | File not found. Check if file exists and path is correct

Hint: Followed 8 redirects. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.
⚠️ MARKDOWN / markdownlint - 11 errors
.claude/agents/executor.md:8 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the executor agent for..."]
.claude/agents/orchestrator.md:8 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the orchestrator agent..."]
.claude/agents/planner.md:8 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the planner agent for ..."]
.claude/agents/reviewer.md:8 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the reviewer agent for..."]
.github/agents/executor.agent.md:11 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the executor agent for..."]
.github/agents/orchestrator.agent.md:18 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the orchestrator agent..."]
.github/agents/planner.agent.md:11 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the planner agent for ..."]
.github/agents/reviewer.agent.md:14 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "You are the reviewer agent for..."]
.github/prompts/orchestrate.prompt.md:8:401 error MD013/line-length Line length [Expected: 400; Actual: 637]
.github/prompts/orchestrate.prompt.md:8 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "Analyze the following task for..."]
AGENTS.md:74:401 error MD013/line-length Line length [Expected: 400; Actual: 431]

Notices

⚠️ Your configuration references items that have been removed from MegaLinter and are ignored: REPOSITORY_GITLEAKS, REPOSITORY_KICS. See Removed linters to find their replacements.

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.0.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,CPP_CPPCHECK,CPP_CLANG_FORMAT,DOCKERFILE_HADOLINT,JSON_JSONLINT,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_GRYPE,REPOSITORY_LS_LINT,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adopts EMIL’s hal/cortex_m interrupt/runtime infrastructure across hal-ti, removing the repo’s local Cortex-M implementations and renaming/reducing the TI-specific startup glue to bringup/, while restoring/aligning project documentation.

Changes:

  • Switch TI drivers/core services from hal_tiva/cortex/* to EMIL hal/cortex_m/* (types, namespaces, IRQ storage).
  • Remove local Cortex-M components (InterruptCortex, EventDispatcherCortex, DataWatchpointAndTrace) and legacy default_init; add bringup/ with Tiva-specific HardwareInitialization() glue.
  • Update CMake, examples, and docs to reflect new targets/APIs and bump the EMIL pin.

Reviewed changes

Copilot reviewed 57 out of 58 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Update usage snippet to hal_ti_target_bringup()
hal_tiva/tiva/UartBase.hpp Use EMIL interrupt header/types; IRQ array type updated
hal_tiva/tiva/UartBase.cpp Use hal::cortex::InterruptTable; IRQ array element type updated
hal_tiva/tiva/SpiMaster.hpp Switch to EMIL interrupt types; IRQ array type updated
hal_tiva/tiva/SpiMaster.cpp IRQ array element type updated
hal_tiva/tiva/Pwm.hpp Switch interrupt types/priorities to EMIL equivalents
hal_tiva/tiva/Pwm.cpp Use hal::cortex::InterruptTable; IRQ storage type updated
hal_tiva/tiva/Gpio.hpp Use EMIL dispatched interrupt handler type
hal_tiva/tiva/Ethernet.hpp Use EMIL dispatched interrupt handler type
hal_tiva/tiva/Eeprom.hpp Switch base class to EMIL immediate interrupt handler
hal_tiva/tiva/Eeprom.cpp Use hal::cortex::InterruptTable; drop local interrupt include
hal_tiva/tiva/Dma.hpp Switch to EMIL interrupt handler base
hal_tiva/tiva/Dma.cpp Use hal::cortex::InterruptTable
hal_tiva/tiva/Can.hpp Switch base class/priority enum to EMIL equivalents
hal_tiva/tiva/Can.cpp Use hal::cortex::InterruptTable; IRQ array element type updated
hal_tiva/tiva/AnalogComparator.hpp Switch priority/handler types to EMIL equivalents
hal_tiva/tiva/AnalogComparator.cpp Use hal::cortex::InterruptTable; IRQ array element type updated
hal_tiva/tiva/Adc.hpp Switch base class/priority enum to EMIL equivalents
hal_tiva/tiva/Adc.cpp Use hal::cortex::InterruptTable; IRQ array element type updated
hal_tiva/TimeKeeper.hpp Relocate include to flattened hal_tiva/ path
hal_tiva/TimeKeeper.cpp Update include path after relocation
hal_tiva/SystemTickTimerService.hpp Switch to EMIL interrupt header
hal_tiva/SystemTickTimerService.cpp Use EMIL SysTick IRQ constant; update include path
hal_tiva/SystemTick.hpp Switch to EMIL interrupt header
hal_tiva/SystemTick.cpp Use EMIL SysTick IRQ constant; update include path
hal_tiva/synchronous_tiva/SynchronousUart.hpp Switch to EMIL interrupt handler base
hal_tiva/synchronous_tiva/SynchronousQuadratureEncoder.hpp Switch to EMIL interrupt handler types; IRQ array type updated
hal_tiva/synchronous_tiva/SynchronousQuadratureEncoder.cpp IRQ array element type updated
hal_tiva/Reset.hpp Relocate header to flattened hal_tiva/ path
hal_tiva/Reset.cpp Update include path after relocation
hal_tiva/instantiations/TracingReset.hpp Update include to relocated Reset header
hal_tiva/instantiations/EventInfrastructure.hpp Update include to relocated SystemTickTimerService header
hal_tiva/default_init/DefaultInit.cpp Deleted (runtime stubs + init moved to EMIL / bringup)
hal_tiva/default_init/CMakeLists.txt Deleted (target replaced by bringup)
hal_tiva/default_init/Atomic.cpp Deleted (atomics shim moved to EMIL runtime)
hal_tiva/cortex/InterruptCortex.hpp Deleted (replaced by EMIL hal/cortex_m)
hal_tiva/cortex/InterruptCortex.cpp Deleted (replaced by EMIL hal/cortex_m)
hal_tiva/cortex/EventDispatcherCortex.hpp Deleted (replaced by EMIL equivalents)
hal_tiva/cortex/EventDispatcherCortex.cpp Deleted (replaced by EMIL equivalents)
hal_tiva/cortex/DataWatchpointAndTrace.hpp Deleted (replaced by EMIL equivalents)
hal_tiva/cortex/DataWatchpointAndTrace.cpp Deleted (replaced by EMIL equivalents)
hal_tiva/cortex/CMakeLists.txt Deleted (folder/target removed)
hal_tiva/CMakeLists.txt Restructure: new hal_tiva.cortex composition + add bringup subdir
hal_tiva/bringup/CMakeLists.txt New bringup target + hal_ti_target_bringup() helper
hal_tiva/bringup/Bringup.cpp New TI-specific bringup glue (interrupt table + default pinout)
examples/terminal_uart_with_dma/CMakeLists.txt Switch to hal_ti_target_bringup()
examples/terminal_and_peripherals/CMakeLists.txt Switch to hal_ti_target_bringup()
examples/freertos/CMakeLists.txt Switch to hal_ti_target_bringup()
examples/blink/CMakeLists.txt Switch to hal_ti_target_bringup()
CMakeLists.txt Rename bringup option; bump EMIL pin
CLAUDE.md Restore hal-ti-specific instructions; point to AGENTS.md
AGENTS.md Add canonical agent rules for this repo
.github/prompts/orchestrate.prompt.md Update layer pointers after cortex/bringup restructuring
.github/copilot-instructions.md Update repo structure + target names to match new layout
.github/agents/reviewer.agent.md Update checklist item from default_init -> bringup
.github/agents/orchestrator.agent.md Update layer pointers after restructuring
.claude/agents/reviewer.md Update checklist item from default_init -> bringup
.claude/agents/orchestrator.md Update layer pointers after restructuring

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@@ -0,0 +1,39 @@
add_library(hal_tiva.bringup STATIC)
Comment on lines 84 to 86
NumberOfBytes numberOfBytes = NumberOfBytes::_8_bytes;
std::optional<InterruptPriority> priority;
std::optional<hal::cortex::InterruptPriority> priority;
};
Comment thread hal_tiva/CMakeLists.txt
add_subdirectory(synchronous_tiva)
add_subdirectory(tiva)
add_subdirectory(instantiations)
add_subdirectory(bringup)
Comment thread hal_tiva/CMakeLists.txt
Comment on lines +9 to +15
target_link_libraries(hal_tiva.cortex PUBLIC
hal.cortex_m
hal.interfaces
infra.event
infra.timer
ti.hal_driver
)
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.

2 participants