compiles and works

This commit is contained in:
François Dausseur
2025-02-18 11:36:18 +01:00
parent b66e82da87
commit 5dfe5b123e
17 changed files with 7087 additions and 2021 deletions

View File

@@ -62,7 +62,7 @@ typedef struct _script_label
typedef struct _script_ctx script_ctx;
typedef int (*SCRIPT_PRINTF_FUNC)(script_ctx * ctx, int MSGTYPE, char *string, ...);
typedef int (*SCRIPT_PRINTF_FUNC)(script_ctx * ctx, enum MSGTYPE typ, char *string, ...);
typedef struct _script_ctx
{

View File

@@ -1,21 +1,20 @@
#ifndef _VERSION_H
#define _VERSION_H
#define VDIG1 2
#define VDIG2 6
#define VDIG3 7
#define VDIG4 1
#define VDIG1 2
#define VDIG2 6
#define VDIG3 7
#define VDIG4 1
#define STR_DATE "28 Oct 2024"
#define STR_DATE "28 Oct 2024"
#define vxstr(s) vstr(s)
#define vstr(s) #s
#define vxstr(s) vstr(s)
#define vstr(s) #s
#define LIB_JTAG_CORE_VERSION vxstr(VDIG1) "." vxstr(VDIG2) "." vxstr(VDIG3) "." vxstr(VDIG4)
#define LIB_JTAG_CORE_VERSION_COMMA vxstr(VDIG1) "," vxstr(VDIG2) "," vxstr(VDIG3) "," vxstr(VDIG4)
#define APP_VER VDIG1.VDIG2.VDIG3.VDIG4
#define APP_VER_TXT( N ) JTAG Boundary Scanner v##N
#define APP_VER_STR( N ) vxstr( APP_VER_TXT( N ) )
#define APP_VER VDIG1.VDIG2.VDIG3.VDIG4
#define APP_VER_TXT_LONG( N ) JTAG Boundary Scanner v##N
#define APP_VER_TXT( N ) v##N
#define APP_VER_STR_LONG( N ) vxstr( APP_VER_TXT_LONG( N ) )
#define APP_VER_STR( N ) vxstr( APP_VER_TXT( N ) )
#endif

View File

@@ -5,6 +5,10 @@ file(GLOB_RECURSE JLINK_SOURCES "jlink_jtag/*.c")
file(GLOB_RECURSE FTDI_SOURCES "ftdi_jtag/*.c")
file(GLOB_RECURSE GPIO_SOURCES "linux_gpio_jtag/*.c")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
include_directories(${DIR_MODULES})
include_directories(${DIR_LIBS})
add_compile_definitions(FTD2XX_STATIC)
add_compile_definitions(FTDILIB)
add_library(drivers ${MAIN_SOURCES} ${FTDI_SOURCES} ${GPIO_SOURCES} ${JLINK_SOURCES})

View File

@@ -41,7 +41,7 @@
extern "C" {
#endif
#include "ftd2xx.h"
#include "libftd2xx/ftd2xx.h"
#ifdef __cplusplus
}

View File

@@ -18,10 +18,8 @@ add_custom_target(
DEPENDS prebuild_command_done
)
add_compile_definitions(FTD2XX_STATIC)
add_compile_definitions(FTDILIB)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
include_directories(${DIR_MODULES})
include_directories(${DIR_LIBS})
add_library(jtag_core ${ALL_SOURCES})
add_dependencies(jtag_core prebuild)

View File

@@ -2,6 +2,7 @@ set(SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
file(GLOB_RECURSE ALL_SOURCES "*.c")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
include_directories(${DIR_MODULES})
include_directories(${DIR_LIBS})
add_library(script ${ALL_SOURCES})

File diff suppressed because it is too large Load Diff

View File

@@ -27,6 +27,23 @@
#include "config/bs_defines.h"
typedef int (* CMD_FUNC)( script_ctx * ctx, char * line);
typedef struct cmd_list_
{
const char * command;
CMD_FUNC func;
const char ** help;
}cmd_list;
typedef struct label_list_
{
char * label;
unsigned int file_offset;
}label_list;
extern cmd_list script_commands_list[];
script_ctx *jtagcore_initScript(jtag_core *jc);
script_ctx * init_script(void * app_ctx, unsigned int flags, void * env);
int execute_file_script( script_ctx * ctx, char * filename );