-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFulup-README
110 lines (75 loc) · 2.5 KB
/
Fulup-README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#ti-am62x-binding
Provides:
* Rust binding to Pionix [ti-am62x-evse-sdk](https://github.com/PionixPublic/ti-am62x-evse-sdk)
* afb-binding micro service architecture and security model [api-v4](https://github.com/redpesk-common/afb-librust/blob/master/docs/1-architecture_presentation.md)
## Reference
https://software-dl.ti.com/processor-sdk-linux/esd/AM64X/latest/exports/docs/linux/Foundational_Components_IPC64x.html
## Dependencies:
* C/lib ti_rpmsg_char: git://git.ti.com/rpmsg/ti-rpmsg-char.git
* C compiler for build.rs code generation
* protobuf-compiler: dnf install protobuf-compiler (for OpenSuse check [1])
Warning: work under heavy development
* expect afbv4 to be installed in $Project/../Rust with (Fulup-Dev) branch
[1] OpenSuSE note:
SuSE uses a custom name for protobuf package and binary, and because of protoc execution model a symbolic link cannot do the job
* zipper install protobuf-c
* in your environment add ```export PROTOC=/usr/bin/protoc-c``` (warning: a link cannot do the job)
## config
```bash
"binding": [
{
// binding name
"uid": "ti-am62x",
"info": "Ti MCU(am62x) native desktop debug API",
// afbv4 api name
"api": "tiam62x",
// binding path
"path": "$HOME/.cargo/build/debug/libafb_tiam62x.so",
// default value for rpmsg (should match firmware configuration)
"cdev": "rpmsg_chrdev",
"eptname": "rpmsg_tuxevse",
"rport": 14,
// heartbeat tic value in ms
"tic": 1000
}
]
```
## list platform devices
```bash
ls -l /sys/bus/platform/devices | grep m4
```
## list virtio devices
```bash
ls -l /sys/bus/virtio/devices | grep m4
```
## list control device
```bash
ls -l /sys/bus/rpmsg/drivers/rpmsg_chrdev/virtio* | grep m4
```
## debug
## rpmsg_char_simple
## check journal
journalctl | grep virtio => addr==epnum
## check PID waiting on remote proc
```bash
cat /sys/kernel/debug/remoteproc/remoteproc0/trace0
lsof /dev/rpmsg0 # recuperer le PID
ls -l /proc/PID/fd/* | grep rpmsg
```
## check firmware loaded on rproc0
```bash
cat /sys/class/remoteproc/remoteproc0/firmware
```
## WARNING:
* send tiam62x/pwm=off to move CP from -12 to +12
* send tiam62x/iec6185=true to enable device protobuf firmware event push
## Firmware log trace
M4 console is visible on TI second console (usually ttyUSB1)
```
# use shift+ctr+A,X to exit
picocom -b 115200 /dev/ttyUSB1
```
## remote wireshark
```
ssh root@phytec-power "tcpdump -s0 -U -n -w - -i eth2 " | wireshark -i -
```