Merge pull request #1 from xmos/master

Update xua_lite branch with changes in master
This commit is contained in:
oscarbailey-xmos
2019-02-28 17:00:10 +00:00
committed by GitHub
12 changed files with 179 additions and 36 deletions

View File

@@ -15,11 +15,14 @@ lib_xua Change Log
* RESOLVED: wChannelConfig in UAC1 descriptor set according to output channel
count
* RESOLVED: Indexing of ADAT channel strings (#18059)
* RESOLVED: Rebooting device fails when PLL config "not reset" bit is set
* Changes to dependencies:
- lib_spdif: Added dependency 3.0.0
- lib_xassert: Added dependency 3.0.1
0.1.2
-----

61
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,61 @@
@Library('xmos_jenkins_shared_library@master') _
pipeline {
agent {
label 'x86&&macOS&&Apps'
}
environment {
VIEW = 'xua'
REPO = 'lib_xua'
}
options {
skipDefaultCheckout()
}
stages {
stage('Get view') {
steps {
prepareAppsSandbox("${VIEW}", "${REPO}")
}
}
stage('Library checks') {
steps {
xcoreLibraryChecks("${REPO}")
}
}
stage('Tests') {
steps {
runXmostest("${REPO}", 'tests')
}
}
stage('Host builds') {
steps {
dir("${REPO}") {
dir("${REPO}") {
dir('host') {
dir('xmosdfu') {
sh 'make -f Makefile.OSX64'
}
}
}
}
}
}
stage('xCORE builds') {
steps {
dir("${REPO}") {
xcoreAllAppNotesBuild('examples')
dir("${REPO}") {
runXdoc('doc')
}
}
}
}
}
post {
success {
updateViewfiles()
}
cleanup {
cleanWs()
}
}
}

View File

@@ -1,6 +1,6 @@
Software Release License Agreement
Copyright (c) 2011-2018, XMOS, All rights reserved.
Copyright (c) 2011-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.

View File

@@ -1,6 +1,6 @@
Software Release License Agreement
Copyright (c) 2017-2018, XMOS, All rights reserved.
Copyright (c) 2017-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.

View File

@@ -5,6 +5,7 @@
#if __XC__
#include "xccompat.h"
#include "xs1.h"
#if XUA_USB_EN
#include "dfu_interface.h"

View File

@@ -9,18 +9,21 @@
#
# You can also set MODULE_XCC_C_FLAGS, MODULE_XCC_XC_FLAGS etc..
MODULE_XCC_FLAGS = $(XCC_FLAGS) -O3 -DREF_CLK_FREQ=100 -fasm-linenum -fcomment-asm -fsubword-select
MODULE_XCC_FLAGS = $(XCC_FLAGS) -O3 -DREF_CLK_FREQ=100 -fasm-linenum -fcomment-asm
OPTIONAL_HEADERS += xua_conf.h
VERSION = 0.2.0
DEPENDENT_MODULES = lib_logging(>=2.1.0) lib_xud(>=0.1.0) lib_spdif(>=3.0.0)
DEPENDENT_MODULES = lib_logging(>=2.1.0) lib_xassert(>=2.0.0) lib_xud(>=0.1.0) lib_spdif(>=3.0.0)
INCLUDE_DIRS = api src/*
#ignore host dir
SOURCE_DIRS = src/*
#core
# 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)
@@ -28,9 +31,7 @@ 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
# 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)

View File

@@ -1,3 +1,4 @@
# Copyright (c) 2015-2018, XMOS Ltd, All rights reserved
def genstrings(outputChanCount, chanString, portString, structureString, adc_dac):

View File

@@ -2819,7 +2819,7 @@ unsigned char cfgDesc_Audio1[] =
#endif
#ifdef USB_CONTROL_DESCS
/* Standard DFU class Interface descriptor */
/* Control interface descriptor */
0x09, /* 0 bLength : Size of this descriptor, in bytes. (field size 1 bytes) */
0x04, /* 1 bDescriptorType : INTERFACE descriptor. (field size 1 bytes) */
(OUTPUT_INTERFACES_A1 + INPUT_INTERFACES_A1 + 1), /* 2 bInterfaceNumber */

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2011-2018, XMOS Ltd, All rights reserved
// Copyright (c) 2011-2019, XMOS Ltd, All rights reserved
#include <xs1.h>
#include <platform.h>
#include <print.h>
@@ -12,7 +12,7 @@
#if (XUD_SERIES_SUPPORT == 4)
#include "xs2_su_registers.h"
#define XS2_SU_PERIPH_USB_ID 0x1
#define PLL_MASK 0x7FFFFFFF
#define PLL_MASK 0x3FFFFFFF
#else
#define PLL_MASK 0xFFFFFFFF
#endif

View File

@@ -1,35 +1,109 @@
def use_module(bld):
bld.env.XCC_FLAGS = bld.env.XCC_FLAGS + [
'-O3', '-DREF_CLK_FREQ=100', '-fasm-linenum', '-fcomment-asm',
'-fsubword-select', '-DXUD_FULL_PIDTABLE=1'
]
source = bld.path.ant_glob(
[
'src/**/*.xc', 'src/**/*.c', 'src/**/*.S'
],
excl=[
'**/descriptors_2.rst'
])
depends_on = [
'lib_logging(>=2.0.0)', 'lib_xassert(>=2.0.0)', 'lib_xud(>=1.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_audiorequests.xc'] = bld.env.XCC_FLAGS + ['-Os', '-mno-dual-issue']
bld.env['XCC_FLAGS_flashlib_user.c'] = 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=depends_on,
includes=['api'],
optional_headers='xua_conf.h',
version='1.0.0')
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'])

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python2.7
# Copyright (c) 2018, XMOS Ltd, All rights reserved
import xmostest
import os.path

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python
# Copyright (c) 2018, XMOS Ltd, All rights reserved
import xmostest
def runtest_one_config(env, format, i2s_role, num_chans_in, num_chans_out, sample_rate):