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 85
85
wget https://dl.espressif.com/dl/$JIMTCL_VER.tar.gz -O $JIMTCL_VER.tar.gz
86
86
tar xzf $JIMTCL_VER.tar.gz && rm $JIMTCL_VER.tar.gz
87
87
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}
89
89
make
90
90
# Running "make" does not create this file for static builds on Windows but "make install" still expects it
91
91
touch build-jim-ext
Original file line number Diff line number Diff line change @@ -8,7 +8,17 @@ include(cmake/configure.cmake)
8
8
9
9
add_executable (openocd )
10
10
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
+
12
22
add_subdirectory (src )
13
23
14
24
# 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)
9
9
option (VERBOSE_USB_IO "Verbose USB I/O messages (for debugging)" OFF )
10
10
option (VERBOSE_USB_COMM "Verbose USB communication messages (for debugging)" OFF )
11
11
option (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 )
13
13
option (BUILD_RSHIM "Build the rshim driver" OFF )
14
14
option (BUILD_DMEM "Build the dmem driver" OFF )
15
15
option (BUILD_PARPORT "Build the pc parallel port driver" OFF )
@@ -26,8 +26,9 @@ option(BUILD_EP93XX "Build support for EP93xx based SBCs" OFF)
26
26
option (BUILD_AT91RM9200 "Build support for AT91RM9200 based SBCs" OFF )
27
27
option (BUILD_GW16012 "Build support for the Gateworks GW16012 JTAG Programmer" OFF )
28
28
option (BUILD_SYSFSGPIO "Build support for programming driven via sysfs gpios" OFF )
29
+ option (BUILD_LINUXSPIDEV "Build support for Linux SPI device SWD adapter" OFF )
29
30
option (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 )
31
32
option (use_internal_jimtcl_maintainer "Maintainer mode when building internal jimtcl" OFF )
32
33
option (use_internal_libjaylink "Build internal libjaylink" OFF )
33
34
option (BUILD_REMOTE_BITBANG "Build support for the Remote Bitbang driver" ON )
Original file line number Diff line number Diff line change 79
79
/* 0 if you don't want SysfsGPIO driver */
80
80
#cmakedefine01 BUILD_SYSFSGPIO
81
81
82
+ /* 0 if you don't want Linux SPI SWD adapter driver */
83
+ #cmakedefine01 BUILD_LINUXSPIDEV
84
+
82
85
/* 0 if you don't want Xilinx XVC/PCIe driver */
83
86
#cmakedefine01 BUILD_XLNX_PCIE_XVC
84
87
Original file line number Diff line number Diff line change @@ -141,6 +141,16 @@ if(ENABLE_CAPSTONE)
141
141
endif ()
142
142
endif ()
143
143
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 ()
144
154
145
155
# Process options
146
156
if (doxygen_as_html )
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ include(ExternalProject)
3
3
set (JIMTCL_DIR ${CMAKE_CURRENT_SOURCE_DIR} /jimtcl )
4
4
set (JIMTCL_BIN ${CMAKE_CURRENT_BINARY_DIR} /jimtcl )
5
5
set (JIMTCL_STATIC_LIB ${JIMTCL_DIR} /libjim.a )
6
- set (JIMTCL_INCLUDES ${JIMTCL_BIN } )
6
+ set (JIMTCL_INCLUDES ${JIMTCL_DIR } )
7
7
8
8
if (${CMAKE_CROSSCOMPILING} )
9
9
set (CONF_HOST --host=${host} )
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ list(APPEND openocd_targets
59
59
60
60
foreach (target ${openocd_targets} )
61
61
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 > )
63
63
target_include_directories (${target} BEFORE PUBLIC $< TARGET_PROPERTY:openocd,INTERFACE_INCLUDE_DIRECTORIES> )
64
64
target_include_directories (${target} BEFORE PUBLIC $< TARGET_PROPERTY:openocd_main,INTERFACE_INCLUDE_DIRECTORIES> )
65
65
endforeach ()
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ target_sources(nor PRIVATE
22
22
cc26xx.c
23
23
cfi.c
24
24
dsp5680xx_flash.c
25
+ dw-spi.c
25
26
efm32.c
26
27
em357.c
27
28
eneispif.c
You can’t perform that action at this time.
0 commit comments