Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR for GNU Radio plug-in updates #411

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
48fd7a6
Install necessary header files for the gnuradio plugin to work
DominykasPetke Feb 29, 2024
ac5c737
Move plugins into their own directory to have less clutter in the mai…
DominykasPetke Mar 1, 2024
f70d516
Fix a crash and fix MCU not being connected
DominykasPetke Mar 4, 2024
20387ca
Merge branch 'litepcie-update' into litepcie-update-gnuradio
DominykasPetke Mar 5, 2024
b64f382
Bump the version of LimeSuite to include a 2 everywhere
DominykasPetke Mar 6, 2024
4c2937b
Put all the files in the same folder for convenience
DominykasPetke Mar 6, 2024
31b51e6
Move C API header to `limesuite/`
DominykasPetke Mar 6, 2024
11e4013
Enable support for compilation without USB devices support
DominykasPetke Mar 13, 2024
4c2e9c1
Move VersionInfo into the includes directory
DominykasPetke Mar 15, 2024
37da424
Remove weird casts
DominykasPetke Mar 18, 2024
0c222bd
Add Get/Set NCO Index functions
DominykasPetke Mar 18, 2024
b56e00f
Add getting NCO phase offset in GetNCOFrequency
DominykasPetke Mar 18, 2024
b4d0e63
Prepare tree for in-tree GNU Radio plug-in build
DominykasPetke Mar 20, 2024
def9615
Windows fix
DominykasPetke Mar 20, 2024
ba38814
Remove GNURadio version check from here, it instead goes into the plu…
DominykasPetke Mar 20, 2024
de4bc89
Add option to not build the GNU Radio plug-in
DominykasPetke Mar 21, 2024
675489a
Fix compilation issues
DominykasPetke Mar 21, 2024
b2d7b82
Fix Windows build
DominykasPetke Mar 21, 2024
1217253
Ignore Octave directory with clang-format
DominykasPetke Mar 21, 2024
4d3743e
In-tree GNU Radio plugin .deb file build
DominykasPetke Mar 22, 2024
6f270e9
Merge branch 'litepcie-update' into litepcie-update-gnuradio
DominykasPetke Mar 22, 2024
c549776
Fix documentation
DominykasPetke Mar 22, 2024
39bb1f9
Move Logger into includes directory
DominykasPetke Mar 25, 2024
4607c13
Remove left over debugging message
DominykasPetke Mar 25, 2024
28b2971
Documentation build fix
DominykasPetke Mar 25, 2024
cb7c3c2
Remove unnecessary include
DominykasPetke Mar 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Configure CMake (windows)
if: matrix.os == 'windows-latest'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DwxWidgets_ROOT_DIR=${{github.workspace}}/deps/wxWidgets -DFX3_SDK_PATH=${{github.workspace}}/deps/FX3SDK
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DwxWidgets_ROOT_DIR=${{github.workspace}}/deps/wxWidgets -DFX3_SDK_RELATIVE_PATH=deps/FX3SDK

- name: Configure CMake (linux)
if: matrix.os != 'windows-latest'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: Configure CMake (windows)
if: matrix.os == 'windows-latest'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DFX3_SDK_PATH=${{github.workspace}}/deps/FX3SDK -DBUILD_SHARED_LIBS=OFF
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{env.INSTALL_PREFIX}} -DFX3_SDK_RELATIVE_PATH=deps/FX3SDK -DBUILD_SHARED_LIBS=OFF

- name: Configure CMake (linux)
if: matrix.os != 'windows-latest'
Expand Down
25 changes: 9 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ endif()
add_subdirectory(src)

########################################################################
## SoapySDR bindings for LMS7 RFIC driver
## plugins for external programs
########################################################################
add_subdirectory(SoapyLMS7)
add_subdirectory(plugins)

########################################################################
## udev rules for linux usb
Expand Down Expand Up @@ -266,26 +266,19 @@ endif()
########################################################################
if (ENABLE_HEADERS AND ENABLE_LIBRARY)
configure_file(
${PROJECT_SOURCE_DIR}/cmake/Modules/LimeSuiteConfigVersion.in.cmake
${PROJECT_BINARY_DIR}/LimeSuiteConfigVersion.cmake
${PROJECT_SOURCE_DIR}/cmake/Modules/LimeSuite2ConfigVersion.in.cmake
${PROJECT_BINARY_DIR}/LimeSuite2ConfigVersion.cmake
@ONLY)

