|
| 1 | +# SPDX-License-Identifier: Apache-2.0 |
| 2 | +# OmniCAN — Unified multi-protocol CAN stack for Zephyr RTOS |
| 3 | +# Copyright (c) 2026 BitConcepts, LLC |
| 4 | + |
| 5 | +menuconfig OMNICAN |
| 6 | + bool "OmniCAN multi-protocol CAN stack" |
| 7 | + depends on CAN |
| 8 | + select NET_BUF |
| 9 | + help |
| 10 | + Enable OmniCAN — a unified multi-protocol CAN stack for Zephyr. |
| 11 | + Supports CANopen, CANopen FD, SAE J1939, ISO 14229 (UDS), |
| 12 | + and SAE J1979 (OBD-II). |
| 13 | + |
| 14 | +if OMNICAN |
| 15 | + |
| 16 | +# --------------------------------------------------------------------------- |
| 17 | +# Protocol modules |
| 18 | +# --------------------------------------------------------------------------- |
| 19 | + |
| 20 | +config OMNICAN_CANOPEN |
| 21 | + bool "CANopen (CiA 301)" |
| 22 | + default n |
| 23 | + help |
| 24 | + Enable the CANopen protocol stack (CiA 301). |
| 25 | + Includes NMT, SDO server, PDO, Emergency, Heartbeat. |
| 26 | + |
| 27 | +config OMNICAN_CANOPEN_FD |
| 28 | + bool "CANopen FD (CiA 1301)" |
| 29 | + depends on OMNICAN_CANOPEN && CAN_FD_MODE |
| 30 | + default n |
| 31 | + help |
| 32 | + Enable CANopen FD extensions (CiA 1301) on top of CANopen. |
| 33 | + Requires CAN FD hardware and OMNICAN_CANOPEN. |
| 34 | + |
| 35 | +config OMNICAN_J1939 |
| 36 | + bool "SAE J1939" |
| 37 | + select CAN_ACCEPT_RTR |
| 38 | + default n |
| 39 | + help |
| 40 | + Enable SAE J1939 support: address claiming (J1939/81), |
| 41 | + PGN routing (J1939/21), and Transport Protocol (J1939/21 TP/ETP). |
| 42 | + Uses 29-bit extended CAN identifiers. |
| 43 | + |
| 44 | +config OMNICAN_UDS |
| 45 | + bool "ISO 14229 / UDS (Unified Diagnostic Services)" |
| 46 | + depends on ISOTP |
| 47 | + default n |
| 48 | + help |
| 49 | + Enable ISO 14229 UDS server and client. |
| 50 | + Core services: 0x10 DiagnosticSessionControl, |
| 51 | + 0x11 ECUReset, 0x22 ReadDataByIdentifier, |
| 52 | + 0x27 SecurityAccess, 0x28 CommunicationControl, |
| 53 | + 0x2E WriteDataByIdentifier, 0x31 RoutineControl, |
| 54 | + 0x34/0x36/0x37 RequestDownload/TransferData/RequestTransferExit, |
| 55 | + 0x3E TesterPresent, 0x85 ControlDTCSetting. |
| 56 | + Transport: Zephyr ISO-TP (ISO 15765-2). |
| 57 | + |
| 58 | +config OMNICAN_OBD2 |
| 59 | + bool "SAE J1979 / OBD-II" |
| 60 | + depends on ISOTP |
| 61 | + default n |
| 62 | + help |
| 63 | + Enable OBD-II (SAE J1979) PID query/response support. |
| 64 | + Supports Mode 0x01..0x09. Transport: Zephyr ISO-TP (ISO 15765-4). |
| 65 | + |
| 66 | +# --------------------------------------------------------------------------- |
| 67 | +# Core frame router |
| 68 | +# --------------------------------------------------------------------------- |
| 69 | + |
| 70 | +config OMNICAN_FRAME_ROUTER |
| 71 | + bool |
| 72 | + default y if (OMNICAN_CANOPEN || OMNICAN_J1939 || OMNICAN_UDS || OMNICAN_OBD2) |
| 73 | + help |
| 74 | + Internal: enable the CAN frame router when any protocol is active. |
| 75 | + |
| 76 | +# --------------------------------------------------------------------------- |
| 77 | +# ISOTP patch (Zephyr #86025 workaround) |
| 78 | +# --------------------------------------------------------------------------- |
| 79 | + |
| 80 | +config OMNICAN_ISOTP_PATCH |
| 81 | + bool "Apply Zephyr ISOTP same-ID bind/send workaround" |
| 82 | + depends on ISOTP && (OMNICAN_UDS || OMNICAN_OBD2) |
| 83 | + default y if OMNICAN_UDS || OMNICAN_OBD2 |
| 84 | + help |
| 85 | + Enables the OmniCAN workaround for Zephyr ISOTP issue #86025: |
| 86 | + cannot bind and transmit on the same CAN ID. Required for |
| 87 | + standard UDS physical addressing (e.g. 0x7E0/0x7E8). |
| 88 | + |
| 89 | +# --------------------------------------------------------------------------- |
| 90 | +# Logging |
| 91 | +# --------------------------------------------------------------------------- |
| 92 | + |
| 93 | +module = OMNICAN |
| 94 | +module-str = OmniCAN |
| 95 | +source "$(ZEPHYR_BASE)/subsys/logging/Kconfig.template.log_config" |
| 96 | + |
| 97 | +endif # OMNICAN |
0 commit comments