trying xconnect by two startkit , modifying xn file

New to XMOS and XCore? Get started here.
etori90
Member++
Posts: 31
Joined: Thu Sep 05, 2019 6:49 am

trying xconnect by two startkit , modifying xn file

Postby etori90 » Sun Aug 23, 2020 12:15 pm

Hi, I tried dynamic linking configuration example and it worked well.
Now I'm going to try connecting two startkit by modifying XN file.
I referred to here <viewtopic.php?t=3673>

first I'm planning to boot two startkit boards from one source file by adding Nodes on Xn file.
two boards will blink led on each board(not using xlink yet)

so I made two flash_image file for node 0 and node 1 by same process as on the mentioned link. but it's not working well.
xflash command.PNG
I can't find any error message on console.
Is there anyone who know problem?

I attached my project. So hard to begginer...
st_link.zip
You do not have the required permissions to view the files attached to this post.
User avatar
mon2
XCore Legend
Posts: 1849
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Sun Aug 23, 2020 2:07 pm

In your xflash commands, add the

Code: Select all

--verbose
Flag to view more details. Post for a review.
User avatar
mon2
XCore Legend
Posts: 1849
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Sun Aug 23, 2020 2:11 pm

I think the issue may be that you should be using

flash_image_0
flash_image_1


And not

flash_image_node_0
flash_image_node_1


Please confirm if that works.
etori90
Member++
Posts: 31
Joined: Thu Sep 05, 2019 6:49 am

Postby etori90 » Sun Aug 23, 2020 2:28 pm

If I command xflash app.xe --noinq --boot-partition-size 0x20000 -o fash_image
then, two files are created(flash_image_node0 and flash_image_node1)

