path: root/write-stm-device/readme
diff options
Diffstat (limited to 'write-stm-device/readme')
1 files changed, 15 insertions, 9 deletions
diff --git a/write-stm-device/readme b/write-stm-device/readme
index 6bd7dd9..8b91297 100644
--- a/write-stm-device/readme
+++ b/write-stm-device/readme
@@ -4,22 +4,28 @@ Before compiling the program, you must change the items below accroding to your
- STM device name in stm_user_api.h
- TMC device name in stm_user_api.h
+If you don't care what channel(s) will the trace data be written on, you don't need to read the following words.
+But if not, there will be two ways for you you to create and set a policy for the application program:
-And then you may need to mount configfs manually:
-/ # mount -t configfs none /config
+1) Set a policy in the program via ioctl() system call like [1] is doing, in this way you can use more than one channel,
+since the channel number you want to use can be set by ioctl().
+2) Simply use the first available channel selected from a policy named "default" which has to be created via sysfs:
+Mount configfs manually with:
+/ # mount -t configfs none /config
-Create policy directory for STM:
+Create policy directory for STM device:
/ # mkdir /config/stp-policy/20100000.stm.abc
-The STM directory name consists of the device name to which it applies and the actual policy name,
-separated by a dot.
-The device name (say 20100000.stm) have to be matched the name of STM device under /dev.
-The suffix is a random string without any dot
+The directory name consists of the STM device name to which the policy applies and the policy name separated by a dot.
+The device name (say 20100000.stm) have to be matched the name of STM device which can be found under /dev.
+The suffix is a arbitrary string without dot.
Create policy:
-/ # mkdir /config/stp-policy/20100000.stm.abc/test
+/ # mkdir /config/stp-policy/20100000.stm.abc/default
+The range of channels and masters of default policy can be changed according to your requirement.
+[1] https://git.linaro.org/people/zhang.chunyan/sample-app.git branch stm-mmap-sample