USB 16x8 error

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
genap
Experienced Member
Posts: 99
Joined: Sat Aug 31, 2013 11:23 pm

USB 16x8 error

Post by genap »

I have a working design with 16 IN and 16 OUT usb channels on xs1_u8.
Definitions are:
XCC_FLAGS_tdm16 = $(BUILD_FLAGS) -DSPDIF_TX=0 -DI2S_MODE_TDM=1 -DI2S_CHANS_ADC=16 -DMAX_FREQ=48000 -DI2S_CHANS_DAC=16 -DNUM_USB_CHAN_OUT=16 -DNUM_USB_CHAN_IN=16

I am trying to decrease OUT amount to 8, using the following configuration:
XCC_FLAGS_tdm168 = $(BUILD_FLAGS) -DSPDIF_TX=0 -DI2S_MODE_TDM=1 -DI2S_CHANS_ADC=16 -DMAX_FREQ=48000 -DI2S_CHANS_DAC=8 -DNUM_USB_CHAN_OUT=8 -DNUM_USB_CHAN_IN=16

The 16x16 builds fine, but 16x8 gives me an error 'Undefined reference to 'p_i2s_dac' for a module_usb_audio / audio.xc

What could be wrong?

Thank you.


User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

This should be OK and supported by the reference design. Can you post the full error?
genap
Experienced Member
Posts: 99
Joined: Sat Aug 31, 2013 11:23 pm

Post by genap »

This is the error:

Code: Select all

E:/Aprojects/J062_axio/J062_1x_xmos/J062_11/module_usb_audio/audio.xc: Error: Undefined reference to 'p_i2s_dac'
xmake[1]: *** [bin/tdm16/J062_11_tdm16.xe] Error 1
xmake: *** [bin/tdm16/J062_11_tdm16.xe] Error 2
My design is based on a reference design sw_usb_audio-6.12.6rc3.
USB 16x16 version is implemented in multiple products and working fine. So I just want to modify it for 16x8.
I've tried the 6.15.2 reference design, it builds for 16x16 and 16x8 without errors.
The problem is that I have quite a few modifications in a current one and to update will be painful.

Thank you.
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Tricky one because the fix is to use the latest version... However I understand changing is painful.

The key here will be to check the declaration of on p_i2s_dac in main.xc:

Code: Select all

on tile[AUDIO_IO_TILE] : buffered out port:32 p_i2s_dac[I2S_WIRES_DAC] =
..is obviously being removed by the compiler so the linker can't resolve the symbol. I would check I2S_WIRES_DAC and it's definition in devicedefines.h. Could be that it is being set to zero (although I would have thought it would be the number of channels divided by channels per frame. If not, set this accordingly.
genap
Experienced Member
Posts: 99
Joined: Sat Aug 31, 2013 11:23 pm

Post by genap »

Thank you infiniteimprobability,

When I set I2S_WIRES_DAC to 1 in devicedefines.h (as for TDM8), it compiles OK.
So you are right, it set to 0 somewhere.
And it seems like the build flags from the makefile are not taken into consideration.

I haven't tested it yet, but hope it will work.

Thank you again.
Post Reply