dirs refactoring
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(BoundaryScanExplorer)
|
||||
|
||||
add_subdirectory(libs/lib_jtag_core)
|
||||
add_subdirectory(libs/os_interface)
|
||||
add_subdirectory(libs/natsort)
|
||||
add_subdirectory(libs/script)
|
||||
add_subdirectory(libs/drivers)
|
||||
add_subdirectory(libs/bus_over_jtag)
|
||||
add_subdirectory(libs/bsdl_parser)
|
||||
add_subdirectory(app)
|
||||
# jtag_core must be the last linked archive for the application to compile
|
||||
set(BS_MODULES jtag_core)
|
||||
|
||||
# We dive into submodules
|
||||
file(GLOB MODULES_DIRS RELATIVE ${CMAKE_SOURCE_DIR}/modules ${CMAKE_SOURCE_DIR}/modules/*)
|
||||
foreach(module ${MODULES_DIRS})
|
||||
set(module_path "${CMAKE_SOURCE_DIR}/modules/${module}")
|
||||
|
||||
# checks if it is a sub-directory and if it contains a cmake file
|
||||
if(IS_DIRECTORY ${module_path} AND EXISTS "${module_path}/CMakeLists.txt")
|
||||
message(STATUS "Submodule : ${module}")
|
||||
if(NOT ${module} STREQUAL jtag_core)
|
||||
list(APPEND BS_MODULES ${module})
|
||||
endif()
|
||||
add_subdirectory(modules/${module})
|
||||
else()
|
||||
message(STATUS "Ignored : ${module}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
add_subdirectory(app)
|
||||
|
||||
@@ -8,9 +8,9 @@ add_executable(
|
||||
)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../libs)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../modules)
|
||||
|
||||
# linking configuration
|
||||
target_link_libraries(
|
||||
bs PRIVATE script jtag_core bsdl_parser bus_over_jtag drivers os_interface natsort readline ncurses
|
||||
bs PRIVATE ${BS_MODULES} readline ncurses
|
||||
)
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _CMD_EXIT_H
|
||||
#define _CMD_EXIT_H
|
||||
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
extern const char cmd_exit_help[];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _CMD_HELP_H
|
||||
#define _CMD_HELP_H
|
||||
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
int cmd_help(jtag_core *jc, int argc, char *argv[]);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _LIST_PROBES_H
|
||||
#define _LIST_PROBES_H
|
||||
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
extern const char cmd_list_probes_help[];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _CMDS_SCAN_H
|
||||
#define _CMDS_SCAN_H
|
||||
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
extern const char cmd_scan_help[];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _SELECT_PROBE_H
|
||||
#define _SELECT_PROBE_H
|
||||
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
extern const char cmd_select_probe_help[];
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _UTILS_H
|
||||
#define _UTILS_H
|
||||
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#define MAX_LINE 1024
|
||||
#define MAX_ARGS 16
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
#include "common.h"
|
||||
#include "args.h"
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "drivers/drv_loader.h"
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_loader.h"
|
||||
#include "bsdl_strings.h"
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#include "os_interface/os_interface.h"
|
||||
|
||||
#include "lib_jtag_core/dbg_logs.h"
|
||||
#include "jtag_core/dbg_logs.h"
|
||||
#define DEBUG 1
|
||||
|
||||
char *string_upper(char *str)
|
||||
@@ -26,8 +26,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "drivers/drv_loader.h"
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_loader.h"
|
||||
#include "bsdl_strings.h"
|
||||
@@ -28,14 +28,14 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "drivers/drv_loader.h"
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
#include "drivers/drivers_list.h"
|
||||
|
||||
#include "lib_jtag_core/dbg_logs.h"
|
||||
#include "jtag_core/dbg_logs.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// I2C Over JTAG API
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
#include "drivers/drv_loader.h"
|
||||
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
#include "drivers/drv_loader.h"
|
||||
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
#include "drivers/drv_loader.h"
|
||||
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
#include "drv_loader.h"
|
||||
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
|
||||
#include "drv_loader.h"
|
||||
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
#include "drivers_list.h"
|
||||
|
||||
#include "lib_jtag_core/dbg_logs.h"
|
||||
#include "jtag_core/dbg_logs.h"
|
||||
|
||||
int GetDrvInfo(void * jc_ctx,unsigned long infotype,void * returnvalue,const char * drv_id,const char * drv_desc,drv_ptr * drv_func)
|
||||
{
|
||||
@@ -32,10 +32,10 @@
|
||||
#endif
|
||||
|
||||
#include "../drv_loader.h"
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
#include "lib_jtag_core/dbg_logs.h"
|
||||
#include "jtag_core/dbg_logs.h"
|
||||
#include "os_interface/os_interface.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -26,12 +26,12 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include "../drv_loader.h"
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
#include "lib_jtag_core/dbg_logs.h"
|
||||
#include "jtag_core/dbg_logs.h"
|
||||
|
||||
#if defined(WIN32)
|
||||
// Compiling on Windows
|
||||
@@ -35,14 +35,14 @@
|
||||
#endif
|
||||
|
||||
#include "../drv_loader.h"
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
#include "os_interface/os_interface.h"
|
||||
|
||||
#include "lib_jtag_core/dbg_logs.h"
|
||||
#include "jtag_core/dbg_logs.h"
|
||||
|
||||
char linux_gpio_base[512];
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
#endif
|
||||
|
||||
#include "../drv_loader.h"
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
|
||||
#include "lib_jtag_core/dbg_logs.h"
|
||||
#include "jtag_core/dbg_logs.h"
|
||||
|
||||
#if defined(WIN32)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
set(SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(CONFIG_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../config/")
|
||||
set(LIB_FTD2XXX "${CMAKE_CURRENT_SOURCE_DIR}/../libftd2xx/libftd2xx.a")
|
||||
set(LIB_FTD2XXX "${CMAKE_CURRENT_SOURCE_DIR}/../../libs/libftd2xx/libftd2xx.a")
|
||||
|
||||
file(GLOB_RECURSE ALL_SOURCES "*.c")
|
||||
|
||||
@@ -54,7 +54,7 @@ jtag_core * jtagcore_init()
|
||||
/*
|
||||
jc->envvar = (void*)initEnv(NULL, NULL);
|
||||
|
||||
jtagcore_setEnvVar( jc, "LIBVERSION", "v"LIB_JTAG_CORE_VERSION);
|
||||
jtagcore_setEnvVar( jc, "LIBVERSION", "v"jtag_core_VERSION);
|
||||
|
||||
sctx = jtagcore_initScript(jc);
|
||||
|
||||
@@ -32,10 +32,10 @@
|
||||
#define MAX_PATH 256
|
||||
|
||||
#include "drivers/drv_loader.h"
|
||||
#include "lib_jtag_core/jtag_core_internal.h"
|
||||
#include "jtag_core/jtag_core_internal.h"
|
||||
#include "script.h"
|
||||
#include "lib_jtag_core/jtag_core.h"
|
||||
#include "lib_jtag_core/version.h"
|
||||
#include "jtag_core/jtag_core.h"
|
||||
#include "jtag_core/version.h"
|
||||
|
||||
#include "bsdl_parser/bsdl_loader.h"
|
||||
#include "os_interface/os_interface.h"
|
||||
Reference in New Issue
Block a user