blob: f38c6e7bd9d2ea5c339818fd28ed6d8ef3607052 (
plain) (
blame)
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
Getting bare metal code running on tricore
Description of problem:
My code is stuck in
Steps to reproduce:
1. Open Infineon Aurix Development Studio (on Windows)
2. Compile project (two examples that I've tested)
a) New -> Project -> Board -> KIT_AURIX_TC277_TFT_DC-Step -> Build
b) the example from here: https://github.com/Infineon/AURIX_code_examples/tree/master/code_examples/Blinky_LED_1_KIT_TC277_TFT
3. Copy the elf and run qemu on the debian system
Additional information:
When running a blank binary on QEMU with the TriCore TC27x target, the CPU starts executing at address 0x80000020 and enters an infinite loop.
The code seems to be stuck and waiting for some hardware signal. The binary (sample.elf) from this issue qemu-project/qemu#1363 works.
I know it's probably a rookie problem, but what am I missing? How can I get an example from Infineon running? Or any other example?
Please let me know if you need additional information!
```:~/qemu$ ./build/qemu-system-tricore -M KIT_AURIX_TC277_TRB -cpu tc27x -nographic -kernel ../qemu-examples/aurix_tricore_example_bins/Blank_project_TC277.elf -d in_asm
QEMU 9.2.50 monitor - type 'help' for more information
(qemu) ----------------
IN: _START
0x80000020:
OBJD-T: 91000028d9220681dc02
----------------
IN: _Core0_start
0x80001206:
OBJD-T: 9130002f192200469120003737026e21d92200468ff2838180321b026029602a
OBJD-T: 0d0080043b009820cd42e00f
----------------
IN: _Core0_start
0x8000120a:
OBJD-T: 19220046
----------------
IN: _Core0_start
0x8000120e:
OBJD-T: 9120003737026e21d92200468ff2838180321b026029602a0d0080043b009820
OBJD-T: cd42e00f
----------------
IN: _Core0_start
0x80001232:
OBJD-T: 4d00e02fb7021420cd02e00f8212cd4220094dc0e12f8f720021012203260122
OBJD-T: 02265422542337026e218ff283216f134381
----------------
IN: _Core0_start
0x80001254:
OBJD-T: 5422
----------------
IN: _Core0_start
0x80001256:
OBJD-T: 542337026e218ff283216f134381
----------------
IN: _Core0_start
0x80001256:
OBJD-T: 5423
----------------
IN: _Core0_start
0x80001258:
OBJD-T: 37026e218ff283216f134381
----------------
IN: _Core0_start
0x80001264:
OBJD-T: 8f2200305422b7021020a6328f224021742254226f02ffff
----------------
IN: _Core0_start
0x80001268:
OBJD-T: 5422
----------------
IN: _Core0_start
0x8000126a:
OBJD-T: b7021020a6328f224021742254226f02ffff
----------------
IN: _Core0_start
0x80001274:
OBJD-T: 7422
----------------
IN: _Core0_start
0x80001276:
OBJD-T: 54226f02ffff
----------------
IN: _Core0_start
0x80001276:
OBJD-T: 5422
----------------
IN: _Core0_start
0x80001278:
OBJD-T: 6f02ffff
----------------
IN: _Core0_start
0x8000127c:
OBJD-T: 8202cdc2200954226f120900
----------------
IN: _Core0_start
0x80001282:
OBJD-T: 5422
----------------
IN: _Core0_start
0x80001284:
OBJD-T: 6f120900
----------------
IN: _Core0_start
0x80001296:
OBJD-T: 5422b7021020a6328f324021742254226f02ff7f
----------------
IN: _Core0_start
0x80001296:
OBJD-T: 5422
----------------
IN: _Core0_start
0x80001298:
OBJD-T: b7021020a6328f324021742254226f02ff7f
----------------
IN: _Core0_start
0x800012a2:
OBJD-T: 7422
----------------
IN: _Core0_start
0x800012a4:
OBJD-T: 54226f02ff7f
----------------
IN: _Core0_start
0x800012a4:
OBJD-T: 5422
----------------
IN: _Core0_start
0x800012a6:
OBJD-T: 6f02ff7f
(qemu) q
```
When I run it with the `-d in_asm,cpu,exec` flag it logs this infinitely often:
```
Trace 0: 0x7fb5205e9940 [00000000/00000000800012a4/00000002/ff011001] _Core0_start
PC: 800012a4 PSW: 00000980 ICR: 00000000
PCXI: 00000000 FCX: 00000000 LCX: 00000000
GPR A00: 00000000 00000000 f0036100 70020000
GPR A04: 00000000 00000000 00000000 00000000
GPR A08: 00000000 00000000 70019600 00000000
GPR A12: 00000000 00000000 00000000 00000000
GPR D00: 00000000 00000000 00000000 000000fc
GPR D04: 00000000 00000000 00000000 00000000
GPR D08: 0000003f 00000000 00000000 00000000
GPR D12: 00000000 00000000 00000000 00000000
cpu_io_recompile: rewound execution of TB to 00000000800012a4
```
|