i have an old XS2 board here, but i cant run my compiled code for xs2:
Code: Select all
➜ helloworld cat src/main.xc
#include <platform.h>
#include <stdio.h>
int main( void ) {
printf (" Hello world \n");
}%
Code: Select all
➜ helloworld cmake -G "Unix Makefiles" -B build
CMake Warning (dev) at /Applications/XMOS_XTC_15.3.0/build/xcommon_cmake/xcommon.cmake:34 (enable_language):
project() should be called prior to this enable_language() call.
Call Stack (most recent call first):
CMakeLists.txt:2 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- The CXX compiler identification is Clang 3.6.0
-- The C compiler identification is Clang 3.6.0
-- The ASM compiler identification is XCC
-- Found assembler: /Applications/XMOS_XTC_15.3.0/bin/xcc
-- Configuring application: example
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/max/Development/private/diyinhk-xu208-board/helloworld/build
Code: Select all
➜ helloworld cd build
➜ build xmake
[ 50%] Building C object CMakeFiles/example.dir/src/main.xc.obj
/Users/max/Development/private/diyinhk-xu208-board/helloworld/src/main.xc:6:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
[100%] Linking C executable /Users/max/Development/private/diyinhk-xu208-board/helloworld/bin/example.xe
[100%] Built target example
Code: Select all
➜ build xrun --io ../bin/example.xe
xrun: warning: Selected architecture xs3_reva is not compatible with reported target architecture xs2_reva
xrun: warning: Selected architecture does not match target architecture on tile[0]: xs3_reva != xs2_reva
xrun: Cannot load: architecture mismatch.
board file:
Code: Select all
➜ helloworld cat board.xn
<?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>Device</Type>
<Name>xmosboard</Name>
<Declarations>
<Declaration>tileref tile[2]</Declaration>
<Declaration>tileref usb_tile</Declaration>
</Declarations>
<Packages>
<Package id="0" Type="XS2-UFnA-512-TQ128">
<Nodes>
<Node Id="0" InPackageId="0" Type="XS2-L16A-512"
SystemFrequency="500MHz" OscillatorSrc="1">
<Boot>
<Source Location="bootFlash" />
</Boot>
<Tile Number="0" Reference="tile[0]">