diff --git a/.gitignore b/.gitignore index e808787..ab45b47 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,5 @@ Xcode_build/ Environment CustomProperties.json +/.vscode/settings.json +/.vscode/tasks.json diff --git a/CPP_Demo/main.cpp b/CPP_Demo/main.cpp index 7ae7eb7..632880b 100644 --- a/CPP_Demo/main.cpp +++ b/CPP_Demo/main.cpp @@ -21,6 +21,12 @@ #include "A2Lpp.hpp" +#ifdef _WIN +#define M_PI 3.14159265358979323846 +#endif +#define M_2PI (M_PI*2) + + // OPTIONs are defined in main_cfg.h diff --git a/C_Demo/ecu.c b/C_Demo/ecu.c index 336a57d..852b789 100644 --- a/C_Demo/ecu.c +++ b/C_Demo/ecu.c @@ -18,6 +18,10 @@ #endif #include "ecu.h" +#ifdef _WIN +#define M_PI 3.14159265358979323846 +#endif +#define M_2PI (M_PI*2) /**************************************************************************/ /* ECU Measurements */ diff --git a/C_Demo/main.h b/C_Demo/main.h deleted file mode 100644 index 0d22152..0000000 --- a/C_Demo/main.h +++ /dev/null @@ -1,92 +0,0 @@ -#pragma once - - -/* main.h */ -/* -| Code released into public domain, no attribution required -*/ - -// Windows or Linux ? -#if defined(_WIN32) || defined(_WIN64) - #define _WIN - #if defined(_WIN32) && defined(_WIN64) - #undef _WIN32 - #endif - #if defined(_LINUX) || defined(_LINUX64)|| defined(_LINUX32) - #error - #endif -#else - #define _LINUX - #if defined (_ix64_) || defined (__x86_64__) || defined (__aarch64__) - #define _LINUX64 - #else - #define _LINUX32 - #endif - #if defined(_WIN) || defined(_WIN64)|| defined(_WIN32) - #error - #endif -#endif - - -#ifdef _WIN -#define WIN32_LEAN_AND_MEAN -#define _CRT_SECURE_NO_WARNINGS -#else -#define _DEFAULT_SOURCE -#endif - - -#include -#include -#include -#include -#include -#include - -#ifndef _WIN // Linux - -#include -#include -#include -#include -#include -//#include - -#include -#include -//#include -//#include -//#include -//#include -#include -#include - -//#define MAX_PATH 256 - -#else // Windows - -#include -#include -#include - -#endif - - -#ifdef __cplusplus -#include -#include -#include -#include -#endif - -#define BOOL int -#define FALSE 0 -#define TRUE 1 - -#ifdef _WIN -#define M_PI 3.14159265358979323846 -#endif -#define M_2PI (M_PI*2) - -#include "main_cfg.h" - diff --git a/XCPlib/XCPlib.xcodeproj/project.pbxproj b/XCPlib/XCPlib.xcodeproj/project.pbxproj deleted file mode 100644 index 7a03a18..0000000 --- a/XCPlib/XCPlib.xcodeproj/project.pbxproj +++ /dev/null @@ -1,346 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 56; - objects = { - -/* Begin PBXBuildFile section */ - D52705D62B76E30000875CEC /* main.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705D12B76E30000875CEC /* main.h */; }; - D52705D72B76E30000875CEC /* xcp_cfg.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705D22B76E30000875CEC /* xcp_cfg.h */; }; - D52705D82B76E30000875CEC /* main_cfg.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705D32B76E30000875CEC /* main_cfg.h */; }; - D52705D92B76E30000875CEC /* xcpAppl.c in Sources */ = {isa = PBXBuildFile; fileRef = D52705D42B76E30000875CEC /* xcpAppl.c */; }; - D52705DA2B76E30000875CEC /* xcptl_cfg.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705D52B76E30000875CEC /* xcptl_cfg.h */; }; - D52705E82B76E32700875CEC /* xcpLite.c in Sources */ = {isa = PBXBuildFile; fileRef = D52705DB2B76E32700875CEC /* xcpLite.c */; }; - D52705E92B76E32700875CEC /* dbg_print.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705DC2B76E32700875CEC /* dbg_print.h */; }; - D52705EA2B76E32700875CEC /* xcp.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705DD2B76E32700875CEC /* xcp.h */; }; - D52705EB2B76E32700875CEC /* xcpEthServer.c in Sources */ = {isa = PBXBuildFile; fileRef = D52705DE2B76E32700875CEC /* xcpEthServer.c */; }; - D52705EC2B76E32700875CEC /* xcpEthTl.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705DF2B76E32700875CEC /* xcpEthTl.h */; }; - D52705ED2B76E32700875CEC /* A2L.c in Sources */ = {isa = PBXBuildFile; fileRef = D52705E02B76E32700875CEC /* A2L.c */; }; - D52705EE2B76E32700875CEC /* xcpLite.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705E12B76E32700875CEC /* xcpLite.h */; }; - D52705EF2B76E32700875CEC /* platform.c in Sources */ = {isa = PBXBuildFile; fileRef = D52705E22B76E32700875CEC /* platform.c */; }; - D52705F02B76E32700875CEC /* xcpEthServer.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705E32B76E32700875CEC /* xcpEthServer.h */; }; - D52705F12B76E32700875CEC /* xcpEthTl.c in Sources */ = {isa = PBXBuildFile; fileRef = D52705E42B76E32700875CEC /* xcpEthTl.c */; }; - D52705F22B76E32700875CEC /* A2L.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705E52B76E32700875CEC /* A2L.h */; }; - D52705F32B76E32700875CEC /* xcpTl.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705E62B76E32700875CEC /* xcpTl.h */; }; - D52705F42B76E32700875CEC /* platform.h in Headers */ = {isa = PBXBuildFile; fileRef = D52705E72B76E32700875CEC /* platform.h */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - D52705CA2B76E25A00875CEC /* libXCPlib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libXCPlib.a; sourceTree = BUILT_PRODUCTS_DIR; }; - D52705D12B76E30000875CEC /* main.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = main.h; sourceTree = ""; }; - D52705D22B76E30000875CEC /* xcp_cfg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xcp_cfg.h; sourceTree = ""; }; - D52705D32B76E30000875CEC /* main_cfg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = main_cfg.h; sourceTree = ""; }; - D52705D42B76E30000875CEC /* xcpAppl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = xcpAppl.c; sourceTree = ""; }; - D52705D52B76E30000875CEC /* xcptl_cfg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xcptl_cfg.h; sourceTree = ""; }; - D52705DB2B76E32700875CEC /* xcpLite.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xcpLite.c; path = ../src/xcpLite.c; sourceTree = ""; }; - D52705DC2B76E32700875CEC /* dbg_print.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dbg_print.h; path = ../src/dbg_print.h; sourceTree = ""; }; - D52705DD2B76E32700875CEC /* xcp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xcp.h; path = ../src/xcp.h; sourceTree = ""; }; - D52705DE2B76E32700875CEC /* xcpEthServer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xcpEthServer.c; path = ../src/xcpEthServer.c; sourceTree = ""; }; - D52705DF2B76E32700875CEC /* xcpEthTl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xcpEthTl.h; path = ../src/xcpEthTl.h; sourceTree = ""; }; - D52705E02B76E32700875CEC /* A2L.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = A2L.c; path = ../src/A2L.c; sourceTree = ""; }; - D52705E12B76E32700875CEC /* xcpLite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xcpLite.h; path = ../src/xcpLite.h; sourceTree = ""; }; - D52705E22B76E32700875CEC /* platform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = platform.c; path = ../src/platform.c; sourceTree = ""; }; - D52705E32B76E32700875CEC /* xcpEthServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xcpEthServer.h; path = ../src/xcpEthServer.h; sourceTree = ""; }; - D52705E42B76E32700875CEC /* xcpEthTl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xcpEthTl.c; path = ../src/xcpEthTl.c; sourceTree = ""; }; - D52705E52B76E32700875CEC /* A2L.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = A2L.h; path = ../src/A2L.h; sourceTree = ""; }; - D52705E62B76E32700875CEC /* xcpTl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xcpTl.h; path = ../src/xcpTl.h; sourceTree = ""; }; - D52705E72B76E32700875CEC /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = platform.h; path = ../src/platform.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D52705C82B76E25A00875CEC /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - D52705C12B76E25A00875CEC = { - isa = PBXGroup; - children = ( - D52705E02B76E32700875CEC /* A2L.c */, - D52705E52B76E32700875CEC /* A2L.h */, - D52705DC2B76E32700875CEC /* dbg_print.h */, - D52705E22B76E32700875CEC /* platform.c */, - D52705E72B76E32700875CEC /* platform.h */, - D52705DD2B76E32700875CEC /* xcp.h */, - D52705DE2B76E32700875CEC /* xcpEthServer.c */, - D52705E32B76E32700875CEC /* xcpEthServer.h */, - D52705E42B76E32700875CEC /* xcpEthTl.c */, - D52705DF2B76E32700875CEC /* xcpEthTl.h */, - D52705DB2B76E32700875CEC /* xcpLite.c */, - D52705E12B76E32700875CEC /* xcpLite.h */, - D52705E62B76E32700875CEC /* xcpTl.h */, - D52705D32B76E30000875CEC /* main_cfg.h */, - D52705D12B76E30000875CEC /* main.h */, - D52705D22B76E30000875CEC /* xcp_cfg.h */, - D52705D42B76E30000875CEC /* xcpAppl.c */, - D52705D52B76E30000875CEC /* xcptl_cfg.h */, - D52705CB2B76E25A00875CEC /* Products */, - ); - sourceTree = ""; - }; - D52705CB2B76E25A00875CEC /* Products */ = { - isa = PBXGroup; - children = ( - D52705CA2B76E25A00875CEC /* libXCPlib.a */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - D52705C62B76E25A00875CEC /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - D52705F22B76E32700875CEC /* A2L.h in Headers */, - D52705EE2B76E32700875CEC /* xcpLite.h in Headers */, - D52705EA2B76E32700875CEC /* xcp.h in Headers */, - D52705F02B76E32700875CEC /* xcpEthServer.h in Headers */, - D52705D62B76E30000875CEC /* main.h in Headers */, - D52705D72B76E30000875CEC /* xcp_cfg.h in Headers */, - D52705D82B76E30000875CEC /* main_cfg.h in Headers */, - D52705F32B76E32700875CEC /* xcpTl.h in Headers */, - D52705EC2B76E32700875CEC /* xcpEthTl.h in Headers */, - D52705F42B76E32700875CEC /* platform.h in Headers */, - D52705DA2B76E30000875CEC /* xcptl_cfg.h in Headers */, - D52705E92B76E32700875CEC /* dbg_print.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - D52705C92B76E25A00875CEC /* XCPlib */ = { - isa = PBXNativeTarget; - buildConfigurationList = D52705CE2B76E25A00875CEC /* Build configuration list for PBXNativeTarget "XCPlib" */; - buildPhases = ( - D52705C62B76E25A00875CEC /* Headers */, - D52705C72B76E25A00875CEC /* Sources */, - D52705C82B76E25A00875CEC /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = XCPlib; - productName = XCPlib; - productReference = D52705CA2B76E25A00875CEC /* libXCPlib.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D52705C22B76E25A00875CEC /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = 1; - LastUpgradeCheck = 1520; - TargetAttributes = { - D52705C92B76E25A00875CEC = { - CreatedOnToolsVersion = 15.2; - }; - }; - }; - buildConfigurationList = D52705C52B76E25A00875CEC /* Build configuration list for PBXProject "XCPlib" */; - compatibilityVersion = "Xcode 14.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = D52705C12B76E25A00875CEC; - productRefGroup = D52705CB2B76E25A00875CEC /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D52705C92B76E25A00875CEC /* XCPlib */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - D52705C72B76E25A00875CEC /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D52705D92B76E30000875CEC /* xcpAppl.c in Sources */, - D52705EF2B76E32700875CEC /* platform.c in Sources */, - D52705ED2B76E32700875CEC /* A2L.c in Sources */, - D52705EB2B76E32700875CEC /* xcpEthServer.c in Sources */, - D52705E82B76E32700875CEC /* xcpLite.c in Sources */, - D52705F12B76E32700875CEC /* xcpEthTl.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - D52705CC2B76E25A00875CEC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 14.2; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - D52705CD2B76E25A00875CEC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = YES; - GCC_C_LANGUAGE_STANDARD = gnu17; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LOCALIZATION_PREFERS_STRING_CATALOGS = YES; - MACOSX_DEPLOYMENT_TARGET = 14.2; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SDKROOT = macosx; - }; - name = Release; - }; - D52705CF2B76E25A00875CEC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - EXECUTABLE_PREFIX = lib; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Debug; - }; - D52705D02B76E25A00875CEC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - EXECUTABLE_PREFIX = lib; - PRODUCT_NAME = "$(TARGET_NAME)"; - SKIP_INSTALL = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - D52705C52B76E25A00875CEC /* Build configuration list for PBXProject "XCPlib" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D52705CC2B76E25A00875CEC /* Debug */, - D52705CD2B76E25A00875CEC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - D52705CE2B76E25A00875CEC /* Build configuration list for PBXNativeTarget "XCPlib" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D52705CF2B76E25A00875CEC /* Debug */, - D52705D02B76E25A00875CEC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D52705C22B76E25A00875CEC /* Project object */; -} diff --git a/XCPlib/XCPlib.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/XCPlib/XCPlib.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/XCPlib/XCPlib.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/XCPlib/XCPlib.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/XCPlib/XCPlib.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/XCPlib/XCPlib.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/XCPlib/XCPlib.xcodeproj/project.xcworkspace/xcuserdata/rainer.xcuserdatad/UserInterfaceState.xcuserstate b/XCPlib/XCPlib.xcodeproj/project.xcworkspace/xcuserdata/rainer.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index d748af8..0000000 Binary files a/XCPlib/XCPlib.xcodeproj/project.xcworkspace/xcuserdata/rainer.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/XCPlib/XCPlib.xcodeproj/xcuserdata/rainer.xcuserdatad/xcschemes/xcschememanagement.plist b/XCPlib/XCPlib.xcodeproj/xcuserdata/rainer.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index f538662..0000000 --- a/XCPlib/XCPlib.xcodeproj/xcuserdata/rainer.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - XCPlib.xcscheme_^#shared#^_ - - orderHint - 0 - - - - diff --git a/XCPlib/main.h b/XCPlib/main.h deleted file mode 100644 index f8a8e4b..0000000 --- a/XCPlib/main.h +++ /dev/null @@ -1,88 +0,0 @@ -#pragma once - -/* main.h */ -/* -| Code released into public domain, no attribution required -*/ - -// Windows or Linux ? -#if defined(_WIN32) || defined(_WIN64) - #define _WIN - #if defined(_WIN32) && defined(_WIN64) - #undef _WIN32 - #endif - #if defined(_LINUX) || defined(_LINUX64)|| defined(_LINUX32) - #error - #endif -#else - #define _LINUX - #if defined (_ix64_) || defined (__x86_64__) || defined (__aarch64__) - #define _LINUX64 - #else - #define _LINUX32 - #endif - #if defined(_WIN) || defined(_WIN64)|| defined(_WIN32) - #error - #endif -#endif - - -#ifdef _WIN -#define WIN32_LEAN_AND_MEAN -#define _CRT_SECURE_NO_WARNINGS -#else -#define _DEFAULT_SOURCE -#endif - - -#include -#include -#include -#include -#include - -#ifdef _WIN -#define M_PI 3.14159265358979323846 -#endif -#define M_2PI (M_PI*2) - -#include - -#ifndef _WIN // Linux - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#define MAX_PATH 256 -#define BOOL int -#define FALSE 0 -#define TRUE 1 - -#else // Windows - -#include -#include -#include - -#define BOOL int -#define FALSE 0 -#define TRUE 1 - -#endif - -#include "main_cfg.h" - diff --git a/XCPlite/main.c b/XCPlite/main.c index 521c523..94d5101 100644 --- a/XCPlite/main.c +++ b/XCPlite/main.c @@ -19,6 +19,11 @@ #include "A2L.h" #endif +#ifdef _WIN +#define M_PI 3.14159265358979323846 +#endif +#define M_2PI (M_PI*2) + // OPTIONs defined in main_cfg.h diff --git a/XCPlite/main.h b/XCPlite/main.h index 0d22152..1332275 100644 --- a/XCPlite/main.h +++ b/XCPlite/main.h @@ -50,19 +50,11 @@ #include #include #include -//#include - #include #include -//#include -//#include -//#include -//#include #include #include -//#define MAX_PATH 256 - #else // Windows #include @@ -83,10 +75,5 @@ #define FALSE 0 #define TRUE 1 -#ifdef _WIN -#define M_PI 3.14159265358979323846 -#endif -#define M_2PI (M_PI*2) - #include "main_cfg.h" diff --git a/src/main.h b/src/main.h index f8d6c49..9d75dc5 100644 --- a/src/main.h +++ b/src/main.h @@ -83,10 +83,5 @@ #define FALSE 0 #define TRUE 1 -// #ifdef _WIN -// #define M_PI 3.14159265358979323846 -// #endif -// #define M_2PI (M_PI*2) - #include "main_cfg.h" diff --git a/src/xcpAppl.c b/src/xcpAppl.c index c90d560..4a8504d 100644 --- a/src/xcpAppl.c +++ b/src/xcpAppl.c @@ -236,7 +236,7 @@ uint8_t* ApplXcpGetBaseAddr() return ((uint8_t*)((uint64_t)(&__base_addr_val)&0xffffffff00000000)); } -uint32_t ApplXcpGetAddr(const uint8_t* p) +uint32_t ApplXcpGetAddr(uint8_t* p) { return ((uint32_t)((uint64_t) p)& 0xffffffff); } diff --git a/src/xcpLite.h b/src/xcpLite.h index b421051..7b2bf8a 100644 --- a/src/xcpLite.h +++ b/src/xcpLite.h @@ -142,7 +142,7 @@ extern void ApplXcpStopDaq(); /* Address conversions from A2L address to pointer and vice versa in absolute addressing mode */ #ifdef XCP_ENABLE_ABS_ADDRESSING extern uint8_t* ApplXcpGetPointer(uint8_t xcpAddrExt, uint32_t xcpAddr); /* Create a pointer (uint8_t*) from xcpAddrExt and xcpAddr, returns NULL if no access */ -extern uint32_t ApplXcpGetAddr(const uint8_t* p); // Calculate the xcpAddr address from a pointer +extern uint32_t ApplXcpGetAddr(uint8_t* p); // Calculate the xcpAddr address from a pointer extern uint8_t *ApplXcpGetBaseAddr(); // Get the base address for DAQ data access */ #endif