@@ -809,6 +809,7 @@ F: configs/stm32f769_disco_sd_defconfig
F: package/aespipe/
F: package/armadillo/
F: package/babeld/
+F: package/canopenterm/
F: package/iana-assignments/
F: package/inih/
F: package/pocketpy/
@@ -2467,6 +2467,7 @@ endif
source "package/c-icap-modules/Config.in"
source "package/can-utils/Config.in"
source "package/cannelloni/Config.in"
+ source "package/canopenterm/Config.in"
source "package/casync/Config.in"
source "package/casync-nano/Config.in"
source "package/cfm/Config.in"
new file mode 100644
@@ -0,0 +1,39 @@
+From fc150187a2e2ce777e757405eb1d67235fc68d75 Mon Sep 17 00:00:00 2001
+From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Date: Thu, 8 May 2025 15:24:38 +0200
+Subject: [PATCH] Fix exe installation when BUILD_YOCTO is enabled
+
+While building CanopenTerm in Buildroot, with the BUILD_YOCTO option
+enabled (yes, really :)), the following error is raised:
+
+CMake Error at output/build/canopenterm-1.0.10/cmake_install.cmake:114 (file):
+ file INSTALL cannot find
+ "buildroot/output/build/canopenterm-1.0.10/CANopenTerm":
+ No such file or directory.
+
+Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
+Upstream: https://github.com/CANopenTerm/CANopenTerm/pull/95
+---
+ cmake/os_linux.cmake | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/os_linux.cmake b/cmake/os_linux.cmake
+index 7c1f8185b2a2..f149bd03fe92 100644
+--- a/cmake/os_linux.cmake
++++ b/cmake/os_linux.cmake
+@@ -104,10 +104,10 @@ if (BUILD_YOCTO)
+ DESTINATION /usr/share/CANopenTerm/scripts/utils
+ FILES_MATCHING PATTERN "*")
+
+- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/CANopenTerm
++ install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/export/CANopenTerm
+ DESTINATION /usr/bin)
+
+- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/codb2json
++ install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/export/codb2json
+ DESTINATION /usr/bin)
+
+ return()
+--
+2.43.0
+
new file mode 100644
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_CANOPENTERM
+ bool "canopenterm"
+ depends on BR2_PACKAGE_CJSON
+ depends on BR2_PACKAGE_INIH
+ depends on BR2_PACKAGE_LIBSOCKETCAN
+ depends on BR2_PACKAGE_LUA
+ depends on BR2_PACKAGE_POCKETPY
+ depends on BR2_PACKAGE_READLINE
+ depends on BR2_PACKAGE_SDL2
+ help
+ CANopenTerm is an open-source tool for developing,
+ testing, and analyzing CANopen CC networks and
+ devices.
+
+ https://github.com/CANopenTerm/CANopenTerm
new file mode 100644
@@ -0,0 +1,3 @@
+# locally computed
+sha256 9de6f472b749f08a5ea9a836604507cd56c71f818a4141a2b989423fbb7beb80 canopenterm-1.0.10.tar.gz
+sha256 cc555368040b92e77b14289b367ccbebf88344367188862680d40cc885636d3a LICENSE.md
new file mode 100644
@@ -0,0 +1,15 @@
+################################################################################
+#
+# canopenterm
+#
+################################################################################
+
+CANOPENTERM_VERSION = 1.0.10
+CANOPENTERM_SITE = $(call github,CANopenTerm,CANopenTerm,v$(CANOPENTERM_VERSION))
+CANOPENTERM_LICENSE = MIT
+CANOPENTERM_LICENSE_FILES = LICENSE.md
+CANOPENTERM_DEPENDENCIES = cjson inih libsocketcan lua pocketpy readline sdl2
+
+CANOPENTERM_CONF_OPTS = -DBUILD_YOCTO=ON -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_FIND_DEBUG_MODE=ON
+
+$(eval $(cmake-package))
CANopenTerm is an open-source tool for developing, testing, and analyzing CANopen CC networks and devices. It provides a technical, no-nonsense solution for professionals working with CAN CC-based networks. Additionally, it supports SAE J1939 and OBD-II protocols, making it versatile for various applications. Version v1.0.10 was chosen because it is the last one requiring SDL2. Indeed version v1.0.11 depends on SDL3. Tested on STM32MP257F-EV1 Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> --- DEVELOPERS | 1 + package/Config.in | 1 + ...allation-when-BUILD_YOCTO-is-enabled.patch | 39 +++++++++++++++++++ package/canopenterm/Config.in | 15 +++++++ package/canopenterm/canopenterm.hash | 3 ++ package/canopenterm/canopenterm.mk | 15 +++++++ 6 files changed, 74 insertions(+) create mode 100644 package/canopenterm/0001-Fix-exe-installation-when-BUILD_YOCTO-is-enabled.patch create mode 100644 package/canopenterm/Config.in create mode 100644 package/canopenterm/canopenterm.hash create mode 100644 package/canopenterm/canopenterm.mk