File tree Expand file tree Collapse file tree 8 files changed +31
-6
lines changed
Expand file tree Collapse file tree 8 files changed +31
-6
lines changed Original file line number Diff line number Diff line change 8585 wget https://dl.espressif.com/dl/$JIMTCL_VER.tar.gz -O $JIMTCL_VER.tar.gz
8686 tar xzf $JIMTCL_VER.tar.gz && rm $JIMTCL_VER.tar.gz
8787 pushd $JIMTCL_VER
88- ./configure --prefix="$PWD/dist" --host=${CONF_HOST} --disable-shared CC=${HOST_CC}
88+ ./configure --prefix="$PWD/dist" --host=${CONF_HOST} --disable-shared --with-ext=json --minimal --disable-ssl CC=${HOST_CC}
8989 make
9090 # Running "make" does not create this file for static builds on Windows but "make install" still expects it
9191 touch build-jim-ext
Original file line number Diff line number Diff line change @@ -8,7 +8,17 @@ include(cmake/configure.cmake)
88
99add_executable (openocd)
1010
11- include (cmake/jimtcl.cmake)
11+ if (use_internal_jimtcl)
12+ include (cmake/jimtcl.cmake)
13+ elseif (JIMTCL_FOUND)
14+ add_library (libjimtcl INTERFACE )
15+ target_include_directories (libjimtcl INTERFACE ${JIMTCL_INCLUDE_DIRS} )
16+ target_link_libraries (libjimtcl INTERFACE ${JIMTCL_LINK_LIBRARIES} )
17+ elseif (have_jim_h)
18+ add_library (libjimtcl INTERFACE )
19+ target_link_libraries (libjimtcl INTERFACE jim)
20+ endif ()
21+
1222add_subdirectory (src)
1323
1424# Propogate config.h which is auto-generated into the root directory.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ option(VERBOSE_JTAG_IO "Verbose JTAG I/O messages (for debugging)" OFF)
99option (VERBOSE_USB_IO "Verbose USB I/O messages (for debugging)" OFF )
1010option (VERBOSE_USB_COMM "Verbose USB communication messages (for debugging)" OFF )
1111option (MALLOC_LOGGING "Include free space in logging messages (requires malloc.h)" OFF )
12- option (BUILD_DUMMY "Build the dummy port driver" OFF )
12+ option (BUILD_DUMMY "Build the dummy port driver" ON )
1313option (BUILD_RSHIM "Build the rshim driver" OFF )
1414option (BUILD_DMEM "Build the dmem driver" OFF )
1515option (BUILD_PARPORT "Build the pc parallel port driver" OFF )
@@ -26,8 +26,9 @@ option(BUILD_EP93XX "Build support for EP93xx based SBCs" OFF)
2626option (BUILD_AT91RM9200 "Build support for AT91RM9200 based SBCs" OFF )
2727option (BUILD_GW16012 "Build support for the Gateworks GW16012 JTAG Programmer" OFF )
2828option (BUILD_SYSFSGPIO "Build support for programming driven via sysfs gpios" OFF )
29+ option (BUILD_LINUXSPIDEV "Build support for Linux SPI device SWD adapter" OFF )
2930option (BUILD_XLNX_PCIE_XVC "Build support for Xilinx XVC/PCIe" OFF )
30- option (use_internal_jimtcl "Build internal jimtcl" ON )
31+ option (use_internal_jimtcl "Build internal jimtcl" OFF )
3132option (use_internal_jimtcl_maintainer "Maintainer mode when building internal jimtcl" OFF )
3233option (use_internal_libjaylink "Build internal libjaylink" OFF )
3334option (BUILD_REMOTE_BITBANG "Build support for the Remote Bitbang driver" ON )
Original file line number Diff line number Diff line change 7979/* 0 if you don't want SysfsGPIO driver */
8080#cmakedefine01 BUILD_SYSFSGPIO
8181
82+ /* 0 if you don't want Linux SPI SWD adapter driver */
83+ #cmakedefine01 BUILD_LINUXSPIDEV
84+
8285/* 0 if you don't want Xilinx XVC/PCIe driver */
8386#cmakedefine01 BUILD_XLNX_PCIE_XVC
8487
Original file line number Diff line number Diff line change @@ -141,6 +141,16 @@ if(ENABLE_CAPSTONE)
141141 endif ()
142142endif ()
143143
144+ pkg_check_modules(JIMTCL jimtcl>=0.79)
145+ if (NOT JIMTCL_FOUND AND NOT use_internal_jimtcl)
146+ check_include_file(jim.h have_jim_h)
147+ if (NOT have_jim_h)
148+ message (FATAL_ERROR "Jim TCL package not found\n "
149+ "Either configure to build version from submodule using 'cmake -D use_internal_jimtcl=ON', "
150+ "or provide path to search for package configuration files in environment variable"
151+ "'PKG_CONFIG_PATH' / 'OSXCROSS_PKG_CONFIG_PATH'" )
152+ endif ()
153+ endif ()
144154
145155# Process options
146156if (doxygen_as_html)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ include(ExternalProject)
33set (JIMTCL_DIR ${CMAKE_CURRENT_SOURCE_DIR} /jimtcl)
44set (JIMTCL_BIN ${CMAKE_CURRENT_BINARY_DIR} /jimtcl)
55set (JIMTCL_STATIC_LIB ${JIMTCL_DIR} /libjim.a)
6- set (JIMTCL_INCLUDES ${JIMTCL_BIN } )
6+ set (JIMTCL_INCLUDES ${JIMTCL_DIR } )
77
88if (${CMAKE_CROSSCOMPILING} )
99set (CONF_HOST --host=${host} )
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ list(APPEND openocd_targets
5959
6060foreach (target ${openocd_targets} )
6161 target_compile_options (${target} PUBLIC ${OPENOCD_COMMON_COMPILER_FLAGS} )
62- target_include_directories (${target} PUBLIC ${JIMTCL_DIR} )
62+ target_include_directories (${target} BEFORE PUBLIC $<TARGET_PROPERTY:libjimtcl, INTERFACE_INCLUDE_DIRECTORIES > )
6363 target_include_directories (${target} BEFORE PUBLIC $<TARGET_PROPERTY:openocd,INTERFACE_INCLUDE_DIRECTORIES >)
6464 target_include_directories (${target} BEFORE PUBLIC $<TARGET_PROPERTY:openocd_main,INTERFACE_INCLUDE_DIRECTORIES >)
6565endforeach ()
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ target_sources(nor PRIVATE
2222 cc26xx.c
2323 cfi.c
2424 dsp5680xx_flash.c
25+ dw-spi.c
2526 efm32.c
2627 em357.c
2728 eneispif.c
You can’t perform that action at this time.
0 commit comments