Skip to content

Commit 4bd05ed

Browse files
aap-scen-sc
authored andcommitted
[syntacore] implemented basic embargo facilities
if we need to embargo the codebase, we'll need: ``` rm src/target/embargo/sc-ext/* touch src/target/embargo/sc-ext/Makefile.am ``` Change-Id: I5f03a5a8f91dadd0004cea2414ab870358115fab
1 parent 3539087 commit 4bd05ed

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

configure.ac

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,10 @@ AC_ARG_ENABLE([remote-bitbang],
402402
AS_HELP_STRING([--enable-remote-bitbang], [Enable building support for the Remote Bitbang driver]),
403403
[build_remote_bitbang=$enableval], [build_remote_bitbang=yes])
404404

405+
AC_ARG_ENABLE([syntacore-extensions],
406+
AS_HELP_STRING([--enable-syntacore-extensions], [Enable Syntacore extensions.]),
407+
[syntacore_extensions=$enableval], [syntacore_extensions=no])
408+
405409
AS_CASE(["${host_cpu}"],
406410
[i?86|x86*], [],
407411
[
@@ -645,6 +649,13 @@ AS_IF([test "x$enable_capstone" == xno], [
645649
AC_DEFINE([HAVE_CAPSTONE], [0], [0 if you don't have Capstone disassembly framework.])
646650
])
647651

652+
AS_IF([test "x$enable_syntacore_extensions" = xyes], [
653+
PKG_CHECK_MODULES([JANSSON], [jansson])
654+
AC_DEFINE([SYNTACORE_EXTENSIONS],[1], [1 if SYNTACORE_EXTENSIONS support is included.])
655+
], [
656+
AC_DEFINE([SYNTACORE_EXTENSIONS],[0], [0 if SYNTACORE_EXTENSIONS support is excluded.])
657+
])
658+
648659
for hidapi_lib in hidapi hidapi-hidraw hidapi-libusb; do
649660
PKG_CHECK_MODULES([HIDAPI],[$hidapi_lib],[
650661
use_hidapi=yes
@@ -764,6 +775,8 @@ AM_CONDITIONAL([RSHIM], [test "x$build_rshim" = "xyes"])
764775
AM_CONDITIONAL([DMEM], [test "x$build_dmem" = "xyes"])
765776
AM_CONDITIONAL([HAVE_CAPSTONE], [test "x$enable_capstone" != "xno"])
766777

778+
AM_CONDITIONAL([SYNTACORE_EXTENSIONS], [test "x$enable_syntacore_extensions" = "xyes"])
779+
767780
AM_CONDITIONAL([HAVE_JIMTCL_PKG_CONFIG], [test "x$have_jimtcl_pkg_config" = "xyes"])
768781

769782
AM_CONDITIONAL([USE_GCOV], [test "x$enable_gcov" = "xyes"])

src/openocd.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@
3333
#include <server/gdb_server.h>
3434
#include <server/rtt_server.h>
3535

36+
#if SYNTACORE_EXTENSIONS
37+
#include <target/embargo/sc-ext/cmd.h>
38+
#endif
39+
3640
#ifdef HAVE_STRINGS_H
3741
#include <strings.h>
3842
#endif
@@ -247,6 +251,9 @@ static int (* const command_registrants[])(struct command_context *cmd_ctx_value
247251
cti_register_commands,
248252
dap_register_commands,
249253
arm_tpiu_swo_register_commands,
254+
#if SYNTACORE_EXTENSIONS
255+
&syntacore_extensions_register_commands,
256+
#endif
250257
};
251258

252259
static struct command_context *setup_command_handler(Jim_Interp *interp)
@@ -361,6 +368,9 @@ int openocd_main(int argc, char *argv[])
361368
/* free all DAP and CTI objects */
362369
arm_cti_cleanup_all();
363370
dap_cleanup_all();
371+
#if SYNTACORE_EXTENSIONS
372+
syntacore_extensions_cleanup();
373+
#endif
364374

365375
adapter_quit();
366376

src/target/Makefile.am

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,9 @@ include %D%/openrisc/Makefile.am
242242
include %D%/riscv/Makefile.am
243243
include %D%/xtensa/Makefile.am
244244
include %D%/espressif/Makefile.am
245+
246+
if SYNTACORE_EXTENSIONS
247+
include %D%/embargo/sc-ext/Makefile.am
248+
%C%_libtarget_la_LIBADD += %D%/embargo/sc-ext/libscext.la
249+
endif
250+

src/target/embargo/sc-ext/Makefile.am

Whitespace-only changes.

0 commit comments

Comments
 (0)