From 7d33989aa38f4011704f1314cebdd65a269d5621 Mon Sep 17 00:00:00 2001 From: Addio <59629419+AddioElectronics@users.noreply.github.com> Date: Fri, 15 May 2026 05:48:06 -0700 Subject: [PATCH 1/5] Project re-structure, and Saleae AnalyzersSDK update - Moved SDKs to 'thirdparty/' directory - Saleae updated SDK now supports arm64 - KingstVis CMAKE support - Build Wizard python script - Shell scripts for batch building - Python script for packaging releases --- .gitignore | 2 + .gitmodules | 4 +- CMakeLists.txt | 28 +- QSpiAnalyzer.sln | 52 +- QSpiAnalyzer.vcxproj | 583 ++++++++++++++---- README.md | 90 ++- build.py | 433 +++++++++++++ cmake/Kingst.cmake | 12 + cmake/Saleae.cmake | 19 + scripts/build_all.cmd | 7 + scripts/build_all.sh | 13 + scripts/build_kingst.cmd | 14 + scripts/build_kingst.sh | 8 + scripts/build_saleae.cmd | 17 + scripts/build_saleae.sh | 11 + scripts/package_binaries.py | 199 ++++++ src/QSpiAnalyzer.h | 6 +- src/QSpiAnalyzerResults.cpp | 12 +- .../KingstAnalyzerSDK/AnalyzerSDKConfig.cmake | 65 ++ .../KingstAnalyzerSDK}/Linux/makefile | 0 .../KingstAnalyzerSDK}/Mac/makefile | 0 .../KingstAnalyzerSDK}/inc/Analyzer.h | 0 .../inc/AnalyzerChannelData.h | 0 .../KingstAnalyzerSDK}/inc/AnalyzerHelpers.h | 0 .../KingstAnalyzerSDK}/inc/AnalyzerResults.h | 0 .../inc/AnalyzerSettingInterface.h | 0 .../KingstAnalyzerSDK}/inc/AnalyzerSettings.h | 0 .../KingstAnalyzerSDK}/inc/AnalyzerTypes.h | 0 .../KingstAnalyzerSDK}/inc/LogicPublicTypes.h | 0 .../inc/SimulationChannelDescriptor.h | 0 .../lib/Linux/libAnalyzer.so | Bin .../lib/Mac/libAnalyzer.dylib | Bin 32 files changed, 1382 insertions(+), 193 deletions(-) create mode 100644 build.py create mode 100644 cmake/Kingst.cmake create mode 100644 cmake/Saleae.cmake create mode 100644 scripts/build_all.cmd create mode 100644 scripts/build_all.sh create mode 100644 scripts/build_kingst.cmd create mode 100644 scripts/build_kingst.sh create mode 100644 scripts/build_saleae.cmd create mode 100644 scripts/build_saleae.sh create mode 100644 scripts/package_binaries.py create mode 100644 thirdparty/KingstAnalyzerSDK/AnalyzerSDKConfig.cmake rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/Linux/makefile (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/Mac/makefile (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/inc/Analyzer.h (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/inc/AnalyzerChannelData.h (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/inc/AnalyzerHelpers.h (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/inc/AnalyzerResults.h (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/inc/AnalyzerSettingInterface.h (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/inc/AnalyzerSettings.h (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/inc/AnalyzerTypes.h (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/inc/LogicPublicTypes.h (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/inc/SimulationChannelDescriptor.h (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/lib/Linux/libAnalyzer.so (100%) rename {KingstAnalyzerSDK => thirdparty/KingstAnalyzerSDK}/lib/Mac/libAnalyzer.dylib (100%) diff --git a/.gitignore b/.gitignore index f994155..007089f 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ mono_crash.* [Rr]elease/ [Rr]eleases/ [Bb]uild/ +[Bb]uild*/ x64/ x86/ [Ww][Ii][Nn]32/ @@ -32,6 +33,7 @@ bld/ [Oo]bj/ [Ll]og/ [Ll]ogs/ +.vscode/ # Visual Studio 2015/2017 cache/options directory .vs/ diff --git a/.gitmodules b/.gitmodules index 0fd69dd..9baf410 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "SaleaeAnalyzerSDK"] - path = SaleaeAnalyzerSDK +[submodule "thirdparty/SaleaeAnalyzerSDK"] + path = thirdparty/SaleaeAnalyzerSDK url = https://github.com/saleae/AnalyzerSDK.git diff --git a/CMakeLists.txt b/CMakeLists.txt index d903c27..06ed69d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,15 +1,19 @@ cmake_minimum_required(VERSION 3.14...3.22) -project( - QSPI_Analyzer - VERSION 1.0 - LANGUAGES CXX +project(QSPI_Analyzer VERSION 1.0.1 LANGUAGES CXX) +add_library(QSPI_Analyzer SHARED) +target_compile_features(QSPI_Analyzer PRIVATE cxx_std_17) + +set_target_properties(QSPI_Analyzer PROPERTIES + OUTPUT_NAME "QSPI_Analyzer" + PREFIX "" ) -set(AnalyzerSDK_DIR SaleaeAnalyzerSDK) -find_package(AnalyzerSDK REQUIRED) +target_compile_features(QSPI_Analyzer PRIVATE cxx_std_17) + +set(BUILD_SHARED_LIBS ON) # Dynamic library -add_library(${PROJECT_NAME} SHARED +target_sources(QSPI_Analyzer PRIVATE src/QSpiAnalyzer.cpp src/QSpiAnalyzer.h src/QSpiAnalyzerResults.cpp @@ -23,6 +27,10 @@ add_library(${PROJECT_NAME} SHARED src/QspiTypes.h src/QSpiUtil.h ) -set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 17) -target_link_libraries(${PROJECT_NAME} PUBLIC Saleae::AnalyzerSDK) -target_compile_definitions(${PROJECT_NAME} PRIVATE SALEAE_ANALYZER) \ No newline at end of file + +# Select SDK +if(NOT DEFINED TARGET_SDK OR TARGET_SDK STREQUAL "saleae") + include(cmake/Saleae.cmake) +elseif(TARGET_SDK MATCHES "kingst") + include(cmake/Kingst.cmake) +endif() \ No newline at end of file diff --git a/QSpiAnalyzer.sln b/QSpiAnalyzer.sln index add8feb..38427b1 100644 --- a/QSpiAnalyzer.sln +++ b/QSpiAnalyzer.sln @@ -1,50 +1,62 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.6.33815.320 +# Visual Studio Version 18 +VisualStudioVersion = 18.5.11723.231 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "QSpiAnalyzer", "QSpiAnalyzer.vcxproj", "{35A9CF32-7794-46BA-95E2-41A42E1AC6C0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + DebugKingstVIS|ARM64 = DebugKingstVIS|ARM64 + DebugKingstVIS|Win32 = DebugKingstVIS|Win32 DebugKingstVIS|x64 = DebugKingstVIS|x64 - DebugKingstVIS|x86 = DebugKingstVIS|x86 + DebugLogic1|ARM64 = DebugLogic1|ARM64 + DebugLogic1|Win32 = DebugLogic1|Win32 DebugLogic1|x64 = DebugLogic1|x64 - DebugLogic1|x86 = DebugLogic1|x86 + DebugLogic2|ARM64 = DebugLogic2|ARM64 + DebugLogic2|Win32 = DebugLogic2|Win32 DebugLogic2|x64 = DebugLogic2|x64 - DebugLogic2|x86 = DebugLogic2|x86 + ReleaseKingstVIS|ARM64 = ReleaseKingstVIS|ARM64 + ReleaseKingstVIS|Win32 = ReleaseKingstVIS|Win32 ReleaseKingstVIS|x64 = ReleaseKingstVIS|x64 - ReleaseKingstVIS|x86 = ReleaseKingstVIS|x86 + ReleaseLogic1|ARM64 = ReleaseLogic1|ARM64 + ReleaseLogic1|Win32 = ReleaseLogic1|Win32 ReleaseLogic1|x64 = ReleaseLogic1|x64 - ReleaseLogic1|x86 = ReleaseLogic1|x86 + ReleaseLogic2|ARM64 = ReleaseLogic2|ARM64 + ReleaseLogic2|Win32 = ReleaseLogic2|Win32 ReleaseLogic2|x64 = ReleaseLogic2|x64 - ReleaseLogic2|x86 = ReleaseLogic2|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugKingstVIS|ARM64.ActiveCfg = DebugKingstVIS|ARM64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugKingstVIS|Win32.ActiveCfg = DebugKingstVIS|Win32 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugKingstVIS|Win32.Build.0 = DebugKingstVIS|Win32 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugKingstVIS|x64.ActiveCfg = DebugKingstVIS|x64 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugKingstVIS|x64.Build.0 = DebugKingstVIS|x64 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugKingstVIS|x86.ActiveCfg = DebugKingstVIS|Win32 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugKingstVIS|x86.Build.0 = DebugKingstVIS|Win32 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic1|ARM64.ActiveCfg = DebugLogic1|ARM64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic1|ARM64.Build.0 = DebugLogic1|ARM64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic1|Win32.ActiveCfg = DebugLogic1|Win32 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic1|x64.ActiveCfg = DebugLogic1|x64 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic1|x64.Build.0 = DebugLogic1|x64 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic1|x86.ActiveCfg = DebugLogic1|x64 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic1|x86.Build.0 = DebugLogic1|x64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic2|ARM64.ActiveCfg = DebugLogic2|ARM64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic2|ARM64.Build.0 = DebugLogic2|ARM64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic2|Win32.ActiveCfg = DebugLogic2|Win32 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic2|x64.ActiveCfg = DebugLogic2|x64 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic2|x64.Build.0 = DebugLogic2|x64 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic2|x86.ActiveCfg = DebugLogic2|x64 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.DebugLogic2|x86.Build.0 = DebugLogic2|x64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseKingstVIS|ARM64.ActiveCfg = ReleaseKingstVIS|ARM64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseKingstVIS|Win32.ActiveCfg = ReleaseKingstVIS|Win32 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseKingstVIS|Win32.Build.0 = ReleaseKingstVIS|Win32 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseKingstVIS|x64.ActiveCfg = ReleaseKingstVIS|x64 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseKingstVIS|x64.Build.0 = ReleaseKingstVIS|x64 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseKingstVIS|x86.ActiveCfg = ReleaseKingstVIS|Win32 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseKingstVIS|x86.Build.0 = ReleaseKingstVIS|Win32 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic1|ARM64.ActiveCfg = ReleaseLogic1|ARM64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic1|ARM64.Build.0 = ReleaseLogic1|ARM64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic1|Win32.ActiveCfg = ReleaseLogic1|Win32 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic1|x64.ActiveCfg = ReleaseLogic1|x64 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic1|x64.Build.0 = ReleaseLogic1|x64 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic1|x86.ActiveCfg = ReleaseLogic1|x64 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic1|x86.Build.0 = ReleaseLogic1|x64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic2|ARM64.ActiveCfg = ReleaseLogic2|ARM64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic2|ARM64.Build.0 = ReleaseLogic2|ARM64 + {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic2|Win32.ActiveCfg = ReleaseLogic2|Win32 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic2|x64.ActiveCfg = ReleaseLogic2|x64 {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic2|x64.Build.0 = ReleaseLogic2|x64 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic2|x86.ActiveCfg = ReleaseLogic2|x64 - {35A9CF32-7794-46BA-95E2-41A42E1AC6C0}.ReleaseLogic2|x86.Build.0 = ReleaseLogic2|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/QSpiAnalyzer.vcxproj b/QSpiAnalyzer.vcxproj index a2848b1..f6b8c1f 100644 --- a/QSpiAnalyzer.vcxproj +++ b/QSpiAnalyzer.vcxproj @@ -1,6 +1,10 @@  + + DebugKingstVIS + ARM64 + DebugKingstVIS Win32 @@ -9,6 +13,10 @@ DebugKingstVIS x64 + + DebugLogic1 + ARM64 + DebugLogic1 Win32 @@ -17,6 +25,10 @@ DebugLogic1 x64 + + DebugLogic2 + ARM64 + DebugLogic2 Win32 @@ -25,6 +37,10 @@ DebugLogic2 x64 + + ReleaseKingstVIS + ARM64 + ReleaseKingstVIS Win32 @@ -33,6 +49,10 @@ ReleaseKingstVIS x64 + + ReleaseLogic1 + ARM64 + ReleaseLogic1 Win32 @@ -41,6 +61,10 @@ ReleaseLogic1 x64 + + ReleaseLogic2 + ARM64 + ReleaseLogic2 Win32 @@ -74,12 +98,31 @@ QSpiAnalyzer + + DynamicLibrary + true + v143 + MultiByte + DynamicLibrary true v143 MultiByte + + DynamicLibrary + true + v143 + MultiByte + + + DynamicLibrary + true + v143 + MultiByte + x64 + DynamicLibrary true @@ -87,33 +130,41 @@ MultiByte x64 - + DynamicLibrary true v143 MultiByte - x86 + x64 - + DynamicLibrary true v143 MultiByte + x64 - + DynamicLibrary true v143 MultiByte x64 - + DynamicLibrary true v143 MultiByte x64 + + DynamicLibrary + false + v143 + true + MultiByte + DynamicLibrary false @@ -121,29 +172,28 @@ true MultiByte - + DynamicLibrary false v143 true MultiByte - + DynamicLibrary false v143 true MultiByte - x86 - + DynamicLibrary false v143 true MultiByte - + DynamicLibrary false v143 @@ -158,83 +208,123 @@ MultiByte x64 + + DynamicLibrary + false + v143 + true + MultiByte + x64 + + + DynamicLibrary + false + v143 + true + MultiByte + x64 + - + - + - + - + - + + + + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - true - $(SolutionDir)Build\Logic2\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\Logic2\$(Configuration)\$(Platform)\ - QSpiAnalyzer - - + true - $(SolutionDir)Build\Logic1\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\Logic1\$(Configuration)\$(Platform)\ + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ QSpiAnalyzer - + true - $(SolutionDir)Build\KingstVIS\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\KingstVIS\$(Configuration)\$(Platform)\ + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ QSpiAnalyzer - + true - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ QSpiAnalyzer true - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ QSpiAnalyzer @@ -242,144 +332,240 @@ true + + true + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ + QSpiAnalyzer + + + true + + + true + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ + QSpiAnalyzer + + + true + true - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ + QSpiAnalyzer + + + true + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ + QSpiAnalyzer + + + true + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ + QSpiAnalyzer + + + false + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ QSpiAnalyzer false - $(SolutionDir)Build\Logic2\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\Logic2\$(Configuration)\$(Platform)\ + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ QSpiAnalyzer - + false - $(SolutionDir)Build\Logic1\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\Logic1\$(Configuration)\$(Platform)\ + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ QSpiAnalyzer - + false - $(SolutionDir)Build\KingstVIS\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\KingstVIS\$(Configuration)\$(Platform)\ + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ QSpiAnalyzer - + false - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ QSpiAnalyzer - + false - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ QSpiAnalyzer false - $(SolutionDir)Build\$(Configuration)\$(Platform)\ - $(SolutionDir)Build\$(Configuration)\$(Platform)\ + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ QSpiAnalyzer + + false + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ + QSpiAnalyzer + + + false + $(SolutionDir)bin\$(Configuration)\$(Platform)\ + $(SolutionDir)obj\$(Configuration)\$(Platform)\ + QSpiAnalyzer + + + + NotUsing + Level3 + Disabled + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC2; + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + Disabled + stdcpp17 + + + Windows + true + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) + %(AdditionalOptions) /machine:x64 + %(IgnoreSpecificDefaultLibraries) + + + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Logic\CustomAnalyzers\$(TargetName).dll" + + - - + NotUsing Level3 Disabled - SALEAE=0;KINGSTVIS=1;SOFTWARE=SALEAE;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC2; - SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC2; + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + Disabled + stdcpp17 Windows true - SaleaeAnalyzerSDK\lib_x86_64\Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x86 + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) + %(AdditionalOptions) /machine:x64 + %(IgnoreSpecificDefaultLibraries) copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Logic\CustomAnalyzers\$(TargetName).dll" - + - - + NotUsing Level3 Disabled - SALEAE=0;KINGSTVIS=1;SOFTWARE=SALEAE;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC1; - SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /external:I "$(ProjectDir)SaleaeAnalyzerSDK\include" + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC2; + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + Disabled + stdcpp17 Windows true - SaleaeAnalyzerSDK\lib_x86_64\Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x86 + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_arm64;%(AdditionalLibraryDirectories) + %(AdditionalOptions) /machine:x64 + %(IgnoreSpecificDefaultLibraries) - copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Saleae Inc\Analyzers\$(TargetName).dll" + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Logic\CustomAnalyzers\$(TargetName).dll" - + - - + NotUsing Level3 Disabled - SALEAE=1;KINGSTVIS=2;SOFTWARE_VER=KINGSTVIS;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - KingstAnalyzerSDK\inc;src;%(AdditionalIncludeDirectories) + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC1 + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /external:I "$(ProjectDir)ThirdParty\SaleaeAnalyzerSDK\include" + Disabled + stdcpp17 Windows true - Analyzer.lib;%(AdditionalDependencies) - KingstAnalyzerSDK\lib\Win32;%(AdditionalLibraryDirectories) + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) + %(AdditionalOptions) /machine:x64 + %(IgnoreSpecificDefaultLibraries) - copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\KingstVIS\Analyzer\$(TargetName).dll" + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Saleae Inc\Analyzers\$(TargetName).dll" + + + + + + + + - + NotUsing Level3 Disabled - SALEAE=0;KINGSTVIS=1;SOFTWARE=SALEAE;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC2; - SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC1; + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /external:I "$(ProjectDir)ThirdParty\SaleaeAnalyzerSDK\include" Disabled + stdcpp17 Windows true - SaleaeAnalyzerSDK\lib_x86_64\Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) %(AdditionalOptions) /machine:x64 %(IgnoreSpecificDefaultLibraries) - copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Logic\CustomAnalyzers\$(TargetName).dll" + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Saleae Inc\Analyzers\$(TargetName).dll" + + + + + + + + - + NotUsing Level3 Disabled - SALEAE=0;KINGSTVIS=1;SOFTWARE=SALEAE;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC1; - SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /external:I "$(ProjectDir)SaleaeAnalyzerSDK\include" + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC1; + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /external:I "$(ProjectDir)ThirdParty\SaleaeAnalyzerSDK\include" Disabled + stdcpp17 Windows true - SaleaeAnalyzerSDK\lib_x86_64\Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_arm64;%(AdditionalLibraryDirectories) %(AdditionalOptions) /machine:x64 %(IgnoreSpecificDefaultLibraries) @@ -401,20 +587,61 @@ Level3 Disabled - SALEAE=0;KINGSTVIS=1;SOFTWARE=KINGSTVIS;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - KingstAnalyzerSDK\inc;src;%(AdditionalIncludeDirectories) + KINGST_ANALYZER;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ThirdParty\KingstAnalyzerSDK\inc;src;%(AdditionalIncludeDirectories) + stdcpp17 Windows true Analyzer.lib;%(AdditionalDependencies) - KingstAnalyzerSDK\lib\Win64;%(AdditionalLibraryDirectories) + ThirdParty\KingstAnalyzerSDK\lib\Win64;%(AdditionalLibraryDirectories) copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\KingstVIS\Analyzer\$(TargetName).dll" - + + + + + Level3 + Disabled + KINGST_ANALYZER;WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ThirdParty\KingstAnalyzerSDK\inc;src;%(AdditionalIncludeDirectories) + stdcpp17 + + + Windows + true + Analyzer.lib;%(AdditionalDependencies) + ThirdParty\KingstAnalyzerSDK\lib\Win32;%(AdditionalLibraryDirectories) + + + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\KingstVIS\Analyzer\$(TargetName).dll" + + + + + + + Level3 + Disabled + KINGST_ANALYZER;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ThirdParty\KingstAnalyzerSDK\inc;src;%(AdditionalIncludeDirectories) + stdcpp17 + + + Windows + true + Analyzer.lib;%(AdditionalDependencies) + ThirdParty\KingstAnalyzerSDK\lib\Win64;%(AdditionalLibraryDirectories) + + + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\KingstVIS\Analyzer\$(TargetName).dll" + + + Level3 @@ -422,24 +649,26 @@ MaxSpeed true true - SALEAE=0;KINGSTVIS=1;SOFTWARE=SALEAE;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC2; - SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /external:I "$(ProjectDir)SaleaeAnalyzerSDK\include" + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC2; + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /external:I "$(ProjectDir)ThirdParty\SaleaeAnalyzerSDK\include" + + stdcpp17 Windows true true true - SaleaeAnalyzerSDK\lib_x86_64\Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x86 + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) + %(AdditionalOptions) /machine:x64 copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Logic\CustomAnalyzers\$(TargetName).dll" - + Level3 @@ -447,24 +676,27 @@ MaxSpeed true true - SALEAE=0;KINGSTVIS=1;SOFTWARE=SALEAE;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC1; - SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /external:I "$(ProjectDir)SaleaeAnalyzerSDK\include" + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC2; + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /external:I "$(ProjectDir)ThirdParty\SaleaeAnalyzerSDK\include" + + + stdcpp17 Windows true true true - SaleaeAnalyzerSDK\lib_x86_64\Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) - %(AdditionalOptions) /machine:x86 + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) + %(AdditionalOptions) /machine:x64 - copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Saleae Inc\Analyzers\$(TargetName).dll" + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Logic\CustomAnalyzers\$(TargetName).dll" - + Level3 @@ -472,22 +704,27 @@ MaxSpeed true true - SALEAE=1;KINGSTVIS=2;SOFTWARE_VER=KINGSTVIS;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - KingstAnalyzerSDK\inc;src;%(AdditionalIncludeDirectories) + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC2; + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /external:I "$(ProjectDir)ThirdParty\SaleaeAnalyzerSDK\include" + + + stdcpp17 Windows true true true - Analyzer.lib;%(AdditionalDependencies) - KingstAnalyzerSDK\lib\Win32;%(AdditionalLibraryDirectories) + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_arm64;%(AdditionalLibraryDirectories) + %(AdditionalOptions) /machine:x64 - copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\KingstVIS\Analyzer\$(TargetName).dll" + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Logic\CustomAnalyzers\$(TargetName).dll" - + Level3 @@ -495,25 +732,26 @@ MaxSpeed true true - SALEAE=0;KINGSTVIS=1;SOFTWARE=SALEAE;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC2; - SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /external:I "$(ProjectDir)SaleaeAnalyzerSDK\include" + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC1; + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /external:I "$(ProjectDir)ThirdParty\SaleaeAnalyzerSDK\include" + stdcpp17 Windows true true true - SaleaeAnalyzerSDK\lib_x86_64\Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) %(AdditionalOptions) /machine:x64 - copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Logic\CustomAnalyzers\$(TargetName).dll" + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Saleae Inc\Analyzers\$(TargetName).dll" - + Level3 @@ -521,18 +759,48 @@ MaxSpeed true true - SALEAE=0;KINGSTVIS=1;SOFTWARE=SALEAE;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC1; - SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) - %(AdditionalOptions) /external:I "$(ProjectDir)SaleaeAnalyzerSDK\include" - + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC1; + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /external:I "$(ProjectDir)ThirdParty\SaleaeAnalyzerSDK\include" + + + stdcpp17 + + + Windows + true + true + true + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) + %(AdditionalOptions) /machine:x64 + + + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\Saleae Inc\Analyzers\$(TargetName).dll" + + + + + Level3 + + + MaxSpeed + true + true + SALEAE_ANALYZER;%(PreprocessorDefinitions);WIN32;_WINDOWS;LOGIC1; + ThirdParty\SaleaeAnalyzerSDK\include;src;%(AdditionalIncludeDirectories) + %(AdditionalOptions) /external:I "$(ProjectDir)ThirdParty\SaleaeAnalyzerSDK\include" + + + stdcpp17 Windows true true true - SaleaeAnalyzerSDK\lib_x86_64\Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib - SaleaeAnalyzerSDK\lib_x86_64;%(AdditionalLibraryDirectories) + Analyzer.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib + ThirdParty\SaleaeAnalyzerSDK\lib_arm64;%(AdditionalLibraryDirectories) %(AdditionalOptions) /machine:x64 @@ -547,8 +815,57 @@ MaxSpeed true true - SALEAE=0;KINGSTVIS=1;SOFTWARE=KINGSTVIS;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - KingstAnalyzerSDK\inc;src;%(AdditionalIncludeDirectories) + KINGST_ANALYZER;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ThirdParty\KingstAnalyzerSDK\inc;src;%(AdditionalIncludeDirectories) + stdcpp17 + + + Windows + true + true + true + Analyzer.lib;%(AdditionalDependencies) + ThirdParty\KingstAnalyzerSDK\lib\Win64;%(AdditionalLibraryDirectories) + + + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\KingstVIS\Analyzer\$(TargetName).dll" + + + + + Level3 + + + MaxSpeed + true + true + KINGST_ANALYZER;WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ThirdParty\KingstAnalyzerSDK\inc;src;%(AdditionalIncludeDirectories) + stdcpp17 + + + Windows + true + true + true + Analyzer.lib;%(AdditionalDependencies) + ThirdParty\KingstAnalyzerSDK\lib\Win32;%(AdditionalLibraryDirectories) + + + copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\KingstVIS\Analyzer\$(TargetName).dll" + + + + + Level3 + + + MaxSpeed + true + true + KINGST_ANALYZER;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + ThirdParty\KingstAnalyzerSDK\inc;src;%(AdditionalIncludeDirectories) + stdcpp17 Windows @@ -556,7 +873,7 @@ true true Analyzer.lib;%(AdditionalDependencies) - KingstAnalyzerSDK\lib\Win64;%(AdditionalLibraryDirectories) + ThirdParty\KingstAnalyzerSDK\lib\Win64;%(AdditionalLibraryDirectories) copy /Y "$(TargetDir)$(TargetName).dll" "C:\Program Files\KingstVIS\Analyzer\$(TargetName).dll" diff --git a/README.md b/README.md index df748ba..c414bc9 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,22 @@ Analyzer for low level debugging of the QSPI Protocol, for use with Saleae and Kingst Logic Analyzers. -##### Features +## Supported Platforms + +| SDK | Windows x86 | Windows x64 | Windows arm64 | Linux x64 | Linux arm64 | Mac x64 | Mac arm64 | +|--------|-------------|-------------|---------------|-----------|-------------|---------|-----------| +| Saleae | – | ✓ | ⚠ | ⚠ | ⚠ | ⚠ | ⚠ | | +| Kingst | ⚠ | ✓ | – | ⚠ | – | ⚠ | – | + +*✓ Supported • ⚠ Not tested • – Not supported* + +## Features - Command, Address, Dummy and Data blocks. - Supports SIO, DIO, and QIO for Command, Address, and data. Dummy is SIO. - Endianess, CPOL/CPHA, CS Idle State, Extra CS Pre and Post cycles - All settings simulated. -##### Images +## Images
KingstVIS @@ -27,27 +36,26 @@ Analyzer for low level debugging of the QSPI Protocol, for use with Saleae and K
-##### Future Plans +##### Roadmap - Octal IO - Operation without chip select - DDR - ## Usage +#### Saleae Logic 1 & 2 +- Download and install [Saleae Logic 1][logic1] or [Saleae Logic 2][logic2] +- [Custom Analyzer Install Instructions][logictutorial] +- Add "QSPI" to Analyzer list +- Set the channels and settings to match your QSPI master device. +- Capture data from Logic Analyzer **or** press play without device connected to simulate data. + #### KingstVIS (Windows) - Download and install [Kingst Virtual Instruments Studio][king] - Place `QSpiAnalyzer.dll` into your `\KingstVIS\Analyzer` folder. *(Default C:\Program Files\KingstVIS\Analyzer\)* - Open KingstVIS and add "QSPI" to Analyzer list - Set the channels and settings to match your QSPI master device. -- Capture data from Logic Analyzer **or** press play without device connected, which will simulate data. - -#### Saleae Logic 1 & 2 -- Download and install [Saleae Logic 1][logic1] **or** Download and install [Saleae Logic 2][logic2] -- [Custom Analyzer Install Instructions][logictutorial] -- Add "QSPI" to Analyzer list -- Set the channels and settings to match your QSPI master device. - Capture data from Logic Analyzer **or** press play without device connected to simulate data. ## Building/Debugging @@ -79,23 +87,61 @@ The commands will manually copy the DLL to your analyzers folder, and start you **Note**: Logic 1 may throw an exception when debugger is auto-attached. If this happens, use _Debug->Start without debugging_ or _Ctrl+F5_. You may be able to attach the debugger after using _Debug->Attach To Process..._ or _Ctrl+Alt+P_. **Note2**: -For some reason yesterday I was only able to attach a debugger using _Attach To Process_, but now today even that isn't working. +Attach a debugger is not reliable, may only work when using _Attach To Process_, and that also has a possibility to fail. + +### Building with CMake (Wizard Script) -### Building with CMake: +> Untested on MacOS, please report any issues. -1) For Windows - simply open `Visual Studio`->`Continue Without Code`->`File`->`Open`->`CMake` and select the corresponding CMakeLists.txt from the project folder. Then just select the target configuration(Release or Debug x64) and build it. -2) For Linux, execute the following in the cloned repository folder -```shell +Run build.py, and it will guide you through selecting the SDK, platform, architecture, and build type automatically. + +``` bash +python build.py +``` +The wizard also supports invoking with arguments to skip prompts. Pass `--help` for more info. + +### Building with CMake (Visual Studio) +Open Visual Studio → Continue Without Code → File → Open → CMake → select CMakeLists.txt. +Then choose configuration (Debug/Release, x64) and build. + +### Building with CMake (Shell Commands) + +**Targeting an SDK**: +Use `-DTARGET_SDK=[saleae|kingst]` option when configuring CMake. +_Will default to saleae if not included._ + + +Example: + +1) Windows +``` bash +cmake -G "Visual Studio 18 2026" -A x64 -DTARGET_SDK=saleae .. +cmake --build . --config Release +``` + +2) Linux +``` bash +mkdir build && cd build +cmake -DTARGET_SDK=saleae -DCMAKE_BUILD_TYPE=Release .. +cmake --build . +``` + +3) macOS +``` bash mkdir build && cd build -cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release .. +cmake -DTARGET_SDK=saleae -DCMAKE_BUILD_TYPE=Release .. cmake --build . ``` -Then just copy `libQSPI_Analyzer.so` to the directory where you'd like to store Saleae plugins. -### Included Libraries +After building: +Copy the generated plugin to your analyzer’s plugin directory: + +**Windows**: QSPI_Analyzer.dll +**Linux**: libQSPI_Analyzer.so +**macOS**: libQSPI_Analyzer.dylib + +## SDKs -They are both almost identical, but unfortunately are not compatible. -The only difference I noticed at first glance was the "Analyzers SDK" uses the `Analyzer2` class. - [Analyzer SDK (Saleae)][asdk] - [Custom Protocol Analyzers SDK (Kingst)][kingsdk] @@ -115,4 +161,4 @@ The only difference I noticed at first glance was the "Analyzers SDK" uses the ` [logic1]:https://support.saleae.com/logic-software/legacy-software/older-software-releases#logic-1-x-download-links [logic2]:https://www.saleae.com/downloads/ [logictutorial]:https://support.saleae.com/faq/technical-faq/setting-up-developer-directory -[sampleanalyzer]:https://github.com/saleae/SampleAnalyzer/tree/master +[sampleanalyzer]:https://github.com/saleae/SampleAnalyzer/tree/master \ No newline at end of file diff --git a/build.py b/build.py new file mode 100644 index 0000000..772e1d7 --- /dev/null +++ b/build.py @@ -0,0 +1,433 @@ +import os +import subprocess +import sys +import argparse +from regex import Regex, RegexFlag + +NOTAPPLICABLE = "(Not Applicable)" +VS_PATTERN = r"((?:Visual Studio (?P\d{2}) (?P\d{4}))(?!\s\[arch\]))" # Excludes VS 2015 and lower +BASE_DIR = os.path.dirname(os.path.abspath(__file__)).replace('\\', '/') +distro = NOTAPPLICABLE +use_wsl = False + +def get_abs_build_path(relative): + if use_wsl: + drive, rest = BASE_DIR.split(":", 1) + drive = drive.lower() + base_dir = f"/mnt/{drive}{rest}" + else: + base_dir = BASE_DIR + + return os.path.join(base_dir, relative).replace('\\', '/') + +def ask(prompt, options): + while True: + try: + print(f"\n{prompt}") + for i, opt in enumerate(options): + print(f" {i + 1}) {opt}") + + if len(options) == 1: + print(f"\nAuto selected: {options[0]}") + return options[0] + + choice = int(input("> ")) - 1 + + if 0 <= choice < len(options): + return options[choice] + + print("Invalid selection.") + + except KeyboardInterrupt: + print("\nCancelled, exiting...") + raise SystemExit(1) + + except: + print("Invalid selection.") + +def pick(name, value, prompt, options): + if isinstance(options[0], str): + if value: + if value in options: + print(f"{prompt}: {value} (CLI)") + return value + raise Exception(f"Invalid {name}: {value}") + + return ask(prompt, options) + else: + values = [v for _, v in options] + + if value: + if value in values: + print(f"{prompt}: {value} (CLI)") + return value + raise Exception(f"Invalid {name}: {value}") + + choice = ask(prompt, [label for label, _ in options]) + return dict(options)[choice] + +def run(cmd, use_wsl=False, distro=None, cwd=None): + if use_wsl: + if not distro: + raise Exception("WSL distro not set") + + if cwd: + cwd = subprocess.check_output( + ["wsl", "wslpath", cwd], + text=True + ).strip() + + cmd = ["wsl", "-d", distro, "--cd", cwd] + cmd + else: + cmd = ["wsl", "-d", distro] + cmd + else: + if cwd: + subprocess.check_call(cmd, cwd=cwd) + return + + print("\n>>", " ".join(cmd)) + subprocess.check_call(cmd) + +# Check for Windows Subsystem for Linux +def check_wsl_installed(): + try: + return subprocess.run( + ["wsl", "-l", "-q"], + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL + ).returncode == 0 + except FileNotFoundError: + return False + +def get_wsl_distros(): + try: + result = subprocess.run( + ["wsl", "-l", "-q"], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=False + ) + + text = result.stdout.decode("utf-16-le", errors="ignore") + + return [ + line.strip() + for line in text.splitlines() + if line and not line.isspace() and not line == '\0' + ] + except FileNotFoundError: + return [] + except subprocess.CalledProcessError: + return [] + +def get_vs_generators(): + generators = [] + + result = subprocess.run( + ["cmake", "--help"], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + text=True + ) + + lines = result.stdout.splitlines() + regex = Regex(VS_PATTERN) + + for line in lines: + match = regex.search(line) + if match: + version = int(match.group(2)) + year = int(match.group(3)) + + full = match.group(1) + + generators.append({ + "full": full, + "version": version, + "year": year, + }) + + return generators + +# ----------------------------- +# OS detection +# ----------------------------- +if sys.platform.startswith("win"): + os_name = "win" +elif sys.platform.startswith("darwin"): + os_name = "mac" +else: + os_name = "linux" + +print(f"\nDetected OS: {os_name}") + +platform = os_name +has_wsl = os_name == "win" and check_wsl_installed() +distros = None if has_wsl is False else get_wsl_distros() +vs_generators = get_vs_generators() + +# ----------------------------- +# Arguments +# ----------------------------- +parser = argparse.ArgumentParser( + description= +"""QSPI CMake Build Wizard + +This tool configures (and optionally builds) the QSPI project using CMake. + +All arguments are optional. If a required option is not provided, the wizard +will interactively prompt for the missing values. + +Some options depend on others (for example SDK and architecture combinations). +Invalid combinations will be rejected during configuration. +""" +) + +build_group = parser.add_argument_group( + title="Build Options") + +build_group.add_argument( + '-s', "--sdk", + choices=['saleae', 'kingst'], + required=False, + help="Select the SDK to build against (Saleae or KingstVis)." +) + +build_group.add_argument( + '-a', "--arch", + choices=['x64', 'arm64', 'Win32'], + metavar="Saleae: {x64,arm64} | Kingst: {x64,Win32}", + required=False, + help="Target CPU architecture. " + "Saleae supports: x64, arm64. " + "KingstVis supports: x64, Win32." +) + +build_group.add_argument( + '-c', "--config", + choices=["Debug", "Release"] if os_name != "win" else ["Debug", "Release", "MinSizeRel", "RelWithDebInfo"], + required=False, + metavar="{Debug,Release} | Additional Windows: {MinSizeRel,RelWithDebInfo}", + help="Build configuration." + + ("" if os_name != "win" else " 'MinSizeRel' and 'RelWithDebInfo' are Windows only.") +) + +parser.add_argument( + '-S', "--skip", + action="store_true", + required=False, + help="Skip the final confirmation prompt before running configuration." + + ("" if os_name != "win" else " Skips Build prompt and uses value of '--build'.") +) + +win_group = parser.add_argument_group( + title="Windows Only") + +if os_name == "win": + win_group.add_argument( + '-B', "--build", + action="store_true", + required=False, + help="Automatically build the project after CMake configuration." + ) + + win_group.add_argument( + '-v', "--vs", + choices=[g['version'] for g in vs_generators], + required=False, + help="Visual Studio generator version to use for CMake." + ) + + # Used to set vs when options are not known. + # Selects newest installed VS version + win_group.add_argument( + "-vsi", "--vs-index", + type=int, + metavar=f"0-{len(vs_generators) - 1}", + required=False, + default=None, + help="Selects a Visual Studio generator by index. Warning: Will raise if used with --vs." + ) +else: + parser.add_argument('-B', '--build', required=False, help=argparse.SUPPRESS) + parser.add_argument('-v', '--vs', required=False, help=argparse.SUPPRESS) + parser.add_argument('-p', '--platform', required=False, help=argparse.SUPPRESS) + parser.add_argument('-u', '--distro', required=False, help=argparse.SUPPRESS) + parser.add_argument('-p', '--vs-index', required=False, help=argparse.SUPPRESS) + parser.add_argument('-u', '--distro-index', required=False, help=argparse.SUPPRESS) + +if has_wsl: + win_group.add_argument( + '-p', "--platform", + choices=['win', 'linux'], + required=False, + help="Target platform. Selecting 'linux' requires WSL with at least one installed distribution." + ) + win_group.add_argument( + '-u', "--distro", + choices=distros, + required=False, + help="WSL distribution to use when targeting Linux." + ) + + # Used to set distro when options are not known + # Selects first distro in the list + win_group.add_argument( + "-di", "--distro-index", + type=int, + metavar=f"0-{len(distros)-1}", + required=False, + default=None, + help="Selects a WSL linux distro by index. Warning: Will raise if used with --distro." + ) + + + +args = parser.parse_args() + + +# ----------------------------- +# Argument conversion +# ----------------------------- +# Convert argument option from version (18) to full string (Visual Studio 18 2026) +if args.vs is not None: + if args.vs_index is not None: + raise argparse.ArgumentError("Both --vs and --vs-index were set") + args.vs = next( + (g for g in vs_generators if g["version"] == args.vs), + None + )["full"] + +# Set vs value from index +if args.vs_index is not None: + args.vs = vs_generators[args.vs_index]["full"] + +# Set distro from index +if args.distro_index is not None: + if args.distro is not None: + raise argparse.ArgumentError("Both --distro and --distro-index were set") + if len(distros) != 0: + args.distro = distros[args.distro_index] + +# ----------------------------- +# Target Platform +# ----------------------------- +if has_wsl: + platforms = [ + ("Windows", "win"), + ("Linux (WSL)", "linux"), + ] + if pick("--platform", args.platform, "Select platform:", platforms) == "linux": + use_wsl = True + platform = "linux" + if len(distros) == 0: + print(f"Error: No available linux distros. Exiting...", file=sys.stderr) + distro = pick("--distro", args.distro, "Select a linux distrobution:", distros) + +# ----------------------------- +# Select SDK +# ----------------------------- +sdk = pick("--sdk", args.sdk, "Select analyzer SDK:", ["saleae", "kingst"]) + +# ----------------------------- +# Select architecture +# ----------------------------- +arches = ["x64"] + +if sdk == "saleae": + arches.append("arm64") + +if sdk == "kingst" and platform == "win": + print(platform) + arches.append("Win32") + +arch = pick("--arch", args.arch, "Select architecture:", arches) + +# ----------------------------- +# Select build configuration +# ----------------------------- +build_config = pick("--config", args.config, "Select build configuration:", ["Debug", "Release"] if platform != "win" else ["Debug", "Release", "MinSizeRel", "RelWithDebInfo"] ) + +# ----------------------------- +# Build directory +# ----------------------------- +build_dir = get_abs_build_path(f"build/{sdk}_{platform}_{arch}") + +if platform != "win": + build_dir += '_' + build_config.lower() + +# ----------------------------- +# CMake command +# ----------------------------- +cmake_cmd = [ + "cmake", + "-S", ".", + "-B", build_dir, + f"-DTARGET_SDK={sdk}", +] + +# ----------------------------- +# Windows generator +# ----------------------------- +if platform == "win": + + vs = pick("--vs", args.vs, "Select Visual Studio generator:", [g['full'] for g in vs_generators]) + + cmake_cmd.extend([ + "-G", vs, + "-A", arch + ]) + +else: + vs = NOTAPPLICABLE + cmake_cmd.append(f"-DCMAKE_BUILD_TYPE={build_config}") + +# ----------------------------- +# macOS arch +# ----------------------------- +if platform == "mac": + cmake_cmd.append(f"-DCMAKE_OSX_ARCHITECTURES={arch}") + +# ----------------------------- +# Confirmation +# ----------------------------- +print("\nConfirm Selected Options:") +print(f""" + SDK: {sdk} + Arch: {arch} + Platform: {platform} + Configuration: {build_config} + WSL Distro: {distro} + Visual Studio: {vs} + Build Directory: {build_dir} +""") + +if args.skip is False: + if ask("Continue?", ["yes", "no"]) == "no": + print("Cancelled, exiting...") + exit(0) + +# ----------------------------- +# Configure +# ----------------------------- +print("\nConfiguring...") +run(cmake_cmd, use_wsl=use_wsl, distro=distro) + +print("\nConfiguration complete!") + +# ----------------------------- +# Build? +# ----------------------------- +do_build = (platform != "win" or args.build is True if args.skip is True else + pick("--build", args.build, "Build project?", ["yes", "no"]) == "yes") + +if do_build: + build_cmd = ["cmake", "--build", build_dir] + + if platform == "win": + build_cmd += ["--config", build_config] + + print("\nBuilding...") + run(build_cmd, use_wsl=use_wsl, distro=distro) + + print("\nBuild complete!") \ No newline at end of file diff --git a/cmake/Kingst.cmake b/cmake/Kingst.cmake new file mode 100644 index 0000000..8ae1e7f --- /dev/null +++ b/cmake/Kingst.cmake @@ -0,0 +1,12 @@ +target_compile_definitions(QSPI_Analyzer + PRIVATE + KINGST_ANALYZER +) + +set(AnalyzerSDK_DIR "${CMAKE_SOURCE_DIR}/thirdparty/KingstAnalyzerSDK") + +message(STATUS "Targeting Kingst SDK: ${AnalyzerSDK_DIR}") + +find_package(AnalyzerSDK CONFIG REQUIRED) + +target_link_libraries(QSPI_Analyzer PUBLIC Kingst::AnalyzerSDK) \ No newline at end of file diff --git a/cmake/Saleae.cmake b/cmake/Saleae.cmake new file mode 100644 index 0000000..894590b --- /dev/null +++ b/cmake/Saleae.cmake @@ -0,0 +1,19 @@ +target_compile_definitions(QSPI_Analyzer + PRIVATE + SALEAE_ANALYZER +) + +set(AnalyzerSDK_DIR "${CMAKE_SOURCE_DIR}/thirdparty/SaleaeAnalyzerSDK") + +message(STATUS "Targeting Saleae SDK: ${AnalyzerSDK_DIR}") + +# SDK uses SYSTEM_PROCESSOR to detect arch +# For windows they expect 'ARM64', +# when 'arm64' is what it actually is. +if(CMAKE_GENERATOR_PLATFORM STREQUAL "arm64") + set(CMAKE_SYSTEM_PROCESSOR "ARM64") +endif() + +find_package(AnalyzerSDK CONFIG REQUIRED) + +target_link_libraries(QSPI_Analyzer PUBLIC Saleae::AnalyzerSDK) \ No newline at end of file diff --git a/scripts/build_all.cmd b/scripts/build_all.cmd new file mode 100644 index 0000000..e10a8eb --- /dev/null +++ b/scripts/build_all.cmd @@ -0,0 +1,7 @@ +@echo off + +call build_saleae.cmd +if errorlevel 1 exit /b 1 + +call build_kingst.cmd +if errorlevel 1 exit /b 1 \ No newline at end of file diff --git a/scripts/build_all.sh b/scripts/build_all.sh new file mode 100644 index 0000000..2ba1dd2 --- /dev/null +++ b/scripts/build_all.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -e + +cd .. + +echo "\nBuilding Saleae x64" +python build.py -s saleae -a x64 -c Release --skip --build + +echo "\nBuilding Saleae arm64" +python build.py -s saleae -a arm64 -c Release --skip --build + +echo "\nBuilding kingst x64" +python build.py -s kingst -a x64 -c Release --skip --build \ No newline at end of file diff --git a/scripts/build_kingst.cmd b/scripts/build_kingst.cmd new file mode 100644 index 0000000..60d175e --- /dev/null +++ b/scripts/build_kingst.cmd @@ -0,0 +1,14 @@ +@echo off + +pushd .. + +echo "\nBuilding Kingst win-x64" +python build.py -p win -a x64 -s kingst -c Release --vs-index 0 --skip --build + +echo "\nBuilding Kingst Win32" +python build.py -p win -a Win32 -s kingst -p win -c Release --vs-index 0 --skip --build + +echo "\nBuilding Kingst linux-x64" +python build.py -p linux -a x64 -s kingst -c Release --distro-index 0 --skip --build + +popd \ No newline at end of file diff --git a/scripts/build_kingst.sh b/scripts/build_kingst.sh new file mode 100644 index 0000000..a32df96 --- /dev/null +++ b/scripts/build_kingst.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e + +cd .. + +echo "\nBuilding kingst x64" +python build.py -s kingst -a x64 -c Release --skip --build \ No newline at end of file diff --git a/scripts/build_saleae.cmd b/scripts/build_saleae.cmd new file mode 100644 index 0000000..9aa7eec --- /dev/null +++ b/scripts/build_saleae.cmd @@ -0,0 +1,17 @@ +@echo off + +pushd .. + +echo "\nBuilding Saleae win-x64" +python build.py -a x64 -p win -s saleae -c Release --vs-index 0 --skip --build + +echo "\nBuilding Saleae win-arm64" +python build.py -a arm64 -p win -s saleae -c Release --vs-index 0 --skip --build + +echo "\nBuilding Saleae linux-x64" +python build.py -a x64 -p linux -s saleae -c Release --distro-index 0 --skip --build + +echo "\nBuilding Saleae linux-arm64" +python build.py -a arm64 -p linux -s saleae -c Release --distro-index 0 --skip --build + +popd \ No newline at end of file diff --git a/scripts/build_saleae.sh b/scripts/build_saleae.sh new file mode 100644 index 0000000..a298a24 --- /dev/null +++ b/scripts/build_saleae.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +set -e + +cd .. + +echo "\nBuilding Saleae x64" +python build.py -s saleae -a x64 -c Release --skip --build + +echo "\nBuilding Saleae arm64" +python build.py -s saleae -a arm64 -c Release --skip --build \ No newline at end of file diff --git a/scripts/package_binaries.py b/scripts/package_binaries.py new file mode 100644 index 0000000..9860b40 --- /dev/null +++ b/scripts/package_binaries.py @@ -0,0 +1,199 @@ +import os +import sys +import zipfile +import argparse +import hashlib +import json +from pathlib import Path + + +# ---------------------------- +# CLI +# ---------------------------- +parser = argparse.ArgumentParser( + description=""" +Packages QSPI Analyzer Release binaries into ZIP files. +Expected format: {sdk}_{platform}_{arch}_{config} +(Windows omits config) +""" +) + +parser.add_argument("--output", type=Path, required=False) +parser.add_argument("--version", required=True) + +args = parser.parse_args() + + +# ---------------------------- +# Build model +# ---------------------------- +class BuildFolder: + VALID_SDKS = {"saleae", "kingst"} + VALID_PLATFORMS = {"win", "linux", "mac"} + VALID_ARCHES = {"x64", "arm64", "Win32"} + + def __init__(self, path: Path, sdk, platform, arch, config): + self.path = path + self.sdk = self._validate("SDK", sdk, self.VALID_SDKS) + self.platform = self._validate("platform", platform, self.VALID_PLATFORMS) + self.arch = self._validate("arch", arch, self.VALID_ARCHES) + self.config = config + + @staticmethod + def _validate(name, value, valid_set): + if value not in valid_set: + raise RuntimeError(f"Invalid {name}: {value}") + return value + + def filename(self, version): + return f"QSPI_Analyzer_{self.sdk}_{self.platform}_{self.arch}_{version}.zip" + + +# ---------------------------- +# Helpers +# ---------------------------- +def get_binary(folder: BuildFolder) -> Path: + if folder.platform == "win": + return folder.path / "Release" / "QSPI_Analyzer.dll" + if folder.platform == "linux": + return folder.path / "QSPI_Analyzer.so" + if folder.platform == "mac": + return folder.path / "QSPI_Analyzer.dylib" + raise RuntimeError(f"Unknown platform: {folder.platform}") + + +def parse_folder(path: Path): + try: + parts = path.name.split("_") + if len(parts) not in (3, 4): + return None + + sdk, platform, arch = parts[:3] + config = parts[3] if len(parts) == 4 else None + + return BuildFolder(path, sdk, platform, arch, config) + except Exception: + return None + + +def zip_binary(file: Path, output_zip: Path): + with zipfile.ZipFile(output_zip, "w", zipfile.ZIP_DEFLATED) as z: + z.write(file, arcname=file.name) + + +def hash_file(path: Path, chunk_size=1024 * 1024): + h = hashlib.sha256() + with open(path, "rb") as f: + while chunk := f.read(chunk_size): + h.update(chunk) + return h.hexdigest() + + +# ---------------------------- +# Paths +# ---------------------------- +build_dir = Path(__file__).resolve().parents[1] / "build" +output_dir = args.output or build_dir +output_dir = output_dir if output_dir.is_absolute() else build_dir / output_dir + +json_path = output_dir / "binary_hashes.json" + + +# ---------------------------- +# Load cache +# ---------------------------- +hash_db = {} +if json_path.exists(): + hash_db = json.loads(json_path.read_text()) + + +# ---------------------------- +# Validation +# ---------------------------- +if not build_dir.exists(): + raise RuntimeError(f"Build directory missing: {build_dir}") + +if not output_dir.exists(): + raise RuntimeError(f"Output directory missing: {output_dir}") + + +# ---------------------------- +# Stats +# ---------------------------- +success = 0 +skipped = 0 +failed = [] +skip_reasons = [] + + +def skip(msg): + global skipped + print(f"\nSkipping: {msg}") + skipped += 1 + + +# ---------------------------- +# Main loop +# ---------------------------- +for d in build_dir.iterdir(): + if not d.is_dir(): + continue + + print(f"\nParsing: {d.name}") + + build = parse_folder(d) + if not build: + skip("Unrecognized directory") + continue + + if build.platform != "win" and build.config != "release": + skip(f"Non-release config: {build.config}") + continue + + binary = get_binary(build) + + if not binary.exists(): + failed.append(binary) + skip(f"Missing binary: {binary.name}") + continue + + zip_name = build.filename(args.version) + zip_path = output_dir / zip_name + + file_hash = hash_file(binary) + + if zip_path.exists() and hash_db.get(zip_name) == file_hash: + skip("Already packaged (hash match)") + continue + + try: + zip_binary(binary, zip_path) + hash_db[zip_name] = file_hash + success += 1 + print(f"Packaged: {zip_path}") + except Exception as ex: + failed.append(binary) + print(f"ZIP failed: {ex}", file=sys.stderr) + + +# ---------------------------- +# Save hash DB once +# ---------------------------- +try: + output_dir.mkdir(parents=True, exist_ok=True) + json_path.write_text(json.dumps(hash_db, indent=2)) +except Exception as ex: + print(f"Failed writing hash DB: {ex}", file=sys.stderr) + + +# ---------------------------- +# Summary +# ---------------------------- +print( + f"\nDone: {success} success, {skipped} skipped, {len(failed)} failed" +) + +if failed: + print("\nFailed or Missing Binaries:") + for f in failed: + print(f" - {f}") \ No newline at end of file diff --git a/src/QSpiAnalyzer.h b/src/QSpiAnalyzer.h index aec4b7d..b2cd8eb 100644 --- a/src/QSpiAnalyzer.h +++ b/src/QSpiAnalyzer.h @@ -1,12 +1,12 @@ #ifndef QSPI_ANALYZER_H #define QSPI_ANALYZER_H -#if SOFTWARE == SALEAE +#if SALEAE_ANALYZER #define ANALYZER_VERSION Analyzer2 -#elif SOFTWARE == KINGSTVIS +#elif defined(KINGST_ANALYZER) #define ANALYZER_VERSION Analyzer #else -#error Not supported or undefined +#error Missing preprocessor definitions #endif #include diff --git a/src/QSpiAnalyzerResults.cpp b/src/QSpiAnalyzerResults.cpp index 92b2923..9e73170 100644 --- a/src/QSpiAnalyzerResults.cpp +++ b/src/QSpiAnalyzerResults.cpp @@ -64,7 +64,8 @@ void QSpiAnalyzerResults::GenerateBubbleText(U64 frame_index, Channel &channel, break; } - AddResultString(result_str); + if (result_str[0] != '\0') + AddResultString(result_str); } } } else { @@ -104,8 +105,13 @@ void QSpiAnalyzerResults::GenerateExportFile(const char *file, DisplayBase displ U32 bit_count = GetStateBitCount(mSettings, transaction_state); U32 clock_count = GetStateClockCount(mSettings, transaction_state, data_lines); - if (frame.mType == QSpiTypes::DUMMY_STATE){ - strncpy(data_str, "Dummy", sizeof(data_str)); + if (frame.mType == QSpiTypes::DUMMY_STATE) { +#if WIN32 + strncpy_s(data_str, "Dummy", sizeof(data_str)); +#else + snprintf(data_str, sizeof(data_str), "%s", "Dummy"); +#endif + } else{ AnalyzerHelpers::GetNumberString(frame.mData1, display_base, bit_count, data_str, sizeof(data_str)); diff --git a/thirdparty/KingstAnalyzerSDK/AnalyzerSDKConfig.cmake b/thirdparty/KingstAnalyzerSDK/AnalyzerSDKConfig.cmake new file mode 100644 index 0000000..caf7faf --- /dev/null +++ b/thirdparty/KingstAnalyzerSDK/AnalyzerSDKConfig.cmake @@ -0,0 +1,65 @@ +# Notice: This file is not included with the Kingst AnalyzerSDK. +# Do not delete if upgrading to a newer SDK version. + +add_library(Kingst::AnalyzerSDK SHARED IMPORTED) + +set_target_properties(Kingst::AnalyzerSDK PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/inc +) + +# ----------------------------- +# macOS +# ----------------------------- +if(APPLE) + + if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") + message(FATAL_ERROR "Kingst SDK on macOS only supports x86_64") + endif() + + set_target_properties(Kingst::AnalyzerSDK PROPERTIES + IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/lib/Mac/libAnalyzer.dylib + ) + +# ----------------------------- +# Windows +# ----------------------------- +elseif(WIN32) + if(CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") + message(FATAL_ERROR "Kingst SDK does not support Windows ARM64") + + elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "Win32") + set(LIB_DIR "lib/Win32") + + elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "x64" OR + CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64|x86_64") + set(LIB_DIR "lib/Win64") + + else() + message(FATAL_ERROR "Unsupported Windows architecture: ${CMAKE_GENERATOR_PLATFORM}") + endif() + + set_target_properties(Kingst::AnalyzerSDK PROPERTIES + IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/${LIB_DIR}/Analyzer.dll + IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/${LIB_DIR}/Analyzer.lib + ) + +# ----------------------------- +# Linux +# ----------------------------- +elseif(UNIX) + + if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") + message(FATAL_ERROR "Kingst SDK on Linux only supports x86_64") + endif() + + set_target_properties(Kingst::AnalyzerSDK PROPERTIES + IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/lib/Linux/libAnalyzer.so + IMPORTED_SONAME libAnalyzer.so + ) + +# ----------------------------- +# Unsupported platform +# ----------------------------- +else() + message(FATAL_ERROR "Unsupported platform for Kingst SDK") +endif() \ No newline at end of file diff --git a/KingstAnalyzerSDK/Linux/makefile b/thirdparty/KingstAnalyzerSDK/Linux/makefile similarity index 100% rename from KingstAnalyzerSDK/Linux/makefile rename to thirdparty/KingstAnalyzerSDK/Linux/makefile diff --git a/KingstAnalyzerSDK/Mac/makefile b/thirdparty/KingstAnalyzerSDK/Mac/makefile similarity index 100% rename from KingstAnalyzerSDK/Mac/makefile rename to thirdparty/KingstAnalyzerSDK/Mac/makefile diff --git a/KingstAnalyzerSDK/inc/Analyzer.h b/thirdparty/KingstAnalyzerSDK/inc/Analyzer.h similarity index 100% rename from KingstAnalyzerSDK/inc/Analyzer.h rename to thirdparty/KingstAnalyzerSDK/inc/Analyzer.h diff --git a/KingstAnalyzerSDK/inc/AnalyzerChannelData.h b/thirdparty/KingstAnalyzerSDK/inc/AnalyzerChannelData.h similarity index 100% rename from KingstAnalyzerSDK/inc/AnalyzerChannelData.h rename to thirdparty/KingstAnalyzerSDK/inc/AnalyzerChannelData.h diff --git a/KingstAnalyzerSDK/inc/AnalyzerHelpers.h b/thirdparty/KingstAnalyzerSDK/inc/AnalyzerHelpers.h similarity index 100% rename from KingstAnalyzerSDK/inc/AnalyzerHelpers.h rename to thirdparty/KingstAnalyzerSDK/inc/AnalyzerHelpers.h diff --git a/KingstAnalyzerSDK/inc/AnalyzerResults.h b/thirdparty/KingstAnalyzerSDK/inc/AnalyzerResults.h similarity index 100% rename from KingstAnalyzerSDK/inc/AnalyzerResults.h rename to thirdparty/KingstAnalyzerSDK/inc/AnalyzerResults.h diff --git a/KingstAnalyzerSDK/inc/AnalyzerSettingInterface.h b/thirdparty/KingstAnalyzerSDK/inc/AnalyzerSettingInterface.h similarity index 100% rename from KingstAnalyzerSDK/inc/AnalyzerSettingInterface.h rename to thirdparty/KingstAnalyzerSDK/inc/AnalyzerSettingInterface.h diff --git a/KingstAnalyzerSDK/inc/AnalyzerSettings.h b/thirdparty/KingstAnalyzerSDK/inc/AnalyzerSettings.h similarity index 100% rename from KingstAnalyzerSDK/inc/AnalyzerSettings.h rename to thirdparty/KingstAnalyzerSDK/inc/AnalyzerSettings.h diff --git a/KingstAnalyzerSDK/inc/AnalyzerTypes.h b/thirdparty/KingstAnalyzerSDK/inc/AnalyzerTypes.h similarity index 100% rename from KingstAnalyzerSDK/inc/AnalyzerTypes.h rename to thirdparty/KingstAnalyzerSDK/inc/AnalyzerTypes.h diff --git a/KingstAnalyzerSDK/inc/LogicPublicTypes.h b/thirdparty/KingstAnalyzerSDK/inc/LogicPublicTypes.h similarity index 100% rename from KingstAnalyzerSDK/inc/LogicPublicTypes.h rename to thirdparty/KingstAnalyzerSDK/inc/LogicPublicTypes.h diff --git a/KingstAnalyzerSDK/inc/SimulationChannelDescriptor.h b/thirdparty/KingstAnalyzerSDK/inc/SimulationChannelDescriptor.h similarity index 100% rename from KingstAnalyzerSDK/inc/SimulationChannelDescriptor.h rename to thirdparty/KingstAnalyzerSDK/inc/SimulationChannelDescriptor.h diff --git a/KingstAnalyzerSDK/lib/Linux/libAnalyzer.so b/thirdparty/KingstAnalyzerSDK/lib/Linux/libAnalyzer.so similarity index 100% rename from KingstAnalyzerSDK/lib/Linux/libAnalyzer.so rename to thirdparty/KingstAnalyzerSDK/lib/Linux/libAnalyzer.so diff --git a/KingstAnalyzerSDK/lib/Mac/libAnalyzer.dylib b/thirdparty/KingstAnalyzerSDK/lib/Mac/libAnalyzer.dylib similarity index 100% rename from KingstAnalyzerSDK/lib/Mac/libAnalyzer.dylib rename to thirdparty/KingstAnalyzerSDK/lib/Mac/libAnalyzer.dylib From 306eed489d445f507ab21634c57b2e92f5aa280d Mon Sep 17 00:00:00 2001 From: Addio <59629419+AddioElectronics@users.noreply.github.com> Date: Fri, 15 May 2026 05:59:19 -0700 Subject: [PATCH 2/5] Add sdk/architecture matrix to macOS build workflow --- .github/workflows/macOS-Build-Manual.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macOS-Build-Manual.yml b/.github/workflows/macOS-Build-Manual.yml index b671ac1..2cc7aa3 100644 --- a/.github/workflows/macOS-Build-Manual.yml +++ b/.github/workflows/macOS-Build-Manual.yml @@ -1,4 +1,4 @@ -name: macOS Build (Manual) +name: MacOS Build (Manual) on: workflow_dispatch: @@ -12,6 +12,15 @@ jobs: build-macos: runs-on: macos-latest + strategy: + matrix: + sdk: [saleae, kingst] + arch: [arm64, x86_64] + + exclude: + - sdk: kingst + arch: arm64 + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -22,7 +31,8 @@ jobs: run: | cmake -B build \ -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \ - -DCMAKE_OSX_ARCHITECTURES=arm64 + -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \ + -DTARGET_SDK=${{matrix.sdk}} - name: Build run: cmake --build build @@ -33,5 +43,5 @@ jobs: - name: Upload artifact uses: actions/upload-artifact@v4 with: - name: macos-${{ inputs.build_type }} + name: macos-${{ matrix.sdk }}-${{ matrix.arch }}-${{ inputs.build_type }} path: build/*.dylib From f15245db02fc724d8c1bcfd33f1a4acb9132c74d Mon Sep 17 00:00:00 2001 From: Addio <59629419+AddioElectronics@users.noreply.github.com> Date: Fri, 15 May 2026 06:14:10 -0700 Subject: [PATCH 3/5] Fix stale submodule path reference after history reset --- SaleaeAnalyzerSDK | 1 - thirdparty/SaleaeAnalyzerSDK | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 160000 SaleaeAnalyzerSDK create mode 160000 thirdparty/SaleaeAnalyzerSDK diff --git a/SaleaeAnalyzerSDK b/SaleaeAnalyzerSDK deleted file mode 160000 index 114a3b8..0000000 --- a/SaleaeAnalyzerSDK +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 114a3b8306e6a5008453546eda003db15b002027 diff --git a/thirdparty/SaleaeAnalyzerSDK b/thirdparty/SaleaeAnalyzerSDK new file mode 160000 index 0000000..e3c4b4f --- /dev/null +++ b/thirdparty/SaleaeAnalyzerSDK @@ -0,0 +1 @@ +Subproject commit e3c4b4ffda1c162c024a5913520aed17c6edb238 From 3d5221d385f7c9d75477dca3db2cb2eee4bd4648 Mon Sep 17 00:00:00 2001 From: Addio <59629419+AddioElectronics@users.noreply.github.com> Date: Fri, 15 May 2026 07:24:03 -0700 Subject: [PATCH 4/5] Changed Kingst AnalyzerSDKConfig.cmake to check CMAKE_OSX_ARCHITECTURES on mac. --- cmake/Saleae.cmake | 4 ++-- thirdparty/KingstAnalyzerSDK/AnalyzerSDKConfig.cmake | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/cmake/Saleae.cmake b/cmake/Saleae.cmake index 894590b..d56b346 100644 --- a/cmake/Saleae.cmake +++ b/cmake/Saleae.cmake @@ -9,8 +9,8 @@ message(STATUS "Targeting Saleae SDK: ${AnalyzerSDK_DIR}") # SDK uses SYSTEM_PROCESSOR to detect arch # For windows they expect 'ARM64', -# when 'arm64' is what it actually is. -if(CMAKE_GENERATOR_PLATFORM STREQUAL "arm64") +# when 'arm64' is what -A requires +if(WIN32 AND CMAKE_GENERATOR_PLATFORM STREQUAL "arm64") set(CMAKE_SYSTEM_PROCESSOR "ARM64") endif() diff --git a/thirdparty/KingstAnalyzerSDK/AnalyzerSDKConfig.cmake b/thirdparty/KingstAnalyzerSDK/AnalyzerSDKConfig.cmake index caf7faf..8bce3ef 100644 --- a/thirdparty/KingstAnalyzerSDK/AnalyzerSDKConfig.cmake +++ b/thirdparty/KingstAnalyzerSDK/AnalyzerSDKConfig.cmake @@ -12,7 +12,7 @@ set_target_properties(Kingst::AnalyzerSDK PROPERTIES # ----------------------------- if(APPLE) - if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") + if(NOT CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64") message(FATAL_ERROR "Kingst SDK on macOS only supports x86_64") endif() @@ -24,14 +24,11 @@ if(APPLE) # Windows # ----------------------------- elseif(WIN32) - if(CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64") - message(FATAL_ERROR "Kingst SDK does not support Windows ARM64") - elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "Win32") + if(CMAKE_GENERATOR_PLATFORM STREQUAL "Win32") set(LIB_DIR "lib/Win32") - elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "x64" OR - CMAKE_SYSTEM_PROCESSOR MATCHES "AMD64|x86_64") + elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "x64") set(LIB_DIR "lib/Win64") else() @@ -46,7 +43,7 @@ elseif(WIN32) # ----------------------------- # Linux # ----------------------------- -elseif(UNIX) +elseif(UNIX AND NOT APPLE) if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") message(FATAL_ERROR "Kingst SDK on Linux only supports x86_64") From fbc64f712d9abac7c35b6614408971f6739444eb Mon Sep 17 00:00:00 2001 From: Addio <59629419+AddioElectronics@users.noreply.github.com> Date: Fri, 15 May 2026 10:04:44 -0700 Subject: [PATCH 5/5] Added linux toolchain cmake files for cross compiling --- build.py | 118 +++++++++++++++++++++++------ cmake/toolchains/linux-arm64.cmake | 12 +++ cmake/toolchains/linux-x64.cmake | 10 +++ scripts/start_wsl.cmd | 3 + 4 files changed, 118 insertions(+), 25 deletions(-) create mode 100644 cmake/toolchains/linux-arm64.cmake create mode 100644 cmake/toolchains/linux-x64.cmake create mode 100644 scripts/start_wsl.cmd diff --git a/build.py b/build.py index 772e1d7..9a8be47 100644 --- a/build.py +++ b/build.py @@ -1,4 +1,5 @@ import os +import platform as Platform import subprocess import sys import argparse @@ -149,6 +150,16 @@ def get_vs_generators(): return generators +def remap_arch(arch): + if arch == "AMD64" or arch == "x86_64": + return "x64" + elif arch == "aarch64" or arch == "ARM64": + return "arm64" + return arch + +def get_native_arch(): + return remap_arch(Platform.machine()) + # ----------------------------- # OS detection # ----------------------------- @@ -195,8 +206,8 @@ def get_vs_generators(): build_group.add_argument( '-a', "--arch", - choices=['x64', 'arm64', 'Win32'], - metavar="Saleae: {x64,arm64} | Kingst: {x64,Win32}", + choices=['native', 'x64', 'arm64', 'Win32'], + metavar="{native} | Saleae: {x64,arm64} | Kingst: {x64,Win32}", required=False, help="Target CPU architecture. " "Saleae supports: x64, arm64. " @@ -233,6 +244,7 @@ def get_vs_generators(): win_group.add_argument( '-v', "--vs", + type=int, choices=[g['version'] for g in vs_generators], required=False, help="Visual Studio generator version to use for CMake." @@ -253,8 +265,8 @@ def get_vs_generators(): parser.add_argument('-v', '--vs', required=False, help=argparse.SUPPRESS) parser.add_argument('-p', '--platform', required=False, help=argparse.SUPPRESS) parser.add_argument('-u', '--distro', required=False, help=argparse.SUPPRESS) - parser.add_argument('-p', '--vs-index', required=False, help=argparse.SUPPRESS) - parser.add_argument('-u', '--distro-index', required=False, help=argparse.SUPPRESS) + parser.add_argument('-vsi', '--vs-index', required=False, help=argparse.SUPPRESS) + parser.add_argument('-di', '--distro-index', required=False, help=argparse.SUPPRESS) if has_wsl: win_group.add_argument( @@ -281,6 +293,15 @@ def get_vs_generators(): help="Selects a WSL linux distro by index. Warning: Will raise if used with --distro." ) +cmake_group = parser.add_argument_group( + title="CMAKE") + +cmake_group.add_argument( + "--verbose", + required=False, + action="store_true", + help="Call CMAKE with --verbose" +) args = parser.parse_args() @@ -289,25 +310,26 @@ def get_vs_generators(): # ----------------------------- # Argument conversion # ----------------------------- -# Convert argument option from version (18) to full string (Visual Studio 18 2026) -if args.vs is not None: +if os_name == "win": + # Convert argument option from version (18) to full string (Visual Studio 18 2026) + if args.vs is not None: + if args.vs_index is not None: + raise argparse.ArgumentError("Both --vs and --vs-index were set") + args.vs = next( + (g for g in vs_generators if g["version"] == args.vs), + None + )["full"] + + # Set vs value from index if args.vs_index is not None: - raise argparse.ArgumentError("Both --vs and --vs-index were set") - args.vs = next( - (g for g in vs_generators if g["version"] == args.vs), - None - )["full"] - -# Set vs value from index -if args.vs_index is not None: - args.vs = vs_generators[args.vs_index]["full"] - -# Set distro from index -if args.distro_index is not None: - if args.distro is not None: - raise argparse.ArgumentError("Both --distro and --distro-index were set") - if len(distros) != 0: - args.distro = distros[args.distro_index] + args.vs = vs_generators[args.vs_index]["full"] + + # Set distro from index + if args.distro_index is not None: + if args.distro is not None: + raise argparse.ArgumentError("Both --distro and --distro-index were set") + if len(distros) != 0: + args.distro = distros[args.distro_index] # ----------------------------- # Target Platform @@ -332,16 +354,29 @@ def get_vs_generators(): # ----------------------------- # Select architecture # ----------------------------- -arches = ["x64"] +arches = ["native", "x64"] if sdk == "saleae": arches.append("arm64") if sdk == "kingst" and platform == "win": - print(platform) arches.append("Win32") arch = pick("--arch", args.arch, "Select architecture:", arches) +use_native_arch = arch == "native" +native_arch = get_native_arch() + +if arch == "native": + if native_arch != arch: + arch = native_arch + + if not native_arch in arches: + supported_arches = [a for a in arches if a != "native"] + raise RuntimeError(f"Native architecture {native_arch} not supported: {supported_arches}") + +# Stop cross toolchain from being used +use_native_arch = arch == native_arch + # ----------------------------- # Select build configuration @@ -387,6 +422,32 @@ def get_vs_generators(): # ----------------------------- if platform == "mac": cmake_cmd.append(f"-DCMAKE_OSX_ARCHITECTURES={arch}") + +# ----------------------------- +# Linux arch +# ----------------------------- +if not use_native_arch and platform == "linux": + + toolchain = f"cmake/toolchains/linux-{arch}.cmake" + toolchain_path = os.path.join(BASE_DIR, toolchain).replace('\\', '/') + + if not os.path.exists(toolchain_path): + raise RuntimeError(f"No toolchain not found for architecture: {toolchain}") + + # WSL path handling note: + # - Running directly inside WSL works fine with relative paths. + # - Windows → WSL invocation can break relative paths depending on working directory. + # - Absolute Windows paths are not valid in WSL context. + # + # Therefore: + # - Use absolute WSL-resolved paths when launched from Windows. + # - Use relative paths when running natively in WSL. + if use_wsl: + toolchain_path = get_abs_build_path(toolchain) + + cmake_cmd.append(f"-DCMAKE_TOOLCHAIN_FILE={toolchain_path}") +else: + toolchain = NOTAPPLICABLE # ----------------------------- # Confirmation @@ -395,11 +456,13 @@ def get_vs_generators(): print(f""" SDK: {sdk} Arch: {arch} + Use Native Arch: {use_native_arch} Platform: {platform} Configuration: {build_config} WSL Distro: {distro} Visual Studio: {vs} Build Directory: {build_dir} + Toolchain: {toolchain} """) if args.skip is False: @@ -411,6 +474,7 @@ def get_vs_generators(): # Configure # ----------------------------- print("\nConfiguring...") + run(cmake_cmd, use_wsl=use_wsl, distro=distro) print("\nConfiguration complete!") @@ -418,11 +482,15 @@ def get_vs_generators(): # ----------------------------- # Build? # ----------------------------- -do_build = (platform != "win" or args.build is True if args.skip is True else + +do_build = platform != "win" or (args.build is True if args.skip is True else pick("--build", args.build, "Build project?", ["yes", "no"]) == "yes") if do_build: build_cmd = ["cmake", "--build", build_dir] + + if args.verbose: + build_cmd.append("--verbose") if platform == "win": build_cmd += ["--config", build_config] diff --git a/cmake/toolchains/linux-arm64.cmake b/cmake/toolchains/linux-arm64.cmake new file mode 100644 index 0000000..aac60e2 --- /dev/null +++ b/cmake/toolchains/linux-arm64.cmake @@ -0,0 +1,12 @@ +# toolchains/linux-arm64.cmake (for cross-compiling) +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR aarch64) + +set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) +set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++) +set(CMAKE_LINKER aarch64-linux-gnu-ld) + +# Important isolation from host +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file diff --git a/cmake/toolchains/linux-x64.cmake b/cmake/toolchains/linux-x64.cmake new file mode 100644 index 0000000..43bf10d --- /dev/null +++ b/cmake/toolchains/linux-x64.cmake @@ -0,0 +1,10 @@ +# toolchains/linux-x86_64.cmake (for cross-compiling) +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR x86_64) + +set(CMAKE_C_COMPILER x86_64-linux-gnu-gcc) +set(CMAKE_CXX_COMPILER x86_64-linux-gnu-g++) + +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) \ No newline at end of file diff --git a/scripts/start_wsl.cmd b/scripts/start_wsl.cmd new file mode 100644 index 0000000..06109e0 --- /dev/null +++ b/scripts/start_wsl.cmd @@ -0,0 +1,3 @@ +@echo off + +wsl --cd "%cd%" \ No newline at end of file