install(EXPORT LimeSuite2 FILE
LimeSuite2Config.cmake
DESTINATION lib${LIB_SUFFIX}/cmake/${PROJECT_NAME})

install(FILES
${PROJECT_SOURCE_DIR}/cmake/Modules/LimeSuiteConfig.cmake
${PROJECT_BINARY_DIR}/LimeSuiteConfigVersion.cmake
${PROJECT_BINARY_DIR}/LimeSuite2ConfigVersion.cmake
DESTINATION lib${LIB_SUFFIX}/cmake/${PROJECT_NAME})
endif (ENABLE_HEADERS AND ENABLE_LIBRARY)

########################################################################
## freedesktop environment integration
########################################################################
add_subdirectory(Desktop)

########################################################################
## Octave plugin integration
########################################################################
add_subdirectory(amarisoft-plugin)

#########################################################################
# summary
#########################################################################
Expand Down
7 changes: 3 additions & 4 deletions DebPackage22.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@ COPY install_dependencies.sh install_dependencies.sh
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && \
apt-get install -y --no-install-recommends \
dpkg-dev \
debhelper \
dh-python \
dpkg-dev \
&& \
./install_dependencies.sh -y && \
rm -rf /var/lib/apt/lists/*

COPY amarisoft-plugin/ amarisoft-plugin/
COPY cmake/ cmake/
COPY debian/ debian/
COPY debian/control_soapy0.7 debian/control
COPY Desktop/ Desktop/
COPY external/ external/
COPY udev-rules/ udev-rules/
COPY SoapyLMS7/ SoapyLMS7/
COPY plugins/ plugins/
COPY Changelog.txt Changelog.txt
COPY CMakeLists.txt CMakeLists.txt
COPY README.md README.md
Expand Down
10 changes: 6 additions & 4 deletions DebPackage24.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,26 @@ COPY install_dependencies.sh install_dependencies.sh

RUN apt update && \
apt-get install -y --no-install-recommends \
dpkg-dev \
debhelper \
dh-python \
dpkg-dev \
gnuradio-dev \
&& \
./install_dependencies.sh -y && \
rm -rf /var/lib/apt/lists/*

COPY amarisoft-plugin/ amarisoft-plugin/
COPY cmake/ cmake/
COPY debian/ debian/
COPY Desktop/ Desktop/
COPY external/ external/
COPY udev-rules/ udev-rules/
COPY SoapyLMS7/ SoapyLMS7/
COPY plugins/ plugins/
COPY Changelog.txt Changelog.txt
COPY CMakeLists.txt CMakeLists.txt
COPY README.md README.md
COPY src/ src/

RUN patch debian/control < debian/control.patch
RUN patch debian/rules < debian/rules.patch
RUN dpkg-buildpackage --build=binary --no-sign

FROM scratch AS export-stage
Expand Down
4 changes: 1 addition & 3 deletions GenerateDocumentation.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ COPY docs/requirements.txt docs/requirements.txt

RUN pip install -r docs/requirements.txt

COPY Desktop/ Desktop/
COPY external/ external/
COPY cmake/ cmake/
COPY amarisoft-plugin/ amarisoft-plugin/
COPY udev-rules/ udev-rules/
COPY SoapyLMS7/ SoapyLMS7/
COPY plugins/ plugins/
COPY Changelog.txt Changelog.txt
COPY CMakeLists.txt CMakeLists.txt
COPY src/ src/
Expand Down
4 changes: 1 addition & 3 deletions TestCoverage.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ RUN apt update && \
apt-get install -y lcov && \
./install_dependencies.sh -y

COPY Desktop/ Desktop/
COPY external/ external/
COPY cmake/ cmake/
COPY amarisoft-plugin/ amarisoft-plugin/
COPY udev-rules/ udev-rules/
COPY SoapyLMS7/ SoapyLMS7/
COPY plugins/ plugins/
COPY Changelog.txt Changelog.txt
COPY CMakeLists.txt CMakeLists.txt
COPY src/ src/
Expand Down
10 changes: 6 additions & 4 deletions cmake/Modules/FindCyAPI.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ if(NOT WIN32)
endif()

if(MSVC)
set(FX3_SDK_PATH "$ENV{FX3_INSTALL_PATH}" CACHE PATH "Path to the Cypress FX3 SDK")
if(NOT EXISTS "${FX3_SDK_PATH}")
message(STATUS
"Cypress backend not available. The following location does not exist: FX3_SDK_PATH=${FX3_SDK_PATH}")
return()
set(FX3_SDK_PATH "$ENV{FX3_INSTALL_PATH}" CACHE PATH "Path to the Cypress FX3 SDK")
if(NOT EXISTS "${FX3_SDK_PATH}")
message(STATUS
"Cypress backend not available. The following location does not exist: FX3_SDK_PATH=${FX3_SDK_PATH}")
return()
endif()
endif()
find_file(CYAPI_HEADER_FILE
NAMES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ endif ()
## locate the library
########################################################################
find_library(
LIMESUITE_LIBRARY LimeSuite
LIMESUITE_LIBRARY LimeSuite2
PATHS ${LIMESUITE_ROOT}/lib${LIB_SUFFIX}
PATH_SUFFIXES ${CMAKE_LIBRARY_ARCHITECTURE}
NO_DEFAULT_PATH
)
if(NOT LIMESUITE_LIBRARY)
message(FATAL_ERROR "cannot find LimeSuite library in ${LIMESUITE_ROOT}/lib${LIB_SUFFIX}")
message(FATAL_ERROR "cannot find LimeSuite2 library in ${LIMESUITE_ROOT}/lib${LIB_SUFFIX}")
endif()
set(LimeSuite_LIBRARIES ${LIMESUITE_LIBRARY})

Expand All @@ -46,13 +46,13 @@ find_path(
NO_DEFAULT_PATH
)
if(NOT LIMESUITE_INCLUDE_DIR)
message(FATAL_ERROR "cannot find LimeSuite includes in ${LIMESUITE_ROOT}/include")
message(FATAL_ERROR "cannot find LimeSuite2 includes in ${LIMESUITE_ROOT}/include")
endif()
set(LimeSuite_INCLUDE_DIRS ${LIMESUITE_INCLUDE_DIR})

########################################################################
## create import library target
########################################################################
add_library(LimeSuite SHARED IMPORTED)
set_property(TARGET LimeSuite PROPERTY IMPORTED_LOCATION ${LIMESUITE_LIBRARY})
set_property(TARGET LimeSuite PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${LIMESUITE_INCLUDE_DIR})
add_library(LimeSuite2 SHARED IMPORTED)
set_property(TARGET LimeSuite2 PROPERTY IMPORTED_LOCATION ${LIMESUITE_LIBRARY})
set_property(TARGET LimeSuite2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${LIMESUITE_INCLUDE_DIR})
26 changes: 26 additions & 0 deletions debian/control.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/debian/control b/debian/control
index 6d0f6351..16c04bad 100644
--- a/debian/control
+++ b/debian/control
@@ -7,6 +7,7 @@ Build-Depends:
cmake (>= 3.14),
libusb-1.0-0-dev,
libwxgtk3.0-dev | libwxgtk3.0-gtk3-dev | libwxgtk3.2-dev,
+ gnuradio-dev,
Standards-Version: 4.1.1
Homepage: https://myriadrf.org/projects/lime-suite/
Vcs-Git: https://github.com/myriadrf/LimeSuite.git
@@ -89,3 +90,13 @@ Depends:
${misc:Depends}
Description: Lime Suite - SoapySDR bindings
Lime Suite application software.
+
+Package: gr-limesdr
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends},
+ gnuradio,
+ liblimesuite-dev (= ${binary:Version})
+Description:GNU-Radio blocks used to interface with various LimeSDR boards.
+ Implementation of GNU-Radio out of tree modules which allow to interface with
+ LimeSDR-USB, LimeSDR-Mini,LimeNET-Micro and LimeSDR-QPCIe boards.
2 changes: 2 additions & 0 deletions debian/gr-limesdr.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/lib/python3*/site-packages/limesdr/*
usr/share/gnuradio/grc/blocks/limesdr_*
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ debian/limesuite-images$(RELEASE_NUM)%: debian/limesuite-images%.in
export DH_OPTIONS

%:
dh $@ --buildsystem=cmake --parallel --builddirectory=build
dh $@ --with python3 --buildsystem=cmake --parallel --builddirectory=build

override_dh_auto_configure: $(GENERATED_INSTALL_FILES)
dh_auto_configure -- \
Expand Down
14 changes: 14 additions & 0 deletions debian/rules.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/debian/rules b/debian/rules
index 13ea715f..8b114b71 100755
--- a/debian/rules
+++ b/debian/rules
@@ -33,7 +33,8 @@ override_dh_auto_configure: $(GENERATED_INSTALL_FILES)
-DCMAKE_AUTOSET_INSTALL_RPATH=FALSE \
-DUDEV_RULES_INSTALL_PATH=/lib/udev/rules.d \
-DLIB_SUFFIX="/$(DEB_HOST_MULTIARCH)" \
- -DLIME_SUITE_EXTVER="$(DEB_VERSION_EXTRA)"
+ -DLIME_SUITE_EXTVER="$(DEB_VERSION_EXTRA)" \
+ -DENABLE_GNURADIO=ON

override_dh_installchangelogs:
dh_installchangelogs Changelog.txt
2 changes: 1 addition & 1 deletion docs/doxygen/DoxyfileAPI.in
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT = @CMAKE_SOURCE_DIR@/src/lime/LimeSuite.h @CMAKE_SOURCE_DIR@/docs/doxygen/mainpage.dox
INPUT = @CMAKE_SOURCE_DIR@/src/include/limesuite/LimeSuite.h @CMAKE_SOURCE_DIR@/docs/doxygen/mainpage.dox

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
29 changes: 29 additions & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
########################################################################
## Octave plugin integration
########################################################################
add_subdirectory(amarisoft-plugin)
# add_subdirectory(octave)

########################################################################
## freedesktop environment integration
########################################################################
add_subdirectory(Desktop)

########################################################################
## QuickTest software
########################################################################
# add_subdirectory(QuickTest)

########################################################################
## SoapySDR bindings
########################################################################
add_subdirectory(SoapyLMS7)

########################################################################
## GNU Radio plugin
########################################################################
option(ENABLE_GNURADIO "Enable build library" OFF)
add_feature_info(GNURADIO ENABLE_GNURADIO "GNU Radio 3.9+ Plug-in")
if (ENABLE_GNURADIO)
add_subdirectory(gr-limesdr)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <SoapySDR/Registry.hpp>
#include <SoapySDR/Logger.hpp>

#include "Logger.h"
#include "limesuite/Logger.h"

using namespace lime;

Expand Down
5 changes: 3 additions & 2 deletions SoapyLMS7/Settings.cpp → plugins/SoapyLMS7/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <stdexcept>
#include <string>

#include "Logger.h"
#include "limesuite/Logger.h"

using namespace lime;

Expand Down Expand Up @@ -424,7 +424,8 @@ double SoapyLMS7::getFrequency(const int direction, const size_t channel, const
if (name == "BB")
{
const TRXDir dir = (direction == SOAPY_SDR_TX) ? TRXDir::Tx : TRXDir::Rx;
return sdrDevice->GetNCOFrequency(0, dir, channel, 0);
double phaseOffset = 0.0;
return sdrDevice->GetNCOFrequency(0, dir, channel, 0, phaseOffset);
}

throw std::runtime_error("SoapyLMS7::getFrequency(" + name + ") unknown name");
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <ratio>
#include <thread>

#include "Logger.h"
#include "limesuite/Logger.h"

using namespace lime;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions plugins/gr-limesdr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Placeholder file to put the repository in here
2 changes: 2 additions & 0 deletions plugins/octave/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SortIncludes: false
DisableFormat: true
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading