restructure: code+libs under src/, runtime resources under data/
Separate the two concerns the repo root was mixing:
- src/ — bs/, modules/, libs/ (code + vendored libs)
- data/ — fpga_registry.yaml, probes.yaml, bsdl_files/, bscan_proxies/,
scripts/ (everything the tool reads at runtime, CWD-relative)
- doc/ — kept at the root
CMake: repoint DIR_MODULES/DIR_LIBS and add_subdirectory at src/; emit
the binary at the build/ root (build/bs) via CMAKE_RUNTIME_OUTPUT_DIRECTORY
instead of the nested build/src/bs/. The jtag_core ../../libs path still
resolves since modules and libs moved together.
Runtime default paths now point under data/ (fpga.c, probes.c, script.c
bsdl_files lookup, init.c config.script). Docs (README/tutorial/CLAUDE)
updated for the new layout, src/ module paths, and ./build/bs.
Validated on the IGLOO2/FlashPro: profiles, autoinit, and svf_play all
work run from the repo root.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(BoundaryScanExplorer)
|
||||
|
||||
# Put the built executable at the build/ root (build/bs), not nested under
|
||||
# build/src/bs/ where the source tree would otherwise mirror it.
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
# Digilent JTAG-SMT* backend. The driver dlopen's libdjtg/libdmgr at
|
||||
# runtime and degrades to "no probe" if they're absent, so building it
|
||||
# in costs nothing — default ON. Needs <dlfcn.h>, so UNIX only.
|
||||
@@ -16,8 +20,8 @@ option(BS_ENABLE_DIGILENT
|
||||
|
||||
# script and jtag_core must be the last linked archive for the application to compile
|
||||
set(BS_MODULES script jtag_core)
|
||||
set(DIR_MODULES ${CMAKE_SOURCE_DIR}/modules)
|
||||
set(DIR_LIBS ${CMAKE_SOURCE_DIR}/libs)
|
||||
set(DIR_MODULES ${CMAKE_SOURCE_DIR}/src/modules)
|
||||
set(DIR_LIBS ${CMAKE_SOURCE_DIR}/src/libs)
|
||||
|
||||
# We dive into submodules
|
||||
file(GLOB MODULES_DIRS RELATIVE ${DIR_MODULES} ${DIR_MODULES}/*)
|
||||
@@ -32,10 +36,10 @@ foreach(module ${MODULES_DIRS})
|
||||
list(APPEND BS_MODULES ${module})
|
||||
endif()
|
||||
# We'll compile the module
|
||||
add_subdirectory(modules/${module})
|
||||
add_subdirectory(src/modules/${module})
|
||||
else()
|
||||
message(STATUS "Ignored : ${module}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
add_subdirectory(bs)
|
||||
add_subdirectory(src/bs)
|
||||
|
||||
Reference in New Issue
Block a user