[...]
> ```bash
> -rw-r--r-- 1 root root 4096 1970-01-01 00:11 ecc40000.etm/addr_start
> hikey960:/sys/bus/coresight/devices # echo d10583ff > ecc40000.etm/addr_start
> 1|hikey960:/sys/bus/coresight/devices # cat ecc40000.etm/addr_start
> cat: ecc40000.etm/addr_start: Operation not permitted
> ```
After read the code, I think you need firstly to specify addr_idx:
echo 3 > ecc40000.etm/addr_idx
echo d10583ff > ecc40000.etm/addr_start
cat ecc40000.etm/addr_start
> I thought it was not important that the Operation was 'not permitted'. Nonetheless, I continued with the tutorial as depicted [here](https://github.com/torvalds/linux/blob/master/Documentation/trace/coresight.txt). One thing I will like to note is that my `rwp` did move when i initially activated the sink and source. However, the 2nd time i checked the `rwp`, it went back `0x0`, the same position as that of my `rrp`.
>
> Regardless, I run the program in another kernel, performed CPU affinity to the program to point at the CPU in which the ETM is activated (in this case, CPU0). While the program is running, i looked at the `rwp/rrp` and see that neither of the pointers are moving. I thought perhaps if i perform `dd` operation, I might be able to get something.
>
> I performed `dd if=/dev/ec036000.etf of=/data/cs.bin bs=1M` but my device crashed and reboot itself without saving any files.
Could you try below commands before dd command?
echo 1 > /sys/bus/coresight/devices/ec036000.etf
# Enable ETM for CPU0
echo 1 > /sys/bus/coresight/devices/ecc40000.etm/enable_source
dd if=/dev/ec036000.etf of=/data/cs.bin bs=1M
Please note, you need firstly configure the address range, and then
enable the ETM and sink. If afterwards change the address range
again, you need disable etf/etm and re-enable etf/etm so can set
address range configuration into registers properly.
I don't try at my side, if have any question or issue, please report
back so I can test on Hikey960.
Thanks,
Leo Yan
The above message may contain confidential and/or proprietary information that is exempt from disclosure under applicable law and is intended for receipt and use solely by the addressee(s) named above. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this message, or any attachment, is strictly prohibited. If you have received this email in error, please inform the sender immediately by reply e-mail or telephone, reversing the charge if necessary. Please delete the message thereafter. Thank you.