Commit 2245d822 authored by Raymond Knopp's avatar Raymond Knopp

ASN1 generation for NR

parent b93b7073
......@@ -359,40 +359,45 @@ endif (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15")
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/${NR_RRC_ASN1_VERSION})
if(NOT EXISTS ${asn1c_call})
message( FATAL_ERROR "The script ${asn1c_call} must be present" )
endif(NOT EXISTS ${asn1c_call})
message("calling ASN1C_PREFIX=NR_ asn1c -findirect-choice -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}")
execute_process(COMMAND ${asn1c_call}
${NR_RRC_FULL_DIR}
${NR_RRC_GRAMMAR}
NR_RRC
RESULT_VARIABLE ret
OUTPUT_QUIET
ERROR_QUIET )
#if(NOT EXISTS ${asn1c_call})
#message( FATAL_ERROR "The script ${asn1c_call} must be present" )
#endif(NOT EXISTS ${asn1c_call})
#message("calling ASN1C_PREFIX=NR_ asn1c -findirect-choice -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D ${RRC_FULL_DIR} ${RRC_GRAMMAR}")
#execute_process(COMMAND env asn1c
# ${NR_RRC_FULL_DIR}
# ${NR_RRC_GRAMMAR}
# NR_RRC
# RESULT_VARIABLE ret
# OUTPUT_QUIET
# ERROR_QUIET )
message("calling ASN1C_PREFIX=NR asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${NR_RRC_FULL_DIR} ${NR_RRC_GRAMMAR}")
execute_process(COMMAND mkdir -p ${NR_RRC_FULL_DIR}
COMMAND env "ASN1C_PREFIX=NR" asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D ${NR_RRC_FULL_DIR} ${NR_RRC_GRAMMAR}
RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${asn1c_call}: error")
endif (NOT ${ret} STREQUAL 0)
if(NOT EXISTS ${fix_asn1c_call})
message( FATAL_ERROR "The script ${fix_asn1c_call} must be present" )
endif(NOT EXISTS ${fix_asn1c_call})
execute_process(COMMAND ${fix_asn1c_call}
${NR_RRC_FULL_DIR}
NR_RRC
${NR_RRC_ASN1_VERSION}
RESULT_VARIABLE ret)
#if(NOT EXISTS ${fix_asn1c_call})
# message( FATAL_ERROR "The script ${fix_asn1c_call} must be present" )
#endif(NOT EXISTS ${fix_asn1c_call})
#execute_process(COMMAND ${fix_asn1c_call}
# ${NR_RRC_FULL_DIR}
# NR_RRC
# ${NR_RRC_ASN1_VERSION}
# RESULT_VARIABLE ret)
if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${fix_asn1c_call}: error")
endif (NOT ${ret} STREQUAL 0)
#if (NOT ${ret} STREQUAL 0)
# message(FATAL_ERROR "${fix_asn1c_call}: error")
#endif (NOT ${ret} STREQUAL 0)
file(GLOB nr_rrc_source ${NR_RRC_FULL_DIR}/*.c)
file(GLOB nr_rrc_h ${NR_RRC_FULL_DIR}/*.h)
set(nr_rrc_h ${nr_rrc_h} ${NR_RRC_FULL_DIR}/asn1_constants.h)
set(nr_rrc_h ${nr_rrc_h} ${NR_RRC_FULL_DIR}/asn_constant.h)
set_source_files_properties(${nr_rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
add_library(NR_RRC_LIB
${nr_rrc_h}
......@@ -405,7 +410,7 @@ include_directories ("${NR_RRC_FULL_DIR}")
add_custom_command (
OUTPUT ${NR_RRC_FULL_DIR}/asn1_constants.h
OUTPUT ${NR_RRC_FULL_DIR}/asn_constant.h
COMMAND ${asn1c_call} ${NR_RRC_FULL_DIR} ${NR_RRC_GRAMMAR} RRC
COMMAND ${fix_asn1c_call} ${NR_RRC_FULL_DIR} RRC ${NR_RRC_ASN1_VERSION}
DEPENDS ${RRC_GRAMMAR}
......@@ -1300,7 +1305,7 @@ set(PHY_SRC_UE
set(PHY_NR_SRC
# depend on code generation from asn1c
${RRC_FULL_DIR}/asn1_constants.h
${RRC_FULL_DIR}/asn_constant.h
# actual source
${OPENAIR1_DIR}/PHY/INIT/nr_init.c
${OPENAIR1_DIR}/PHY/INIT/nr_parms.c
......@@ -1325,7 +1330,7 @@ set(PHY_SRC_UE
set(PHY_NR_UE_SRC
# depend on code generation from asn1c
${RRC_FULL_DIR}/asn1_constants.h
${RRC_FULL_DIR}/asn_constant.h
# actual source
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
${OPENAIR1_DIR}/PHY/INIT/nr_parms.c
......@@ -2335,7 +2340,7 @@ add_executable(nr-softmodem
${rrc_h}
${nr_rrc_h}
${s1ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h
# ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/nr-gnb.c
${OPENAIR_TARGETS}/RT/USER/nr-ru.c
......@@ -2373,7 +2378,7 @@ target_link_libraries (nr-softmodem ${T_LIB})
add_executable(nr-softmodem-nos1
${rrc_h}
${s1ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h
# ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/nr-gnb.c
${OPENAIR_TARGETS}/RT/USER/nr-ru.c
......@@ -2413,7 +2418,7 @@ target_link_libraries (nr-softmodem-nos1 ${T_LIB})
add_executable(nr-uesoftmodem
${rrc_h}
${s1ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h
# ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/nr-ue.c
${OPENAIR_TARGETS}/RT/USER/nr-uesoftmodem.c
......@@ -2448,7 +2453,7 @@ target_link_libraries (nr-uesoftmodem ${T_LIB})
add_executable(nr-uesoftmodem-nos1
${rrc_h}
${s1ap_h}
${OPENAIR_BIN_DIR}/messages_xml.h
# ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/nr-ue.c
${OPENAIR_TARGETS}/RT/USER/nr-uesoftmodem.c
......
......@@ -228,6 +228,7 @@ function main() {
nrUE=1
NR="True"
echo_info "Will compile NR UE"
shift;;
--mu)
UE_EXPANSION="True"
echo_info "Will compile with UE_EXPANSION"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment