Issue with Parsing Declaration in xk-audio-316-mc.xn File Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
masaikemlol
Member
Posts: 8
Joined: Thu Jul 18, 2024 4:10 am

Issue with Parsing Declaration in xk-audio-316-mc.xn File

Post by masaikemlol »

Hi! I am currently working on a project using the xCORE.ai Audio MC Board and encountered an issue during the compilation process. The specific error message I received is as follows:

Code: Select all

Analyzing sw_pll_common.c
.././src/core/xk-audio-316-mc.xn:10 Error: XN11148 Failed to parse declaration "tileref tile[2]".
xmake[1]: *** [.build_Pawpaw_2i2o2msxxxx/_l_sw_pll/src/sw_pll_common.c.pca.xml.decouple] Error 1
xmake: *** [analyze] Error 2
The error appears to be related to the tileref tile[2] declaration in the xk-audio-316-mc.xn file. I have ensured that all related files are consistent and properly configured, yet the issue persists.
Does anyone have any idea what is wrong? The following is the xn configurtion file:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<Network xmlns="http://www.xmos.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.xmos.com http://www.xmos.com">
    <Type>
        Board
    </Type>
    <Name>
        xcore.ai MC Audio Board
    </Name>
    <Declarations>
        <Declaration>
            tileref tile[2]
        </Declaration>
    </Declarations>
    <Packages>
        <Package id="0" Type="XS3-UnA-1024-TQ128">
            <Nodes>
                <Node Id="0" InPackageId="0" Type="XS3-L16A-1024" Oscillator="24MHz" SystemFrequency="600MHz" ReferenceFrequency="100MHz">
                    <Boot>
                        <Source Location="bootFlash" />
                    </Boot>
                    <Tile Number="0" Reference="tile[0]">
                        <Port Location="XS1_PORT_1B" Name="PORT_SQI_CS" />
                        <Port Location="XS1_PORT_1C" Name="PORT_SQI_SCLK" />
                        <Port Location="XS1_PORT_4B" Name="PORT_SQI_SIO" />
                        <!-- Audio Ports -->
                        <Port Location="XS1_PORT_1L" Name="PORT_MCLK_IN" />
                        <Port Location="XS1_PORT_1N" Name="PORT_I2S_LRCLK" />
                        <Port Location="XS1_PORT_1O" Name="PORT_I2S_BCLK" />
                        <Port Location="XS1_PORT_1M" Name="PORT_I2S_DAC0" />
                        <Port Location="XS1_PORT_1P" Name="PORT_I2S_ADC0" />
                        <Port Location="XS1_PORT_1K" Name="PORT_DSD_DAC0" />
                        <Port Location="XS1_PORT_1J" Name="PORT_DSD_DAC1" />
                        <Port Location="XS1_PORT_1O" Name="PORT_DSD_CLK" />
                        <Port Location="XS1_PORT_1A" Name="PORT_SPDIF_OUT" />
                        <Port Location="XS1_PORT_1B" Name="PORT_PLL_REF" />
                    </Tile>
                    <Tile Number="1" Reference="tile[1]">
                        <!-- Audio Ports -->
                        <Port Location="XS1_PORT_1A" Name="PORT_MIDI_OUT" />
                        <Port Location="XS1_PORT_1B" Name="PORT_MIDI_IN" />
                        <Port Location="XS1_PORT_1G" Name="PORT_MCLK_IN2" />
                    </Tile>
                </Node>
            </Nodes>
        </Package>
    </Packages>
    <Nodes>
        <Node Id="2" Type="device:" RoutingId="0x8000">
            <Service Id="0" Proto="xscope_host_data(chanend c);">
                <Chanend Identifier="c" end="3" />
            </Service>
        </Node>
    </Nodes>
    <Links>
        <Link Encoding="2wire" Delays="5clk" Flags="XSCOPE">
            <LinkEndpoint NodeId="0" Link="XL0" />
            <LinkEndpoint NodeId="2" Chanend="1" />
        </Link>
    </Links>
    <ExternalDevices>
        <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" PageSize="256" SectorSize="4096" NumPages="16384">
            <Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS" />
            <Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK" />
            <Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO" />
        </Device>
    </ExternalDevices>
    <JTAGChain>
        <JTAGDevice NodeId="0" />
    </JTAGChain>
</Network>
Any help or pointers would be greatly appreciated
View Solution
danielp
Member
Posts: 8
Joined: Tue Jul 16, 2024 9:52 am
Location: Bristol, UK

Post by danielp »

I was able to reproduce this XN11148 error with a simple example using your XN file and noticed that you have different line-breaks to the one in the sw_usb_audio source repository.

In xk-audio-316-mc.xn, please change

Code: Select all

        <Declaration>
            tileref tile[2]
        </Declaration>
to

Code: Select all

        <Declaration>tileref tile[2]</Declaration>
This change in the XN file resolved the XN11148 error for me.
XMOS, Senior Software Engineer
User avatar
masaikemlol
Member
Posts: 8
Joined: Thu Jul 18, 2024 4:10 am

Post by masaikemlol »

danielp wrote: Wed Jul 31, 2024 10:08 am I was able to reproduce this XN11148 error with a simple example using your XN file and noticed that you have different line-breaks to the one in the sw_usb_audio source repository.

In xk-audio-316-mc.xn, please change

Code: Select all

        <Declaration>
            tileref tile[2]
        </Declaration>
to

Code: Select all

        <Declaration>tileref tile[2]</Declaration>
This change in the XN file resolved the XN11148 error for me.

Wow, thank you so much for your help! I can now build the firmware successfully!

Code: Select all

Creating app_usb_aud_xk_316_mc_test2.xe
Constraint check for tile[0]:
  Memory available:       524288,   used:      29716 .  OKAY
    (Stack: 2220, Code: 21596, Data: 5900)
Constraints checks PASSED.
Constraint check for tile[1]:
  Memory available:       524288,   used:      49136 .  OKAY
    (Stack: 2628, Code: 25096, Data: 21412)
Constraints checks PASSED.
Build Complete
Thanks again!