Skip to content

Commit

Permalink
Merge pull request #86 from shuchitak/feature/c_emu_static_lib
Browse files Browse the repository at this point in the history
C Emulator static lib
  • Loading branch information
shuchitak authored Sep 20, 2023
2 parents 6dc55ec + 7285a7c commit b5b90b0
Show file tree
Hide file tree
Showing 18 changed files with 2,670 additions and 2,485 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
lib_src change log
==================

2.4.0
-----

* ADDED: Support for building the core ASRC code in the C emulator as a
library

2.3.0
-----

Expand Down
2 changes: 1 addition & 1 deletion doc/rst/version.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
.. version:: 2.3.0
.. version:: 2.4.0
2 changes: 1 addition & 1 deletion lib_src/module_build_info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 2.3.0
VERSION = 2.4.0

DEPENDENT_MODULES = lib_logging(>=3.1.1) \
lib_xassert(>=4.1.0)
Expand Down
2 changes: 1 addition & 1 deletion settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"title": "SAMPLE RATE CONVERSION",
"project": "lib_src documentation",
"version": "2.3.0"
"version": "2.4.0"
}
9 changes: 4 additions & 5 deletions tests/asrc_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL XCORE_XS3A) OR (${CMAKE_SYSTEM_PROCESSOR
)

set(APP_COMMON_LINK_LIBRARIES
lib_src
lib_src
)

set(APP_LINK_OPTIONS
Expand All @@ -54,14 +54,14 @@ if ((${CMAKE_SYSTEM_PROCESSOR} STREQUAL XCORE_XS3A) OR (${CMAKE_SYSTEM_PROCESSOR
else ()

# Golden ref app
include(${CMAKE_CURRENT_LIST_DIR}/asrc_c_emulator.cmake)
set(TARGET_NAME asrc_golden)
project(${TARGET_NAME} C)

file(GLOB APP_SOURCES ${CMAKE_CURRENT_LIST_DIR}/model/*.c
file(GLOB APP_SOURCES ${CMAKE_CURRENT_LIST_DIR}/model/Main.c
)

set(APP_INCLUDES
${CMAKE_CURRENT_LIST_DIR}/../../lib_src/src/multirate_hifi
${CMAKE_CURRENT_LIST_DIR}/model
)

Expand All @@ -79,7 +79,6 @@ else ()
target_include_directories(${TARGET_NAME} PUBLIC ${APP_INCLUDES})
target_compile_definitions(${TARGET_NAME} PUBLIC ${APP_COMPILE_DEFINITIONS})
target_compile_options(${TARGET_NAME} PRIVATE ${APP_COMPILER_FLAGS})
target_link_libraries(${TARGET_NAME} PUBLIC ${APP_COMMON_LINK_LIBRARIES})
target_link_libraries(${TARGET_NAME} PUBLIC asrc_c_emulator_lib)
unset(TARGET_NAME)
endif()

33 changes: 33 additions & 0 deletions tests/asrc_test/asrc_c_emulator.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
set(LIB_NAME asrc_c_emulator_lib)
add_library(${LIB_NAME} STATIC)

target_sources(${LIB_NAME}
PRIVATE
${CMAKE_CURRENT_LIST_DIR}/model/src/ASRC_wrapper.c
${CMAKE_CURRENT_LIST_DIR}/model/src/ASRC.c
${CMAKE_CURRENT_LIST_DIR}/model/src/FilterDefs.c
${CMAKE_CURRENT_LIST_DIR}/model/src/FIR.c
${CMAKE_CURRENT_LIST_DIR}/model/src/IntArithmetic.c
)

target_include_directories(${LIB_NAME}
PRIVATE
${CMAKE_CURRENT_LIST_DIR}/model/src
${CMAKE_CURRENT_LIST_DIR}/../../lib_src/src/multirate_hifi)

target_include_directories(${LIB_NAME}
PUBLIC
${CMAKE_CURRENT_LIST_DIR}/model/api
)

target_compile_definitions(${LIB_NAME}
PUBLIC
__int64=int64_t
)

target_compile_options(${LIB_NAME}
PRIVATE
-Os
-g
-fPIC
)
260 changes: 0 additions & 260 deletions tests/asrc_test/model/ASRC.h

This file was deleted.

Loading

0 comments on commit b5b90b0

Please sign in to comment.