From 9d84debefdf6c0a2d972b32e642e155704bc0df7 Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Tue, 13 Aug 2019 12:44:22 +0100 Subject: [PATCH 01/10] Update to support "xwaf.xcommon" builds --- lib_xua/module_build_info | 87 ++++++++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 29 deletions(-) diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index 2a36dedf..c3221cf1 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -1,37 +1,66 @@ -# You can set flags specifically for your module by using the MODULE_XCC_FLAGS -# variable. So the following -# -# MODULE_XCC_FLAGS = $(XCC_FLAGS) -O3 -# -# specifies that everything in the modules should have the application -# build flags with -O3 appended (so the files will build at -# optimization level -O3). -# -# You can also set MODULE_XCC_C_FLAGS, MODULE_XCC_XC_FLAGS etc.. +VERSION = 0.2.0 -MODULE_XCC_FLAGS = $(XCC_FLAGS) -O3 -DREF_CLK_FREQ=100 -fasm-linenum -fcomment-asm +DEPENDENT_MODULES = lib_logging(>=2.1.0) \ + lib_xassert(>=2.0.0) \ + lib_xud(>=0.1.0) \ + lib_spdif(>=3.0.0) \ + lib_mic_array(>=3.2.0) + +MODULE_XCC_FLAGS = $(XCC_FLAGS) \ + -O3 \ + -DREF_CLK_FREQ=100 \ + -fasm-linenum \ + -fcomment-asm + +# Core +XCC_FLAGS_xua_endpoint0.c = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_xua_ep0_uacreqs.xc = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_dbcalc.xc = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_audioports.c = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_audioports.xc = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue + +# DFU +XCC_FLAGS_dfu.xc = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_flash_interface.c = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue +XCC_FLAGS_flashlib_user.c = $(MODULE_XCC_FLAGS) -Os -mno-dual-issue OPTIONAL_HEADERS += xua_conf.h -VERSION = 0.2.0 +EXPORT_INCLUDE_DIRS = api \ + src/core \ + src/core/audiohub \ + src/core/buffer/ep \ + src/core/endpoint0 \ + src/dfu -DEPENDENT_MODULES = lib_logging(>=2.1.0) lib_xassert(>=2.0.0) lib_xud(>=0.1.0) lib_spdif(>=3.0.0) +INCLUDE_DIRS = $(EXPORT_INCLUDE_DIRS) \ + src/core/buffer/decouple \ + src/core/clocking \ + src/core/mixer \ + src/core/pdm_mics \ + src/core/ports \ + src/core/support \ + src/core/support/powersave \ + src/core/user \ + src/core/user/audiostream \ + src/core/user/hostactive \ + src/midi -INCLUDE_DIRS = api src/* +SOURCE_DIRS = src/core \ + src/core/audiohub \ + src/core/buffer/decouple \ + src/core/buffer/ep \ + src/core/clocking \ + src/core/endpoint0 \ + src/core/mixer \ + src/core/pdm_mics \ + src/core/ports \ + src/core/support \ + src/core/support/powersave \ + src/core/user/audiostream \ + src/core/user/hostactive \ + src/core/xuduser \ + src/dfu \ + src/midi -#ignore host dir -SOURCE_DIRS = src/* - -# The following file specific flags are not automatically kept in sync with the wscript file -# Core EXCLUDE_FILES += descriptors_2.rst -XCC_FLAGS_xua_endpoint0.c = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_xua_ep0_uacreqs.xc = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_dbcalc.xc = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_audioports.c = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_audioports.xc = -Os -mno-dual-issue $(XCC_FLAGS) - -# DFU -XCC_FLAGS_dfu.xc = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_flash_interface.c = -Os -mno-dual-issue $(XCC_FLAGS) -XCC_FLAGS_flashlib_user.c = -Os -mno-dual-issue $(XCC_FLAGS) From f1ba1dace8595dfbb7e20e0fb788336373fd37e6 Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Tue, 13 Aug 2019 12:46:33 +0100 Subject: [PATCH 02/10] Bump version --- CHANGELOG.rst | 5 ++ lib_xua/module_build_info | 2 +- lib_xua/wscript | 109 -------------------------------------- 3 files changed, 6 insertions(+), 110 deletions(-) delete mode 100644 lib_xua/wscript diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1f871966..75003253 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ lib_xua Change Log ================== +0.3.0 +----- + + * CHANGED: Build files updated to support new "xcommon" behaviour in xwaf. + 0.2.0 ----- diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index c3221cf1..2935f960 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -1,4 +1,4 @@ -VERSION = 0.2.0 +VERSION = 0.3.0 DEPENDENT_MODULES = lib_logging(>=2.1.0) \ lib_xassert(>=2.0.0) \ diff --git a/lib_xua/wscript b/lib_xua/wscript deleted file mode 100644 index 76f039b3..00000000 --- a/lib_xua/wscript +++ /dev/null @@ -1,109 +0,0 @@ -import os.path - - -def create_list_from_make_flag(bld, list_of_flags): - for i, flag in enumerate(list_of_flags): - if flag.startswith('$('): - for f in bld.env[flag.strip('$()')]: - list_of_flags.insert(i, f) - i += 1 - list_of_flags.remove(flag) - return list_of_flags - - -def create_list_of_strings(whitespace_seperated_list): - list_of_strings = whitespace_seperated_list.split(' ') - for item in list_of_strings: - item = "'{}'".format(item) - return list_of_strings - - -def read_module_build_info(bld): - with open(os.path.join(bld.path.abspath(), 'module_build_info')) as file: - module_build_info = {} - for line in file.readlines(): - line = line.strip() - if line and not line.startswith('#'): - key, value = line.split('=', 1) - module_build_info[key.strip(' +')] = value.strip() - - try: - module_build_info['OPTIONAL_HEADERS'] = ( - create_list_of_strings(module_build_info['OPTIONAL_HEADERS'])) - except KeyError: - pass - - try: - module_build_info['DEPENDENT_MODULES'] = ( - create_list_of_strings(module_build_info['DEPENDENT_MODULES'])) - except KeyError: - pass - - try: - module_build_info['MODULE_XCC_FLAGS'] = ( - create_list_from_make_flag(bld, - create_list_of_strings(module_build_info['MODULE_XCC_FLAGS']))) - except KeyError: - pass - - try: - module_build_info['MODULE_XCC_XC_FLAGS'] = ( - create_list_from_make_flag(bld, - create_list_of_strings(module_build_info['MODULE_XCC_XC_FLAGS']))) - except KeyError: - pass - - try: - module_build_info['MODULE_XCC_C_FLAGS'] = ( - create_list_from_make_flag(bld, - create_list_of_strings(module_build_info['MODULE_XCC_C_FLAGS']))) - except KeyError: - pass - - try: - module_build_info['MODULE_XCC_CPP_FLAGS'] = ( - create_list_from_make_flag(bld, - create_list_of_strings(module_build_info['MODULE_XCC_CPP_FLAGS']))) - except KeyError: - pass - - try: - module_build_info['MODULE_XCC_ASM_FLAGS'] = ( - create_list_from_make_flag(bld, - create_list_of_strings(module_build_info['MODULE_XCC_ASM_FLAGS']))) - except KeyError: - pass - - try: - module_build_info['INCLUDE_DIRS'] = ( - create_list_of_strings(module_build_info['INCLUDE_DIRS'])) - except KeyError: - pass - - return module_build_info - - -def use_module(bld): - module_build_info = read_module_build_info(bld) - source = bld.path.ant_glob(['src/**/*.xc', 'src/**/*.c', 'src/**/*.S'], - excl=['**/descriptors_2.rst']) - bld.env.MODULE_XCC_FLAGS = module_build_info['MODULE_XCC_FLAGS'] - - # The following file specific flags are not automatically kept in sync with the module_build_info file - # Core - bld.env['XCC_FLAGS_endpoint0.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_xua_ep0_uacreqs.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_dbcalc.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_audioports.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_audioports.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - # DFU - bld.env['XCC_FLAGS_dfu.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_flash_interface.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - bld.env['XCC_FLAGS_flashlib_user.c'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue'] - - bld.module( - source=source, - depends_on=module_build_info['DEPENDENT_MODULES'], - includes=module_build_info['INCLUDE_DIRS'], - optional_headers=module_build_info['OPTIONAL_HEADERS'], - version=module_build_info['VERSION']) \ No newline at end of file From 8d3cc039f7896e90bd7c0f60a3b2f176c80bc7c6 Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Tue, 13 Aug 2019 15:04:41 +0100 Subject: [PATCH 03/10] Update dependency requirements --- CHANGELOG.rst | 6 ++++++ lib_xua/module_build_info | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 75003253..5e0532e6 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,12 @@ lib_xua Change Log * CHANGED: Build files updated to support new "xcommon" behaviour in xwaf. + * Changes to dependencies: + + - lib_dsp: Added dependency 5.0.0 + + - lib_mic_array: Added dependency 4.0.0 + 0.2.0 ----- diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index 2935f960..2a96c9f5 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -1,10 +1,10 @@ VERSION = 0.3.0 -DEPENDENT_MODULES = lib_logging(>=2.1.0) \ - lib_xassert(>=2.0.0) \ - lib_xud(>=0.1.0) \ - lib_spdif(>=3.0.0) \ - lib_mic_array(>=3.2.0) +DEPENDENT_MODULES = lib_logging(>=3.0.0) \ + lib_xassert(>=4.0.0) \ + lib_xud(>=0.2.0) \ + lib_spdif(>=4.0.0) \ + lib_mic_array(>=4.0.0) MODULE_XCC_FLAGS = $(XCC_FLAGS) \ -O3 \ From a7a577acad6411f60ffef4331bbfe437b056753e Mon Sep 17 00:00:00 2001 From: Sam Chesney Date: Wed, 21 Aug 2019 18:37:07 +0100 Subject: [PATCH 04/10] Update cleanup call --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5e404793..044d9bfe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -133,7 +133,7 @@ pipeline { } post { cleanup { - cleanWs() + xcoreCleanSandbox() } } } From 244232d3e1c65b8ac01117883b3a3b77681af9f1 Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Thu, 29 Aug 2019 10:01:03 +0100 Subject: [PATCH 05/10] Change view to lib_xua_xwaf_xcommon --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 044d9bfe..85251dcd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,7 +6,8 @@ pipeline { agent none environment { REPO = 'lib_xua' - VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}" + VIEW = 'lib_xua_xwaf_xcommon' + //VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}" } triggers { /* Trigger this Pipeline on changes to the repos dependencies From eafcc89a6b9943c15a1bb57ad84a9dfcda5bf192 Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Thu, 5 Sep 2019 15:52:51 +0100 Subject: [PATCH 06/10] Change XUA to use new mic array API --- lib_xua/src/core/pdm_mics/pdm_mic.xc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib_xua/src/core/pdm_mics/pdm_mic.xc b/lib_xua/src/core/pdm_mics/pdm_mic.xc index 2221d1f7..2bb37bff 100644 --- a/lib_xua/src/core/pdm_mics/pdm_mic.xc +++ b/lib_xua/src/core/pdm_mics/pdm_mic.xc @@ -88,7 +88,7 @@ void XUA_PdmBuffer(streaming chanend c_ds_output[2], chanend c_audio) fir_coefs[6] = g_third_stage_div_12_fir; //dcc = {MIC_ARRAY_MAX_FRAME_SIZE_LOG2, 1, 0, 0, decimationfactor, fir_coefs[decimationfactor/2], 0, 0, DECIMATOR_NO_FRAME_OVERLAP, 2}; - dcc.frame_size_log2 = MIC_ARRAY_MAX_FRAME_SIZE_LOG2; + dcc.len = MIC_ARRAY_MAX_FRAME_SIZE_LOG2; dcc.apply_dc_offset_removal = 1; dcc.index_bit_reversal = 0; dcc.windowing_function = null; @@ -107,6 +107,7 @@ void XUA_PdmBuffer(streaming chanend c_ds_output[2], chanend c_audio) dc[0].mic_gain_compensation[2]=0; dc[0].mic_gain_compensation[3]=0; dc[0].channel_count = 4; + dc[0].async_interface_enabled = 0; dc[1].dcc = &dcc; dc[1].data = mic_decimator_fir_data[4]; dc[1].mic_gain_compensation[0]=0; @@ -114,6 +115,7 @@ void XUA_PdmBuffer(streaming chanend c_ds_output[2], chanend c_audio) dc[1].mic_gain_compensation[2]=0; dc[1].mic_gain_compensation[3]=0; dc[1].channel_count = 4; + dc[0].async_interface_enabled = 0; mic_array_decimator_configure(c_ds_output, decimatorCount, dc); From a682ed7d19438478920f2621f53d4e17a84477be Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Thu, 5 Sep 2019 16:03:31 +0100 Subject: [PATCH 07/10] Update copyright --- lib_xua/src/core/pdm_mics/pdm_mic.xc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/src/core/pdm_mics/pdm_mic.xc b/lib_xua/src/core/pdm_mics/pdm_mic.xc index 2bb37bff..b853f2d0 100644 --- a/lib_xua/src/core/pdm_mics/pdm_mic.xc +++ b/lib_xua/src/core/pdm_mics/pdm_mic.xc @@ -1,4 +1,4 @@ -// Copyright (c) 2015-2018, XMOS Ltd, All rights reserved +// Copyright (c) 2015-2019, XMOS Ltd, All rights reserved #include "xua.h" From 508c62af000d766fc66268ccb78b130d75ea1460 Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Thu, 5 Sep 2019 16:34:59 +0100 Subject: [PATCH 08/10] Keep version on 0.2.0 --- CHANGELOG.rst | 16 +++++----------- lib_xua/module_build_info | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5e0532e6..a113f942 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,17 +1,6 @@ lib_xua Change Log ================== -0.3.0 ------ - - * CHANGED: Build files updated to support new "xcommon" behaviour in xwaf. - - * Changes to dependencies: - - - lib_dsp: Added dependency 5.0.0 - - - lib_mic_array: Added dependency 4.0.0 - 0.2.0 ----- @@ -24,6 +13,7 @@ lib_xua Change Log * CHANGE: Moved to lib_spdif (from module_spdif_tx & module_spdif_rx) * CHANGE: Define NUM_PDM_MICS renamed to XUA_NUM_PDM_MICS * CHANGE: Define NO_USB renamed to XUA_USB_EN + * CHANGE: Build files updated to support new "xcommon" behaviour in xwaf. * RESOLVED: wChannelConfig in UAC1 descriptor set according to output channel count * RESOLVED: Indexing of ADAT channel strings (#18059) @@ -35,6 +25,10 @@ lib_xua Change Log - lib_xassert: Added dependency 3.0.1 + - lib_dsp: Added dependency 5.0.0 + + - lib_mic_array: Added dependency 4.0.0 + 0.1.2 ----- diff --git a/lib_xua/module_build_info b/lib_xua/module_build_info index 2a96c9f5..ce383df3 100644 --- a/lib_xua/module_build_info +++ b/lib_xua/module_build_info @@ -1,4 +1,4 @@ -VERSION = 0.3.0 +VERSION = 0.2.0 DEPENDENT_MODULES = lib_logging(>=3.0.0) \ lib_xassert(>=4.0.0) \ From eb1ca1eb8d99ea06643766e4235ba5f9391c4d3b Mon Sep 17 00:00:00 2001 From: Oscar Bailey Date: Fri, 6 Sep 2019 09:13:09 +0100 Subject: [PATCH 09/10] Update CHANGELOG --- CHANGELOG.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a113f942..2a114f45 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -21,14 +21,14 @@ lib_xua Change Log * Changes to dependencies: - - lib_spdif: Added dependency 3.1.0 - - - lib_xassert: Added dependency 3.0.1 - - lib_dsp: Added dependency 5.0.0 - lib_mic_array: Added dependency 4.0.0 + - lib_spdif: Added dependency 3.1.0 + + - lib_xassert: Added dependency 3.0.1 + 0.1.2 ----- From a1aca010fb95d193506f846ac86c6ce808c37406 Mon Sep 17 00:00:00 2001 From: shuchitak <38428600+shuchitak@users.noreply.github.com> Date: Fri, 13 Sep 2019 10:20:23 +0100 Subject: [PATCH 10/10] Update Jenkinsfile --- Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 85251dcd..044d9bfe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -6,8 +6,7 @@ pipeline { agent none environment { REPO = 'lib_xua' - VIEW = 'lib_xua_xwaf_xcommon' - //VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}" + VIEW = "${env.JOB_NAME.contains('PR-') ? REPO+'_'+env.CHANGE_TARGET : REPO+'_'+env.BRANCH_NAME}" } triggers { /* Trigger this Pipeline on changes to the repos dependencies