First, using the xtag run as the program, everything works well.
Next, I flash the binary, but the xtimecomposer create the wrong orders:please verify that sqi flash is supported and that correct sqi ports are defined within your xn files
I have read the 《xTIMEcomposer-User-Guide》, IS25LQ080B is in the
So I guess the SQI type is good.30 List of devices natively supported by libquadflash
My code is simple
Code: Select all
#include <stdio.h>
#include <xs1.h>
#include <platform.h>
port test_led = on tile[0]: {XS1_PORT_1A};
void led_test()
{
while(1)
{
printf("this is a good test\n");
test_led <: 0;
delay_milliseconds(1000);
test_led <: 1;
delay_milliseconds(1000);
}
}
int main()
{
par
{
on tile[0]: led_test();
}
return 0;
}
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" ManuallySpecifiedRouting="true">
<Type>Board</Type>
<Name>XS2 MC Audio</Name>
<Declarations>
<Declaration>tileref tile[2]</Declaration>
<Declaration>tileref usb_tile</Declaration>
</Declarations>
<Packages>
<Package id="0" Type="XS2-UnA-512-FB236">
<Nodes>
<Node Id="0" InPackageId="0" Type="XS2-L16A-512" Oscillator="24MHz" SystemFrequency="500MHz" 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"/>
</Tile>
<Tile Number="1" Reference="tile[1]"/>
</Node>
<Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile" Oscillator="24MHz">
</Node>
</Nodes>
<Links>
<Link Encoding="5wire">
<LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
</Link>
</Links>
</Package>
</Packages>
<ExternalDevices>
<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="IS25LQ080B">
<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"/>
<JTAGDevice NodeId="1"/>
</JTAGChain>
</Network>
it says that the pins used for QSPI boot are hardcoded in the boot ROM and cannot be changed.And my design also obey the rules.8.1 Boot from QSPI master
By using the cmd tools, "xflash --verbose myprogram.xe", the output is
Code: Select all
XFlash_Options::ListDevices : xgdb --batch -q --ex listdevices devl-e259ed56
XFlash_Application found _start :40000 on Node 0
XFlash_Application found _DoSyscall :40608 on Node 0
XFlash_Application found _DoException :402d0 on Node 0
XFlash_Application found _start :40000 on Node 0
XFlash_Application found _DoSyscall :40444 on Node 0
XFlash_Application found _DoException :40234 on Node 0
XFlash_Application : Attempting to Compress Binary Data
libcompressor marker 1=99
libcompressor marker 2=158
libcompressor marker 3=181
libcompressor best marker length 3 2 2
libcompressor best marker length 3 2 3
libcompressor best marker length 3 2 4
libcompressor DoCompression_Compress took : 132ms
libcompressor compile command=xcc -nostartfiles -Xmapper --bootstyle=forsim -x assembler-with-cpp "decompressor-9556aff5" -x xn "target-xn-v0-be23a400" -o decompressor-21685516
libcompressor validating decompressor decompressor-21685516
libcompressor launching simulator decompressor-21685516 --disable-syscalls --max-cycles 100000000
libcompressor simulator starting @0x40000
libcompressor simulator terminate @0x7ff74
libcompressor decompressor validated
XFlash_Application on Node : 0 compressed from : 5932 bytes to : 4872 bytes (17.87%)
libcompressor marker 1=59
libcompressor marker 2=62
libcompressor marker 3=89
libcompressor best marker length 3 2 2
libcompressor best marker length 3 2 3
libcompressor best marker length 3 2 4
libcompressor best marker length 3 2 5
libcompressor best marker length 4 2 3
libcompressor best marker length 4 2 4
libcompressor best marker length 4 2 5
libcompressor DoCompression_Compress took : 94ms
libcompressor compile command=xcc -nostartfiles -Xmapper --bootstyle=forsim -x assembler-with-cpp "decompressor-688e2241" -x xn "target-xn-v0-be23a400" -o decompressor-74c0d6fe
libcompressor validating decompressor decompressor-74c0d6fe
libcompressor launching simulator decompressor-74c0d6fe --disable-syscalls --max-cycles 100000000
libcompressor simulator starting @0x40000
libcompressor simulator terminate @0x7ff76
libcompressor decompressor validated
XFlash_Application on Node : 0 compressed from : 3384 bytes to : 2684 bytes (20.69%)
XFlash::DoXFlash
XFlash::DoImageProgramming
XFlash::GetDeviceInfo
XFlash_DeviceInfo::GetDeviceInfo_Hardware
XFlash_DeviceInfo::GetDeviceInfo_Hardware_IssueCompileCommand : xcc -Xmapper --dontenablesodlinks -Xmapper --wnoXN -x xc "spiinfo-17d9f84d" -x xn "target-xn-v0-be23a400" -o "spiinfo-6ec9b307" -lquadflash -D xnPORT_SQI_CS0=PORT_SQI_CS -D xnPORT_SQI_SCLK0=PORT_SQI_SCLK -D xnPORT_SQI_SIO0=PORT_SQI_SIO
XFlash_Utils::BuildRunCommand : xrun --io spiinfo-6ec9b307