Skip to content

feat(can_open_node): Added canopen protocol for twai driver (IEC-500)#704

Open
wanckl wants to merge 4 commits intoespressif:masterfrom
wanckl:feat/twai_canopennode_support
Open

feat(can_open_node): Added canopen protocol for twai driver (IEC-500)#704
wanckl wants to merge 4 commits intoespressif:masterfrom
wanckl:feat/twai_canopennode_support

Conversation

@wanckl
Copy link
Copy Markdown
Contributor

@wanckl wanckl commented Mar 17, 2026

Checklist

  • Component contains License
  • Component contains README.md
  • Component contains idf_component.yml file with url field defined
  • Component was added to upload job
  • Component was added to build job
  • Optional: Component contains unit tests
  • CI passing

Change description

Please describe your change here

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 17, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot changed the title feat(can_open_node): Added canopen protocol for twai driver feat(can_open_node): Added canopen protocol for twai driver (IEC-500) Mar 17, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an ESP-IDF component that integrates CANopenNode with the ESP32 TWAI driver and provides initial target/driver scaffolding.

Changes:

  • Introduces ESP32 target definitions (CO_driver_target.h) and a TWAI-backed CANopenNode driver (CO_driver_esp32.c)
  • Adds component metadata/build configuration (idf_component.yml, CMakeLists.txt) and initial documentation/license
  • Adds CANopenNode as a git submodule

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
esp_canopennode/src/CO_driver_target.h ESP32/CANopenNode target types, macros, and synchronization placeholders
esp_canopennode/src/CO_driver_esp32.c TWAI receive callback + CANopenNode CAN module init/send APIs
esp_canopennode/idf_component.yml Component registry metadata and ESP-IDF dependency constraint
esp_canopennode/README.md Component overview and placeholder quick start
esp_canopennode/LICENSE Apache-2.0 license file
esp_canopennode/CMakeLists.txt Component build wiring + CANopenNode sources inclusion
esp_canopennode/CANopenNode Adds CANopenNode submodule pointer
.gitmodules Registers CANopenNode submodule

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread esp_canopennode/src/CO_driver_esp32.c Outdated
Comment thread canopennode/src/CO_driver_esp32.c
Comment thread canopennode/src/CO_driver_esp32.c
Comment thread esp_canopennode/src/CO_driver_esp32.c Outdated
Comment thread esp_canopennode/src/CO_driver_esp32.c Outdated
Comment thread esp_canopennode/src/CO_driver_target.h Outdated
Comment thread esp_canopennode/src/CO_driver_target.h Outdated
Comment thread .gitmodules Outdated
Comment thread esp_canopennode/README.md Outdated
Comment thread esp_canopennode/README.md Outdated
Comment thread esp_canopennode/LICENSE Outdated
Comment thread esp_canopennode/idf_component.yml Outdated
Comment thread esp_canopennode/idf_component.yml Outdated
Comment thread canopennode/CMakeLists.txt Outdated
@wanckl wanckl force-pushed the feat/twai_canopennode_support branch 3 times, most recently from 57b7b9a to be95521 Compare April 2, 2026 09:19
Comment thread canopennode/src/CO_driver_esp32.c Fixed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new canopennode ESP-IDF extra component which integrates the upstream CANopenNode stack (via submodule) with the ESP TWAI driver, and adds a minimal heartbeat example plus component metadata/CI wiring needed for publishing.

Changes:

  • Added an ESP-IDF/TWAI-specific CANopenNode driver target header and ESP32 driver implementation.
  • Added a heartbeat example project (generated OD files + app) and basic component scaffolding (LICENSE/README/Kconfig/SBOM/manifest).
  • Registered the new component in repo automation/configuration (submodule + upload workflow + issue template component list).

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
canopennode/src/CO_driver_target.h Adds ESP-IDF/TWAI target types/macros and locking primitives for CANopenNode.
canopennode/src/CO_driver_esp32.c Implements CAN module init, RX callbacks, TX buffering/sending, and processing hooks on top of TWAI.
canopennode/sbom_canopennode.yml Adds SBOM metadata for the upstream CANopenNode dependency.
canopennode/idf_component.yml Adds component manifest (version/IDF dependency/SBOM).
canopennode/examples/heartbeat/main/idf_component.yml Adds example manifest and dependency on the new component.
canopennode/examples/heartbeat/main/canopen_heartbeat.h Adds (currently minimal) example header scaffold.
canopennode/examples/heartbeat/main/canopen_heartbeat.c Adds heartbeat demo app using TWAI on-chip node + CANopenNode init/process loop.
canopennode/examples/heartbeat/main/OD.xpd Adds CANopenEditor project export for the example OD.
canopennode/examples/heartbeat/main/OD.h Adds generated Object Dictionary header for the example.
canopennode/examples/heartbeat/main/OD.c Adds generated Object Dictionary implementation for the example.
canopennode/examples/heartbeat/main/CMakeLists.txt Adds example “main” component build definition.
canopennode/examples/heartbeat/README.md Adds short description of the heartbeat example.
canopennode/examples/heartbeat/CMakeLists.txt Adds top-level example project build file.
canopennode/README.md Adds top-level component README stub.
canopennode/LICENSE Adds Apache-2.0 license file for the component.
canopennode/Kconfig Adds Kconfig option for OD build mode selection.
canopennode/CMakeLists.txt Adds component build definition linking CANopenNode sources + TWAI dependency.
.gitmodules Adds CANopenNode upstream as a git submodule under canopennode/CANopenNode.
.github/workflows/upload_component.yml Adds canopennode to the upload workflow component list.
.github/ISSUE_TEMPLATE/bug-report.yml Adds canopennode to the bug report component dropdown.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread canopennode/src/CO_driver_esp32.c Outdated
Comment thread canopennode/examples/heartbeat/main/canopen_heartbeat.c Outdated
Comment thread canopennode/idf_component.yml
Comment thread canopennode/src/CO_driver_target.h Outdated
Comment thread canopennode/src/CO_driver_target.h
Comment thread canopennode/src/CO_driver_esp32.c Outdated
Comment thread canopennode/examples/heartbeat/main/idf_component.yml
Comment thread canopennode/Kconfig Outdated
Comment thread canopennode/examples/heartbeat/main/CMakeLists.txt Outdated
Comment thread canopennode/src/CO_driver_esp32.c
@wanckl wanckl force-pushed the feat/twai_canopennode_support branch 4 times, most recently from 39236a8 to 21e7368 Compare April 23, 2026 12:53
Comment thread canopennode/examples/heartbeat/CMakeLists.txt Outdated
@suda-morris
Copy link
Copy Markdown
Collaborator

@Dazza0 FYI, in case you're still interested in it. :😁

@wanckl wanckl force-pushed the feat/twai_canopennode_support branch from 21e7368 to d800bf2 Compare April 24, 2026 11:44
Comment thread canopennode/Kconfig
@wanckl wanckl force-pushed the feat/twai_canopennode_support branch from d800bf2 to 76d70fb Compare April 30, 2026 12:09
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.

6 participants