diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 117adb3..b15ce66 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ Logging change log ================== +3.0.0 +----- + + * CHANGED: Build files updated to support new "xcommon" behaviour in xwaf. + 2.1.1 ----- diff --git a/Jenkinsfile b/Jenkinsfile index ff0752f..8d93eea 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -68,7 +68,7 @@ pipeline { updateViewfiles() } cleanup { - cleanWs() + xcoreCleanSandbox() } } } diff --git a/examples/AN00239/LICENSE.txt b/examples/AN00239/LICENSE.txt index 741cb00..74572d5 100644 --- a/examples/AN00239/LICENSE.txt +++ b/examples/AN00239/LICENSE.txt @@ -1,6 +1,6 @@ Software Release License Agreement -Copyright (c) 2016-2018, XMOS, All rights reserved. +Copyright (c) 2016-2019, XMOS, All rights reserved. BY ACCESSING, USING, INSTALLING OR DOWNLOADING THE XMOS SOFTWARE, YOU AGREE TO BE BOUND BY THE FOLLOWING TERMS. IF YOU DO NOT AGREE TO THESE, DO NOT ATTEMPT TO DOWNLOAD, ACCESS OR USE THE XMOS Software. diff --git a/examples/AN00239/wscript b/examples/AN00239/wscript index bcef129..2121c33 100644 --- a/examples/AN00239/wscript +++ b/examples/AN00239/wscript @@ -1,13 +1,14 @@ -def configure(conf): - conf.load('xwaf.compiler_xcc') +def options(opt): + opt.load('xwaf.xcommon') +def configure(conf): + conf.load('xwaf.xcommon') def build(bld): - bld.env.TARGET_ARCH = 'XCORE-200-EXPLORER' - bld.env.XCC_FLAGS = ['-g', '-report', '-Os', '-DDEBUG_PRINT_ENABLE=1'] - bld.XSCOPE = 'src/config.xscope' - - # Build our program - prog = bld.program( - source=['src/main.xc', 'src/unit.xc'], - depends_on='lib_logging(>=2.1.0)') + bld.do_xcommon() + +def dist(ctx): + ctx.load('xwaf.xcommon') + +def distcheck(ctx): + ctx.load('xwaf.xcommon') diff --git a/examples/app_debug_printf/wscript b/examples/app_debug_printf/wscript index 697319c..2121c33 100644 --- a/examples/app_debug_printf/wscript +++ b/examples/app_debug_printf/wscript @@ -1,12 +1,14 @@ -def configure(conf): - conf.load('xwaf.compiler_xcc') +def options(opt): + opt.load('xwaf.xcommon') +def configure(conf): + conf.load('xwaf.xcommon') def build(bld): - bld.env.TARGET_ARCH = 'SLICEKIT-L16' - bld.env.XCC_FLAGS = ['-DDEBUG_PRINT_ENABLE=1'] + bld.do_xcommon() + +def dist(ctx): + ctx.load('xwaf.xcommon') - # Build our program - prog = bld.program( - source='src/main.xc', - depends_on='lib_logging') +def distcheck(ctx): + ctx.load('xwaf.xcommon') diff --git a/lib_logging/module_build_info b/lib_logging/module_build_info index 1bf6709..9a6d588 100644 --- a/lib_logging/module_build_info +++ b/lib_logging/module_build_info @@ -1,7 +1,14 @@ +VERSION = 3.0.0 + +DEPENDENT_MODULES = + +MODULE_XCC_FLAGS = $(XCC_FLAGS) \ + -Os + OPTIONAL_HEADERS += debug_conf.h -INCLUDE_DIRS = api +EXPORT_INCLUDE_DIRS = api -MODULE_XCC_FLAGS = $(XCC_FLAGS) -Os +INCLUDE_DIRS = $(EXPORT_INCLUDE_DIRS) -VERSION = 2.1.1 +SOURCE_DIRS = src diff --git a/lib_logging/wscript b/lib_logging/wscript deleted file mode 100644 index 9aba3cb..0000000 --- a/lib_logging/wscript +++ /dev/null @@ -1,94 +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) - sources = bld.path.ant_glob('src/*.c') - bld.env.MODULE_XCC_FLAGS = bld.env.XCC_FLAGS + ['-Os'] - bld.module( - source=sources, - includes=module_build_info['INCLUDE_DIRS'], - optional_headers=module_build_info['OPTIONAL_HEADERS'], - version=module_build_info['VERSION']) diff --git a/tests/debug_printf_test/LICENSE.txt b/tests/debug_printf_test/LICENSE.txt index c62854a..d78b1ef 100644 --- a/tests/debug_printf_test/LICENSE.txt +++ b/tests/debug_printf_test/LICENSE.txt @@ -1,6 +1,6 @@ Software Release License Agreement -Copyright (c) 2015-2017, XMOS, All rights reserved. +Copyright (c) 2015-2019, XMOS, All rights reserved. BY ACCESSING, USING, INSTALLING OR DOWNLOADING THE XMOS SOFTWARE, YOU AGREE TO BE BOUND BY THE FOLLOWING TERMS. IF YOU DO NOT AGREE TO THESE, DO NOT ATTEMPT TO DOWNLOAD, ACCESS OR USE THE XMOS Software. diff --git a/tests/debug_printf_test/wscript b/tests/debug_printf_test/wscript index 697319c..2121c33 100644 --- a/tests/debug_printf_test/wscript +++ b/tests/debug_printf_test/wscript @@ -1,12 +1,14 @@ -def configure(conf): - conf.load('xwaf.compiler_xcc') +def options(opt): + opt.load('xwaf.xcommon') +def configure(conf): + conf.load('xwaf.xcommon') def build(bld): - bld.env.TARGET_ARCH = 'SLICEKIT-L16' - bld.env.XCC_FLAGS = ['-DDEBUG_PRINT_ENABLE=1'] + bld.do_xcommon() + +def dist(ctx): + ctx.load('xwaf.xcommon') - # Build our program - prog = bld.program( - source='src/main.xc', - depends_on='lib_logging') +def distcheck(ctx): + ctx.load('xwaf.xcommon')