cleanups
Change-Id: I8022d937477668253c613e97c3a579ae65084b1e
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
if(BUILD_PANDA)
|
||||
|
||||
|
||||
message(STATUS "[${PROJECT_NAME}] Building Pandaboard variant ...")
|
||||
SET(VARIANT panda)
|
||||
|
||||
|
||||
find_package(FTDI REQUIRED)
|
||||
set(openocd_library_dependencies ${openocd_library_dependencies} ${FTDI_LIBRARY})
|
||||
|
||||
|
||||
# FIXME: some libraries still need to be located the "cmake way"
|
||||
set(openocd_library_dependencies ${openocd_library_dependencies} -ldl)
|
||||
|
||||
@ -27,37 +27,36 @@ if(BUILD_PANDA)
|
||||
# make sure aspects don't fail to match in entry.cc
|
||||
#include_directories(${PROJECT_SOURCE_DIR}/src/core ${CMAKE_BINARY_DIR}/src/core)
|
||||
# an executable needs at least one source file, so we hand over an empty .cc file to make cmake happy.
|
||||
|
||||
|
||||
set(srces ${openocd_src_dir}/openocd_wrapper.cc)
|
||||
|
||||
set (srces ${srces}
|
||||
${openocd_src_dir}/opcode_parser/arm-addressmode.c
|
||||
${openocd_src_dir}/opcode_parser/arm-condition.c
|
||||
${openocd_src_dir}/opcode_parser/arm-opcode-coprocessor.c
|
||||
${openocd_src_dir}/opcode_parser/arm-opcode-data.c
|
||||
${openocd_src_dir}/opcode_parser/arm-opcode-ldmstm-branch.c
|
||||
${openocd_src_dir}/opcode_parser/arm-opcode-ldrstr.c
|
||||
${openocd_src_dir}/opcode_parser/arm-opcode.c)
|
||||
|
||||
add_executable(fail-client ${srces})
|
||||
|
||||
set (srces ${srces}
|
||||
${openocd_src_dir}/opcode_parser/arm-addressmode.c
|
||||
${openocd_src_dir}/opcode_parser/arm-condition.c
|
||||
${openocd_src_dir}/opcode_parser/arm-opcode-coprocessor.c
|
||||
${openocd_src_dir}/opcode_parser/arm-opcode-data.c
|
||||
${openocd_src_dir}/opcode_parser/arm-opcode-ldmstm-branch.c
|
||||
${openocd_src_dir}/opcode_parser/arm-opcode-ldrstr.c
|
||||
${openocd_src_dir}/opcode_parser/arm-opcode.c)
|
||||
|
||||
add_executable(fail-client ${srces})
|
||||
target_link_libraries(fail-client ${openocd_src_dir}/src/.libs/libopenocd.a ${openocd_src_dir}/jimtcl/libjim.a fail ${openocd_library_dependencies})
|
||||
add_dependencies(fail-client libfailopenocd_external)
|
||||
|
||||
|
||||
# ensure, elf path is set for enabling openocd to read elf symbols
|
||||
if(EXISTS $ENV{FAIL_ELF_PATH})
|
||||
SET(PANDA_ELF_PATH $ENV{FAIL_ELF_PATH})
|
||||
message(STATUS "[Fail*] PandaBoard ELF under test: ${PANDA_ELF_PATH}")
|
||||
message(STATUS "[Fail*] PandaBoard ELF under test: $ENV{FAIL_ELF_PATH}")
|
||||
else()
|
||||
message(FATAL_ERROR "Please set the FAIL_ELF_PATH enviroment variable to the binary under test.")
|
||||
message(FATAL_ERROR "Please set the FAIL_ELF_PATH environment variable to the binary under test.")
|
||||
endif()
|
||||
|
||||
|
||||
# copy the conf-files to build directory
|
||||
# TODO: copy to install path on install!?
|
||||
|
||||
|
||||
# copy the conf-files to build directory
|
||||
# TODO: copy to install path on install!?
|
||||
file(COPY ${openocd_src_dir}/tcl/ DESTINATION oocd_conf/ PATTERN openocd EXCLUDE)
|
||||
get_filename_component(OOCD_CONF_FILES_PATH ${CMAKE_BINARY_DIR}/oocd_conf/ REALPATH)
|
||||
|
||||
configure_file(${openocd_src_dir}/openocd.cfg openocd.cfg COPYONLY)
|
||||
configure_file(${openocd_src_dir}/openocd.cfg openocd.cfg COPYONLY)
|
||||
|
||||
get_filename_component(OOCD_CONF_FILE_PATH ${CMAKE_BINARY_DIR}/openocd.cfg REALPATH)
|
||||
configure_file(${openocd_src_dir}/openocd_wrapper.hpp.in
|
||||
|
||||
Reference in New Issue
Block a user