Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributions related to Medium Article #11

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/InterfaceSWIG.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: SWIG and CMake

on: workflow_dispatch

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install swig
run: sudo apt install swig
- name: build using CMake
run: |
mkdir -p cmake
cd cmake
cmake -S ../lib_jtag_core -B .
cmake --build .
9 changes: 8 additions & 1 deletion .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: C/C++ CI

on: [push]
on:
push:
paths-ignore:
- '.github/workflows/*.yml'
workflow_dispatch:

defaults:
run:
Expand All @@ -14,3 +18,6 @@ jobs:
- uses: actions/checkout@v1
- name: make
run: make
- name: test
working-directory: ./lib_jtag_core/test/linux
run: make
11 changes: 11 additions & 0 deletions lib_jtag_core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# CMakeLists files in this project can
# refer to the root source directory of the project as ${STREETVIEWJTAG_SOURCE_DIR} and
# to the root binary directory of the project as ${STREETVIEWJTAG_BINARY_DIR}.
cmake_minimum_required (VERSION 2.8.11)
project (STREETVIEWJTAG)

# Recurse into the "build", "src" and "test" subdirectories.
add_subdirectory (build)
add_subdirectory (src)
add_subdirectory (test)

5 changes: 5 additions & 0 deletions lib_jtag_core/build/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cmake_minimum_required (VERSION 2.8.11)

# Recurse into the "linux" subdirectory.
add_subdirectory (linux)

17 changes: 17 additions & 0 deletions lib_jtag_core/build/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cmake_minimum_required (VERSION 2.8.11)

# Build shared library in place for legacy support
add_custom_target(
libjtag_core ALL
COMMAND make all
COMMENT "Building shared library using legacy support"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

add_custom_target(
libjtag_static
COMMAND make libjtag_core.a
COMMENT "Building static library using legacy support"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

2 changes: 1 addition & 1 deletion lib_jtag_core/build/linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ clean:
rm -rf *.o

mrproper: clean
rm -rf $(EXEC)
rm -rf $(EXEC) libjtag_core.a

.PHONY: clean mrproper
11 changes: 11 additions & 0 deletions lib_jtag_core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# build a reduced library that supports BSDL parsing only
set(JTAG_BSDL_SRC
bsdl_parser/jtag_bsdl.c
bsdl_parser/bsdl_strings.c
natsort/strnatcmp.c
dbg_logs.c
)

add_library(jtag_bsdl ${JTAG_BSDL_SRC})
set_property(TARGET jtag_bsdl PROPERTY POSITION_INDEPENDENT_CODE ON)

Loading