gr-rylr998/CMakeLists.txt
Ryan Malloy c839d225a8 Initial release: complete LoRa TX/RX for RYLR998 modems
GNU Radio Out-of-Tree module providing:
- Complete TX chain: PHYEncode → FrameGen → CSSMod
- Complete RX chain: CSSDemod → FrameSync → PHYDecode
- NETWORKID extraction/encoding (0-255 range)
- All SF (7-12) and CR (4/5-4/8) combinations
- Loopback tested with 24/24 configurations passing

Key features:
- Fractional SFD (2.25 downchirp) handling
- Gray encode/decode with proper inverse operations
- gr-lora_sdr compatible decode modes
- GRC block definitions and example flowgraphs
- Comprehensive documentation

Discovered RYLR998 sync word mapping:
  sync_bin_1 = (NETWORKID >> 4) * 8
  sync_bin_2 = (NETWORKID & 0x0F) * 8
2026-02-05 13:38:07 -07:00

80 lines
2.5 KiB
CMake

########################################################################
# gr-rylr998: GNU Radio Out-of-Tree Module for RYLR998 LoRa Modems
########################################################################
cmake_minimum_required(VERSION 3.10)
project(gr-rylr998 VERSION 0.1.0 LANGUAGES CXX)
# Set the default build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()
# Find GNU Radio
find_package(Gnuradio "3.10" REQUIRED COMPONENTS runtime blocks)
# Find Python
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
# Set installation directories
include(GNUInstallDirs)
set(GR_PYTHON_DIR ${CMAKE_INSTALL_PREFIX}/${Python3_SITEARCH}/rylr998)
set(GR_GRC_BLOCKS_DIR ${CMAKE_INSTALL_PREFIX}/share/gnuradio/grc/blocks)
########################################################################
# Install Python module
########################################################################
# Python source files
set(PYTHON_SOURCES
python/rylr998/__init__.py
python/rylr998/networkid.py
python/rylr998/css_demod.py
python/rylr998/css_mod.py
python/rylr998/phy_decode.py
python/rylr998/phy_encode.py
python/rylr998/frame_sync.py
python/rylr998/frame_gen.py
)
# Install Python module
install(FILES ${PYTHON_SOURCES}
DESTINATION ${GR_PYTHON_DIR}
COMPONENT python
)
########################################################################
# Install GRC block definitions
########################################################################
set(GRC_BLOCKS
grc/rylr998_css_demod.block.yml
grc/rylr998_css_mod.block.yml
grc/rylr998_frame_sync.block.yml
grc/rylr998_frame_gen.block.yml
grc/rylr998_phy_decode.block.yml
grc/rylr998_phy_encode.block.yml
grc/rylr998_rx.block.yml
grc/rylr998_tx.block.yml
)
install(FILES ${GRC_BLOCKS}
DESTINATION ${GR_GRC_BLOCKS_DIR}
COMPONENT grc
)
########################################################################
# Print summary
########################################################################
message(STATUS "")
message(STATUS "========================================")
message(STATUS "gr-rylr998 Configuration Summary")
message(STATUS "========================================")
message(STATUS "Version: ${PROJECT_VERSION}")
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
message(STATUS "Python site-packages: ${GR_PYTHON_DIR}")
message(STATUS "GRC blocks dir: ${GR_GRC_BLOCKS_DIR}")
message(STATUS "========================================")
message(STATUS "")