tried your advise , [can't find files]
etori90
Member++
Posts: 31
Joined: Thu Sep 05, 2019 6:49 am

Postby etori90 » Sun Aug 23, 2020 2:30 pm

No.... this is not solved..
etori90
Member++
Posts: 31
Joined: Thu Sep 05, 2019 6:49 am

Postby etori90 » Sun Aug 23, 2020 2:35 pm

Thanks for answering my question! I tried --verbose and this is the log
actually I don't know what these are meaning..
Is there any problem at here?
Thankyou!

Code: Select all

C:\xconnect\st_link>xflash app.xe --noinq --boot-partition-size 0x20000 -o flash_image
Warning: F03097
Cannot check factory image protection because --noinq was specified.
Warning: F03102
Node id: 0 - Cannot check boot partition size for sector alignment. The
boot partition should contain a whole number of sectors but
this cannot be checked when the inquirer is disabled

Warning: F03102
Node id: 1 - Cannot check boot partition size for sector alignment. The
boot partition should contain a whole number of sectors but
this cannot be checked when the inquirer is disabled


C:\xconnect\st_link>xflash app.xe --noinq --boot-partition-size 0x20000 -o flash_image --verbose
XFlash_Application found _start :10000 on Node 0
XFlash_Application found _DoSyscall :10354 on Node 0
XFlash_Application found _DoException :1009e on Node 0
XFlash_Application found _start :10000 on Node 1
XFlash_Application found _DoSyscall :10324 on Node 1
XFlash_Application found _DoException :1009e on Node 1
XFlash_Application : Attempting to Compress Binary Data
libcompressor marker 1=19
libcompressor marker 2=26
libcompressor marker 3=35
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 : 35ms
libcompressor compile command=xcc -nostartfiles -Xmapper --bootstyle=forsim -x assembler-with-cpp "decompressor-c24a5752" -x xn "target-xn-v0-9bbb9929" -o decompressor-e87b38e8
libcompressor validating decompressor decompressor-e87b38e8
libcompressor launching simulator decompressor-e87b38e8 --disable-syscalls --max-cycles 100000000
libcompressor simulator starting @0x10000
libcompressor simulator terminate @0x1ff5c
libcompressor decompressor validated
XFlash_Application on Node : 0 compressed from : 1572 bytes to : 1570 bytes (0.1272%)
libcompressor marker 1=11
libcompressor marker 2=19
libcompressor marker 3=26
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 : 34ms
libcompressor compile command=xcc -nostartfiles -Xmapper --bootstyle=forsim -x assembler-with-cpp "decompressor-1fbd7b87" -x xn "target-xn-v0-9bbb9929" -o decompressor-deee9015
libcompressor validating decompressor decompressor-deee9015
libcompressor launching simulator decompressor-deee9015 --disable-syscalls --max-cycles 100000000
libcompressor simulator starting @0x10000
libcompressor simulator terminate @0x1ff5c
libcompressor decompressor validated
XFlash::DoXFlash
XFlash::DoImageProgramming
XFlash::GetDeviceInfo
XFlash_DeviceInfo::GetDeviceInfo_User
Warning: F03097
Cannot check factory image protection because --noinq was specified.
Warning: F03102
Node id: 0 - Cannot check boot partition size for sector alignment. The
boot partition should contain a whole number of sectors but
this cannot be checked when the inquirer is disabled

Warning: F03102
Node id: 1 - Cannot check boot partition size for sector alignment. The
boot partition should contain a whole number of sectors but
this cannot be checked when the inquirer is disabled

XFlash::BuildFlashBinaryFile
XFlash_Builder_S2L::BuildStage2Loaders Factory
Stage2_Loader::Compile : xcc -Wno-bidirectional-buffered-port -Xmapper --dontenablesodlinks -Xmapper --nochaninit -Xmapper --noinitialtidy -Xmapper --image-base -Xmapper 0x10080 -Xmapper --image-size -Xmapper 0xff80 -Xmapper --wno110 -Xmapper --wno226 -Xmapper --wnoXN -std=c99 -O2 -x xn "target-xn-v0-9bbb9929" -x xc s2l-n0-5f3684a2 -lstage2loader -lswitchsetup -lspiaccess -o s2l-n0-cb7963b5
Stage2Loader found _DoSyscall : 0x10448 on Node 0
Stage2Loader found _DoException : 0x1011e on Node 0
Stage2_Loader : Attempting to Compress Binary Data
libcompressor marker 1=42
libcompressor marker 2=46
libcompressor marker 3=49
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 4
libcompressor best marker length 4 2 5
libcompressor DoCompression_Compress took : 52ms
libcompressor compile command=xcc -nostartfiles -Xmapper --bootstyle=forsim -x assembler-with-cpp "decompressor-e60565e1" -x xn "target-xn-v0-9bbb9929" -o decompressor-2de1174b
libcompressor validating decompressor decompressor-2de1174b
libcompressor launching simulator decompressor-2de1174b --disable-syscalls --max-cycles 100000000
libcompressor simulator starting @0x10000
libcompressor simulator terminate @0x1fedc
libcompressor decompressor validated
Stage2_Loader on Node : 0 compressed from : 2760 bytes to : 2378 bytes (13.84%)
Stage2_SwitchSetup::Compile : xcc -c -march=xs1b -x assembler-with-cpp swstup-n0v0-92d6286f -o swstup-n0v0-b930b61b
Stage2_SwitchSetup::Compile : xcc -nostartfiles -Wno-bidirectional-buffered-port -Xmapper --first -Xmapper swstup-n0v0-b930b61b -Xmapper --dontenablesodlinks -Xmapper --nochaninit -Xmapper --noinitialtidy -Xmapper --wno110 -Xmapper --wno226 -Xmapper --wnoXN -std=c99 -O2 -x xn "target-xn-v0-9bbb9929" -x xc swstup-n0v0-ca27c1f5 -lswitchsetup -o swstup-n0v0-df1d2b59
XFlash_Builder_Image::BuildImages Factory
XFlash_Builder_Image::BuildImageTable
  master node = 0
    node = 0
XFlash_Builder_Image::BuildImageTable num cores for image table = 1
XFlash_Builder_Image::CalculateBufferSize Starting calculation _total_image_size=0
XFlash_Builder_Image::CalculateBufferSize Add Image Header _total_image_size=34
XFlash_Builder_Image::CalculateBufferSize Add Switch Setup header _total_image_size=3c
XFlash_Builder_Image::CalculateBufferSize Add Per Core header _total_image_size=48
XFlash_Builder_Image::CalculateBufferSize_SwitchSetup _total_image_size=510
XFlash_Builder_Image::CalculateBufferSize_Application application size = 628 _total_image_size = b38
XFlash_Builder_Image::BuildImageTable allocated image buffer size = b38
XFlash_Builder_Image::WriteBuffer_ImageHeader
XFlash_Builder_Image::WriteBuffer_SwitchSetup current switch setup table offset : 34
XFlash_Builder_Image::WriteBuffer_SwitchSetup current application data offset : 48
XFlash_Builder_Image::WriteBuffer_SwitchSetup size : 4c4
XFlash_Builder_Image::WriteBuffer_SwitchSetup aligned_size : 4c8
XFlash_Builder_Image::WriteBuffer_SwitchSetup init_vec_shift : 0
XFlash_Builder_Image::WriteBuffer_Application
XFlash_Builder_Image::WriteBuffer_Application for node : 0
XFlash_Builder_Image::WriteBuffer_Application for core : 0
XFlash_Builder_Image::WriteBuffer_Application current core table offset : 3c
XFlash_Builder_Image::WriteBuffer_Application current application data offset : 510
XFlash_Builder_Image::WriteBuffer_Application size : 622
XFlash_Builder_Image::WriteBuffer_Application aligned_size : 628
XFlash_Builder_Image::WriteBuffer_Application init_vec_shift : 0
XFlash_Builder_Image::WriteBuffer_Application chan end : 80010002
XFlash_Builder_Image::WriteBuffer_CRC
XFlash_Builder_Binary::BuildBinary
XFlash_Builder_Binary::CalculateBufferSize_Factory
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l size word (4)4
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l app (9cc) 9d0
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l crc (4)9d4
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding factory app (b38) 150c
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding sector padding (f4) 1600
XFlash_Builder_Binary::CalculateBufferSize_Factory : First User Sector offset = 1600
XFlash_Builder_Binary::GetSearchLimitPadding : current size (1600) 0
XFlash_Builder_Binary::CalculateBufferSize_Data
XFlash_Builder_Binary::BuildBinary : Allocating buffer - 1600
XFlash_Builder_Binary::GetSearchLimitPadding : current size (1600) 0
XFlash_Builder_Binary::WriteBufferToBinary : flash_image_node0
XFlash_Builder_S2L::BuildStage2Loaders Factory
Stage2_Loader::Compile : xcc -Wno-bidirectional-buffered-port -Xmapper --dontenablesodlinks -Xmapper --nochaninit -Xmapper --noinitialtidy -Xmapper --image-base -Xmapper 0x10080 -Xmapper --image-size -Xmapper 0xff80 -Xmapper --wno110 -Xmapper --wno226 -Xmapper --wnoXN -std=c99 -O2 -x xn "target-xn-v0-9bbb9929" -x xc s2l-n1-eb9b1b0c -lstage2loader -lswitchsetup -lspiaccess -o s2l-n1-b55d9198
Stage2Loader found _DoSyscall : 0x10448 on Node 1
Stage2Loader found _DoException : 0x1011e on Node 1
Stage2_Loader : Attempting to Compress Binary Data
libcompressor marker 1=42
libcompressor marker 2=46
libcompressor marker 3=49
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 4
libcompressor best marker length 4 2 5
libcompressor DoCompression_Compress took : 55ms
libcompressor compile command=xcc -nostartfiles -Xmapper --bootstyle=forsim -x assembler-with-cpp "decompressor-e4e099b2" -x xn "target-xn-v0-9bbb9929" -o decompressor-6f38ba94
libcompressor validating decompressor decompressor-6f38ba94
libcompressor launching simulator decompressor-6f38ba94 --disable-syscalls --max-cycles 100000000
libcompressor simulator starting @0x10000
libcompressor simulator terminate @0x1fedc
libcompressor decompressor validated
Stage2_Loader on Node : 1 compressed from : 2760 bytes to : 2378 bytes (13.84%)
Stage2_SwitchSetup::Compile : xcc -c -march=xs1b -x assembler-with-cpp swstup-n1v0-f73aa1ea -o swstup-n1v0-bf6cbcfd
Stage2_SwitchSetup::Compile : xcc -nostartfiles -Wno-bidirectional-buffered-port -Xmapper --first -Xmapper swstup-n1v0-bf6cbcfd -Xmapper --dontenablesodlinks -Xmapper --nochaninit -Xmapper --noinitialtidy -Xmapper --wno110 -Xmapper --wno226 -Xmapper --wnoXN -std=c99 -O2 -x xn "target-xn-v0-9bbb9929" -x xc swstup-n1v0-62e156e6 -lswitchsetup -o swstup-n1v0-8d7dd224
XFlash_Builder_Image::BuildImages Factory
XFlash_Builder_Image::BuildImageTable
  master node = 1
    node = 1
XFlash_Builder_Image::BuildImageTable num cores for image table = 1
XFlash_Builder_Image::CalculateBufferSize Starting calculation _total_image_size=0
XFlash_Builder_Image::CalculateBufferSize Add Image Header _total_image_size=34
XFlash_Builder_Image::CalculateBufferSize Add Switch Setup header _total_image_size=3c
XFlash_Builder_Image::CalculateBufferSize Add Per Core header _total_image_size=48
XFlash_Builder_Image::CalculateBufferSize_SwitchSetup _total_image_size=50c
XFlash_Builder_Image::CalculateBufferSize_Application application size = 5f4 _total_image_size = b00
XFlash_Builder_Image::BuildImageTable allocated image buffer size = b00
XFlash_Builder_Image::WriteBuffer_ImageHeader
XFlash_Builder_Image::WriteBuffer_SwitchSetup current switch setup table offset : 34
XFlash_Builder_Image::WriteBuffer_SwitchSetup current application data offset : 48
XFlash_Builder_Image::WriteBuffer_SwitchSetup size : 4c0
XFlash_Builder_Image::WriteBuffer_SwitchSetup aligned_size : 4c4
XFlash_Builder_Image::WriteBuffer_SwitchSetup init_vec_shift : 0
XFlash_Builder_Image::WriteBuffer_Application
XFlash_Builder_Image::WriteBuffer_Application for node : 1
XFlash_Builder_Image::WriteBuffer_Application for core : 0
XFlash_Builder_Image::WriteBuffer_Application current core table offset : 3c
XFlash_Builder_Image::WriteBuffer_Application current application data offset : 50c
XFlash_Builder_Image::WriteBuffer_Application size : 5f0
XFlash_Builder_Image::WriteBuffer_Application aligned_size : 5f4
XFlash_Builder_Image::WriteBuffer_Application init_vec_shift : 0
XFlash_Builder_Image::WriteBuffer_Application chan end : 80020002
XFlash_Builder_Image::WriteBuffer_CRC
XFlash_Builder_Binary::BuildBinary
XFlash_Builder_Binary::CalculateBufferSize_Factory
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l size word (4)4
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l app (9cc) 9d0
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding s2l crc (4)9d4
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding factory app (b00) 14d4
XFlash_Builder_Binary::CalculateBufferSize_Factory : Adding sector padding (2c) 1500
XFlash_Builder_Binary::CalculateBufferSize_Factory : First User Sector offset = 1500
XFlash_Builder_Binary::GetSearchLimitPadding : current size (1500) 0
XFlash_Builder_Binary::CalculateBufferSize_Data
XFlash_Builder_Binary::BuildBinary : Allocating buffer - 1500
XFlash_Builder_Binary::GetSearchLimitPadding : current size (1500) 0
XFlash_Builder_Binary::WriteBufferToBinary : flash_image_node1

C:\xconnect\st_link>xflash -l

Available XMOS Devices
----------------------

  ID    Name                    Adapter ID      Devices
  --    ----                    ----------      -------
  0     XMOS startKIT           09dqcqMO.lobE   L[0]


C:\xconnect\st_link>xflash --id 0 --write-all flash_image_0
Error: F03146 Input file for option --write-all flash_image_0 not found

C:\xconnect\st_link>xflash --id 0 --write-all flash_image_node0 --target STARTKIT --verbose
XFlash::DoXFlash
XFlash::DoReadWriteErase
XFlash_Programmer_Write::DoWrite
XFlash_Programmer_Write::IssueCompileCommand
xcc -w -Xmapper --dontenablesodlinks  -x xn "C:\Program Files (x86)\XMOS\xTIMEcomposer\Community_14.4.1\targets\STARTKIT\STARTKIT.xn" -O2 -lflash -D xnPORT_SPI_MISO0=PORT_SPI_MISO -D xnPORT_SPI_SS0=PORT_SPI_SS -D xnPORT_SPI_CLK0=PORT_SPI_CLK -D xnPORT_SPI_MOSI0=PORT_SPI_MOSI -x xc "fw-386f22fa" -o "fw-fb8f070d"
XFlash_Utils::BuildRunCommand : xrun --io --id 0 fw-fb8f070d

User avatar
mon2
XCore Legend
Posts: 1849
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Sun Aug 23, 2020 3:16 pm

The flash file names from Sethu (XMOS) have an error - good if you have the flash files being generated and can flash the target boards.

How did you interconnect the 2 x StartKits?

How long are the cables between the StartKits?

How many conductors?

Share the wiring diagram. The 2 x StartKits will communicate with each other over the XLINKs. These are high speed lines so the cable length will matter. Have seen the use of CAT5/6 cables being used but if possible, consider to deploy LVDS transceivers between the boards. We designed such a PCB and used RJ45 connectors.

viewtopic.php?t=5607&start=10

However for simple and short distance testing, you should be ok to proceed as-is.

Suggest for you to follow the exact project posted by Sethu who was an employee @ XMOS (India) and wrote numerous tech articles.
etori90
Member++
Posts: 31
Joined: Thu Sep 05, 2019 6:49 am

Postby etori90 » Sun Aug 23, 2020 3:25 pm

Thank you mon2!
The flash file names from Sethu (XMOS) have an error - good if you have the flash files being generated and can flash the target boards.
-> I tried another project that needs only one flash file by xflash command and it worked well. same naming pattern of flash file.

By default, XFLASH programs the generated binary file to the target flash device.
-o file Places output in file, disabling programming.
If the target platform is booted from more than one flash device, multiple output
files are created, one for each device. The name of each output file is file_node,
where node is the value of the Id attribute (see XM-000929-PC) of the corresponding
node. - by xflash command line guide

I have question Is there any way to split into two flash file and download the board at the xcompsoer studio????

It worked well at dynamic linking example , interconnecting C link

what i want to do is blinkig D1 led and I found that when i download image , two boards blinks very shortly once and not working
User avatar
mon2
XCore Legend
Posts: 1849
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Sun Aug 23, 2020 6:12 pm

Can you review the following thread?

viewtopic.php?f=44&t=5893

Most of the links (no pun) are temporarily broken from my side. The website is a mess. Perhaps will work by tomorrow. The whole website should move to Amazon servers.

Guessing your current project is not communicating the tokens between the 2 startKits.

Best to clone a working project, confirm it works for you and then expand to your own code.
etori90
Member++
Posts: 31
Joined: Thu Sep 05, 2019 6:49 am

Postby etori90 » Sun Aug 23, 2020 6:23 pm

I already tried you mentioned and had no problem
As i remember AN01024 is about non-routed static link configuration, right?
I want routing so convert one source executable file to two flash image file before using link

Who is online

Users browsing this forum: No registered users and 3 guests