blackmagic-esp32-s2/components/blackmagic/CMakeLists.txt

80 lines
2.4 KiB
CMake
Raw Normal View History

2021-10-14 06:41:33 +01:00
set(BM_DIR "blackmagic-fw")
set(PLATFORM_DIR "esp32-platform")
set(BM_SOURCES
${BM_DIR}/src/platforms/common/swdptap.c
${BM_DIR}/src/platforms/common/jtagtap.c
${BM_DIR}/src/gdb_main.c
2021-10-17 15:06:53 +01:00
${BM_DIR}/src/command.c
${BM_DIR}/src/crc32.c
${BM_DIR}/src/exception.c
${BM_DIR}/src/gdb_hostio.c
${BM_DIR}/src/gdb_main.c
2021-10-14 06:41:33 +01:00
${BM_DIR}/src/gdb_packet.c
2021-10-17 15:06:53 +01:00
${BM_DIR}/src/remote.c
${BM_DIR}/src/hex_utils.c
${BM_DIR}/src/main.c
${BM_DIR}/src/morse.c
2021-10-14 06:41:33 +01:00
#TODO move to project
2021-10-17 15:06:53 +01:00
${PLATFORM_DIR}/platform.c
${PLATFORM_DIR}/gdb-glue.c
2021-10-14 06:41:33 +01:00
)
set(BM_TARGETS
2021-10-17 15:06:53 +01:00
${BM_DIR}/src/target/adiv5.c
${BM_DIR}/src/target/cortexa.c
${BM_DIR}/src/target/jtag_devs.c
${BM_DIR}/src/target/kinetis.c
${BM_DIR}/src/target/lpc15xx.c
${BM_DIR}/src/target/lpc546xx.c
${BM_DIR}/src/target/nrf51.c
${BM_DIR}/src/target/sam3x.c
${BM_DIR}/src/target/samx5x.c
${BM_DIR}/src/target/stm32g0.c
2021-10-14 06:41:33 +01:00
${BM_DIR}/src/target/stm32l4.c
2021-10-17 15:06:53 +01:00
${BM_DIR}/src/target/adiv5_jtagdp.c
${BM_DIR}/src/target/cortexm.c
${BM_DIR}/src/target/jtag_scan.c
${BM_DIR}/src/target/lmi.c
${BM_DIR}/src/target/lpc17xx.c
${BM_DIR}/src/target/lpc_common.c
${BM_DIR}/src/target/nxpke04.c
${BM_DIR}/src/target/sam4l.c
${BM_DIR}/src/target/stm32f1.c
${BM_DIR}/src/target/stm32h7.c
# ${BM_DIR}/src/target/swdptap_generic.c
${BM_DIR}/src/target/adiv5_swdp.c
${BM_DIR}/src/target/efm32.c
# ${BM_DIR}/src/target/jtagtap_generic.c
${BM_DIR}/src/target/lpc11xx.c
${BM_DIR}/src/target/lpc43xx.c
${BM_DIR}/src/target/msp432.c
${BM_DIR}/src/target/rp.c
${BM_DIR}/src/target/samd.c
${BM_DIR}/src/target/stm32f4.c
${BM_DIR}/src/target/stm32l0.c
${BM_DIR}/src/target/target.c
2021-10-14 06:41:33 +01:00
)
set(BM_INCLUDE
${BM_DIR}/src/include
${BM_DIR}/src/platforms/common
${BM_DIR}/src/target
${BM_DIR}/libopencm3/include
${PLATFORM_DIR}
)
2021-10-17 15:06:53 +01:00
# Get the current working branch
execute_process(
COMMAND git describe --always --dirty --tags
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_DESC
OUTPUT_STRIP_TRAILING_WHITESPACE)
message(STATUS "FW Version: ${GIT_DESC}")
idf_component_register(SRCS ${BM_SOURCES} ${BM_TARGETS}
2021-10-14 06:41:33 +01:00
INCLUDE_DIRS ${BM_INCLUDE})
2021-10-17 21:30:20 +01:00
target_compile_options(${COMPONENT_LIB} PRIVATE -DPC_HOSTED=0 -DFIRMWARE_VERSION="${GIT_DESC}" -Wno-char-subscripts -Wno-attributes)