LoRaMac-node icon indicating copy to clipboard operation
LoRaMac-node copied to clipboard

AU915 compilation - CMakeLists.txt needs changing

Open coratron opened this issue 1 year ago • 2 comments

Description

AU915 will not compile due to a missing line (it uses a function in RegionBaseUS.c)

Steps to reproduce

Command:

cmake -DCMAKE_BUILD_TYPE=Release \                                                                                                   ✔  idf4.4_py3.8_env  
        -DTOOLCHAIN_PREFIX="BLABLABLABLA/arm-none-eabi-gcc/11.3.1-1.1.2/.content" \
        -DCMAKE_TOOLCHAIN_FILE="../cmake/toolchain-arm-none-eabi.cmake" \
        -DAPPLICATION="LoRaMac" \
        -DMODULATION="LORA" \
        -DREGION_EU868="OFF" \
        -DREGION_US915="OFF" \
        -DREGION_CN779="OFF" \
        -DREGION_EU433="OFF" \
        -DREGION_AU915="ON" \
        -DREGION_AS923="OFF" \
        -DREGION_CN470="OFF" \
        -DREGION_KR920="OFF" \
        -DREGION_IN865="OFF" \
        -DREGION_RU864="OFF" \
        -DBOARD="NucleoL073" \
        -DMBED_RADIO_SHIELD="SX1262MBXCAS" \
        -DUSE_RADIO_DEBUG="ON" ..

Output after building:

../src/mac/region/RegionAU915.c:870: undefined reference to `RegionBaseUSComputeNext125kHzJoinChannel'

Proposed solution:

Modify CmakeLists.txt inside the "mac" folder, line 73

if(REGION_AU915 STREQUAL ON)
set( MAC_BUILD_SOURCES
     ${MAC_BUILD_SOURCES}
     "${CMAKE_CURRENT_SOURCE_DIR}/region/RegionBaseUS.c"
     "${CMAKE_CURRENT_SOURCE_DIR}/region/RegionAU915.c" )
endif()

I have yet to test that the system works on the hardware.

coratron avatar Feb 12 '23 04:02 coratron