I got my free XMOS StartKIT courtesy of XMOS (THANK YOU!!):
Reading this:
https://www.cs.bris.ac.uk/~dave/hotslides.pdf
And start discovering lots of projects available at:
First, connect the StartKIT via USB to the computer, use “lsusb” to discover the vid and pid. Update this into the /etc/udev/rules.d/80-xmos.rules:
ATTRS{idVendor}==”20b1″, ATTRS{idProduct}==”f7d3″, MODE=”0660″, GROUP=”plugdev”
And then “sudo service udev restart” to restart the udevd services.
The purpose of above procedure is so that access to the device via USB does not need to be root, but just ensure that the current user or owner is member of the “plugdev” group.
Downloaded the xTIMEComposer (13.2.1, 64-bit and my OS is Ubuntu 14.04 LTS 64-bit), and ensure that you have 64-bit Java. Unpack the tarball downloaded from www.xmos.com, and then starting up the “xtimecomposer”. Many snapshots of xTIMEComposer can be found on the web:
Autodetection of USB device will be done, and subsequently go through the tutorial to create your first application. Mine is “spinning app”:
https://github.com/xcore/sw_startkit_examples/tree/master/app_spinning_bar
Now, at this point, doing a process enumeration, we can see hat the xtimecomposer (pid=3472) has started “xgdb” process (pid=5511) to access the hardware device via USB:
tthtlc 3472 3471 1 19:38 pts/3 00:02:19 /usr/bin/java -Dcom.xmos.cdt.disableMozillaBrowserCreation=True -Dorg.eclipse.swt.browser.UseWebKitGTK=True -jar /home/tthtlc/Downloads/XMOS/xTIMEcomposer/Community_13.2.1/xtimecomposer_bin//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher /home/tthtlc/Downloads/XMOS/xTIMEcomposer/Community_13.2.1/xtimecomposer_bin/xtimecomposer.exe -name Xtimecomposer.exe –launcher.library /home/tthtlc/Downloads/XMOS/xTIMEcomposer/Community_13.2.1/xtimecomposer_bin//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.2.R36x_v20101019_1345/eclipse_1310.so -startup /home/tthtlc/Downloads/XMOS/xTIMEcomposer/Community_13.2.1/xtimecomposer_bin//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar -exitdata 20800e -vm /usr/bin/java -vmargs -Dcom.xmos.cdt.disableMozillaBrowserCreation=True -Dorg.eclipse.swt.browser.UseWebKitGTK=True -jar /home/tthtlc/Downloads/XMOS/xTIMEcomposer/Community_13.2.1/xtimecomposer_bin//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
tthtlc 5511 3472 0 21:28 pts/3 00:00:20 xgdb -q -nw -i mi2 –cd=/home/tthtlc/.xmos/repos/sw_startkit_examples/app_spinning_bar –command=.gdbinit /home/tthtlc/.xmos/repos/sw_startkit_examples/app_spinning_bar/bin/app_spinning_bar.xe
From above we learned that xTIMECOmposer create and stored its repository inside $HOME/.xmos directory (see pid=5511 above). “xc” is the extension for a C file to be compiled by “xcc”, and output file is “xe” as the extension. Using “xobjdump -d xxx.xe” we can list the assembly as below:
Loadable 1 for tile[0] (node “0”, tile 0):
Disassembly of section .text (size: 240)
<_start>:
0x00010000: 00 68: ldc (ru6) r0, 0x0
<…>
0x00010012: 40 6a: ldc (ru6) r9, 0x0
0x00010014: 00 f0 6c d8: ldap (lu10) r11, 0x6c <.label0>
0x00010018: fb 37: set (1r) cp, r11
0x0001001a: 00 f0 7b d8: ldap (lu10) r11, 0x7b <.label1>
0x0001001e: eb 37: set (1r) dp, r11
0x00010020: cb 6a: ldc (ru6) r11, 0xb
lrwx—— 1 tthtlc tthtlc 64 Jan 29 22:31 5 -> /dev/bus/usb/001/005
From “ps -ef” output we can see it is “xrun” that get executed (pid=6438):
tthtlc 6438 3472 0 22:52 pts/3 00:00:00 xrun –adapter-id 0ecxWIbrM.3O. –io /home/tthtlc/.xmos/repos/sw_startkit_examples/app_spinning_bar/bin/app_spinning_bar.xe
tthtlc 6443 6438 0 22:52 pts/3 00:00:00 xgdb -q –return-child-result –batch –ex set $xcore_id=0 –ex set $xcore_boot=0 -x /tmp/.xrun6438-3BP1TC2N/xeload_auto.gdb /home/tthtlc/.xmos/repos/sw_startkit_examples/app_spinning_bar/bin/app_spinning_bar.xe
Now xrun will fork a new process running xgdb (pid=6443).
So how was xgdb able to copy the program into the remote USB XMOS device from the PC host?
https://www.xmos.com/download/public/XS1-L02A-QF124-Datasheet%28N%29.pdf
- http://www.element14.com/community/groups/internet-of-things/blog/2014/05/05/xmos-startkit-introduction-terminologyarchitecture-getting-started-and-example-programs
- https://www.xmos.com/download/public/XCC-Target-Dependent-Behavior-for-XS1-Devices.pdf
- http://www.xmos.com/download/public/XCC-Command-Line-Manual%28X6904F%29.pdf
- https://www.xmos.com/support/xtools/documentation
- https://www.xmos.com/download/public/XS1-L01A-TQ128-Datasheet%28L%29.pdf
- http://www.iraqigeek.com/2014/01/02/an-introduction-to-xmos-xc-language/
- http://electronics.stackexchange.com/questions/7979/what-is-the-xmos-series
You must be logged in to post a comment.