diff --git a/README.md b/README.md index bc122bb..47ceda8 100644 --- a/README.md +++ b/README.md @@ -44,25 +44,27 @@ Type `can_test --help` to display all program options. - macOS 13.0 and later (Intel and Apple silicon) - Debian GNU/Linux 12 (Linux Kernel 6.x) -### Development Environment +### Development Environments #### macOS Sequoia - -- macOS Sequoia (15.2) on a Mac mini (M1, 2020) +- macOS Sequoia (15.3.1) on a Mac mini (M4 Pro, 2024) - Apple clang version 16.0.0 (clang-1600.0.26.6) #### macOS Ventura - -- macOS Ventura (13.7.2) on a MacBook Pro (2019) +- macOS Ventura (13.7.4) on a MacBook Pro (2019) - Apple clang version 14.0.3 (clang-1403.0.22.14.1) #### Debian 12.9 ("bookworm") -- Debian 6.1.123-1 (2024-11-22) x86_64 GNU/Linux +- Debian 6.1.128-1 (2025-02-07) x86_64 GNU/Linux - gcc (Debian 12.2.0-14) 12.2.0 -- PCAN Driver and Library for Linux v8.19 -### Required PCBUSB Library -libPCBUSB.x.y.dylib - Version 0.13 or later (Latest is Greatest!) +### Required Library + +#### macOS +- libPCBUSB.x.y.dylib - Version 0.13 or later (Latest is Greatest!) + +#### Linux +- libpcanbasic.so - PCAN Driver and Library for Linux, Version 8.20 ### Supported Devices @@ -115,7 +117,7 @@ It can be downloaded from . ### Trademarks -Mac and macOS are trademarks of Apple Inc., registered in the U.S. and other countries. \ +Mac and macOS are trademarks of Apple Inc., registered in the U.S. and other countries and regions. \ PCAN is a registered trademark of PEAK-System Technik GmbH, Darmstadt, Germany. \ POSIX is a registered trademark of the Institute of Electrical and Electronic Engineers, Inc. \ GNU C/C++ is a registered trademark of Free Software Foundation, Inc. \ diff --git a/Utilities/Makefile b/Utilities/Makefile index 19c99c0..da8622b 100644 --- a/Utilities/Makefile +++ b/Utilities/Makefile @@ -1,12 +1,12 @@ # # CAN Utilities for PEAK-System PCAN USB Interfaces (macOS, x86_64 & arm64) # -# Copyright (c) 2007-2010 Uwe Vogt, UV Software, Friedrichshafen -# Copyright (c) 2012-2024 Uwe Vogt, UV Software, Berlin (info@mac-can.com) +# Copyright (c) 2005-2010 Uwe Vogt, UV Software, Friedrichshafen +# Copyright (c) 2012-2025 Uwe Vogt, UV Software, Berlin (info@mac-can.com) # -# These utilities are free software: you can redistribute it and/or modify +# These utilities are free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # These utilities is distributed in the hope that it will be useful, @@ -14,8 +14,8 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License -# along with these utilities. If not, see . +# You should have received a copy of the GNU General Public License along +# with these utilities; if not, see . # all: @rm -r build_no.h 2> /dev/null || true diff --git a/Utilities/build_no.sh b/Utilities/build_no.sh index facccfc..7884815 100755 --- a/Utilities/build_no.sh +++ b/Utilities/build_no.sh @@ -2,9 +2,9 @@ echo "/* -- Do not commit this file --" > ./build_no.h echo " *" >> ./build_no.h echo " * project : CAN - Controller Area Network" >> ./build_no.h echo " *" >> ./build_no.h -echo " * purpose : CAN Tester (based on macOS Library for PCAN-USB Interfaces)" >> ./build_no.h +echo " * purpose : CAN Utilities (based on macOS Library for PCAN-USB Interfaces)" >> ./build_no.h echo " *" >> ./build_no.h -echo " * copyright : (C) 2019,2023 UV Software, Berlin" >> ./build_no.h +echo " * copyright : (C) 2005-2025 UV Software, Berlin" >> ./build_no.h echo " *" >> ./build_no.h echo " * author(s) : Uwe Vogt, UV Software" >> ./build_no.h echo " *" >> ./build_no.h diff --git a/Utilities/can_moni/Makefile b/Utilities/can_moni/Makefile index b088075..2873b9f 100644 --- a/Utilities/can_moni/Makefile +++ b/Utilities/can_moni/Makefile @@ -32,7 +32,7 @@ MAIN_DIR = . MISC_DIR = $(HOME_DIR)/misc DRIVER_DIR = $(HOME_DIR)/driver -WRAPPER_DIR = $(HOME_DIR)/macOS +INCLUDE_DIR = $(HOME_DIR)/include OBJECTS = $(OUTDIR)/main.o $(OUTDIR)/bitrates.o $(OUTDIR)/timer.o $(OUTDIR)/printmsg.o @@ -47,7 +47,7 @@ ifeq ($(current_OS),Darwin) # macOS - libPCBUSB.dylib ifneq ($(VARIANT),STANDALONE) DEFINES += -DOPTION_PCBUSB_STANDALONE=0 - HEADERS += -I$(HOME_DIR)/macOS + HEADERS += -I$(INCLUDE_DIR)/mac/pcbusb OBJECTS += $(OUTDIR)/PCBUSB.o @@ -55,7 +55,7 @@ ifneq ($(VARIANT),STANDALONE) else DEFINES += -DOPTION_PCBUSB_STANDALONE=1 - HEADERS += -I$(HOME_DIR)/macOS -I$(DRIVER_DIR) + HEADERS += -I$(INCLUDE_DIR)/mac/pcbusb -I$(DRIVER_DIR) OBJECTS += $(OUTDIR)/pcan_api.o \ $(OUTDIR)/pcan_drv.o \ @@ -79,13 +79,7 @@ CXXFLAGS += -O2 -g -Wall -Wextra -pthread \ $(DEFINES) \ $(HEADERS) -LDFLAGS += -rpath /usr/local/lib - -LIBRARIES = -lpthread - -ifeq ($(VARIANT),STANDALONE) - LDFLAGS += -Wl,-framework -Wl,IOKit -Wl,-framework -Wl,CoreFoundation -endif +LDFLAGS += -rpath /usr/local/lib ifeq ($(BINARY),UNIVERSAL) CFLAGS += -arch arm64 -arch x86_64 @@ -93,6 +87,12 @@ CXXFLAGS += -arch arm64 -arch x86_64 LDFLAGS += -arch arm64 -arch x86_64 endif +ifeq ($(VARIANT),STANDALONE) +LDFLAGS += -Wl,-framework -Wl,IOKit -Wl,-framework -Wl,CoreFoundation +endif + +LIBRARIES = -lpthread + CXX = clang++ CC = clang LD = clang @@ -102,7 +102,7 @@ ifeq ($(current_OS),Linux) # linux - libpcanbasic.so DEFINES += -HEADERS += -I$(HOME_DIR)/Linux +HEADERS += -I$(INCLUDE_DIR)/linux/pcanbasic OBJECTS += $(OUTDIR)/PCBUSB.o @@ -131,6 +131,7 @@ CP = cp -f CHECKER = warning,information IGNORE = -i tester.c -i dosopt.c +LEVEL = exhaustive # normal or exhaustive OUTDIR = .objects BINDIR = $(BIN_DIR) @@ -155,7 +156,7 @@ incdir: @mkdir -p $(INCDIR) check: - cppcheck --enable=$(CHECKER) --suppressions-list=$(HOME_DIR)/suppress.txt \ + cppcheck --enable=$(CHECKER) --check-level=$(LEVEL) --suppressions-list=$(HOME_DIR)/suppress.txt \ -D__APPLE__ $(DEFINES) $(HEADERS) $(IGNORE) $(MAIN_DIR) $(MISC_DIR) clean: @@ -167,13 +168,14 @@ pristine: install: @echo "Copying binary file..." - @-$(CP) $(TARGET) $(INSTALL) + @mkdir -p $(INSTALL) + $(CP) $(TARGET) $(INSTALL) $(OUTDIR)/main.o: $(MAIN_DIR)/main.c $(CC) $(CFLAGS) -MMD -MF $*.d -o $@ -c $< -$(OUTDIR)/PCBUSB.o: $(WRAPPER_DIR)/PCBUSB.c +$(OUTDIR)/PCBUSB.o: $(MISC_DIR)/PCBUSB.c $(CC) $(CFLAGS) -MMD -MF $*.d -o $@ -c $< $(OUTDIR)/bitrates.o: $(MISC_DIR)/bitrates.c @@ -215,8 +217,9 @@ $(OUTDIR)/pcan_log.o: $(DRIVER_DIR)/pcan_log.c $(TARGET): $(OBJECTS) $(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBRARIES) - $(CP) $(TARGET) $(BINDIR) ifeq ($(current_OS),Darwin) @lipo -archs $@ endif + @mkdir -p $(BINDIR) + $(CP) $(TARGET) $(BINDIR) @echo "\033[1mTarget '"$@"' successfully build\033[0m" diff --git a/Utilities/can_moni/README b/Utilities/can_moni/README index ff6db87..13d60b7 100644 --- a/Utilities/can_moni/README +++ b/Utilities/can_moni/README @@ -1,26 +1,26 @@ CAN Monitor for PEAK-System PCAN USB Interfaces (macOS, x86_64 & arm64) -Copyright (c) 2007,2012-2024 by Uwe Vogt, UV Software, Berlin. +Copyright (c) 2007,2012-2025 by Uwe Vogt, UV Software, Berlin. Usage: can_moni [