@@ -64,6 +64,50 @@ Programming and Debugging (A53)
64
64
65
65
.. zephyr :board-supported-runners ::
66
66
67
+ There are multiple methods to program and debug Zephyr on the A53 core:
68
+
69
+ Option 1. Boot Zephyr by Using JLink Runner
70
+ ===========================================
71
+
72
+ The default runner for the board is JLink, connect the EVK board's JTAG connector to
73
+ the host computer using a J-Link debugger, power up the board and stop the board at
74
+ U-Boot command line.
75
+
76
+ Then use "west flash" or "west debug" command to load the zephyr.bin
77
+ image from the host computer and start the Zephyr application on A53 core0.
78
+
79
+ Flash and Run
80
+ -------------
81
+
82
+ Here is an example for the :zephyr:code-sample: `hello_world ` application.
83
+
84
+ .. zephyr-app-commands ::
85
+ :zephyr-app: samples/hello_world
86
+ :host-os: unix
87
+ :board: imx8mp_evk/mimx8ml8/a53
88
+ :goals: flash
89
+
90
+ Then the following log could be found on UART4 console:
91
+
92
+ .. code-block :: console
93
+
94
+ *** Booting Zephyr OS build v4.1.0-3063-g38519ca2c028 ***
95
+ Hello World! imx8mp_evk/mimx8ml8/a53
96
+
97
+ Debug
98
+ -----
99
+
100
+ Here is an example for the :zephyr:code-sample: `hello_world ` application.
101
+
102
+ .. zephyr-app-commands ::
103
+ :zephyr-app: samples/hello_world
104
+ :host-os: unix
105
+ :board: imx8mp_evk/mimx8ml8/a53
106
+ :goals: debug
107
+
108
+ Option 2. Boot Zephyr by Using U-Boot Command
109
+ =============================================
110
+
67
111
U-Boot "cpu" command is used to load and kick Zephyr to Cortex-A secondary Core, Currently
68
112
it is supported in : `Real-Time Edge U-Boot `_ (use the branch "uboot_vxxxx.xx-y.y.y,
69
113
xxxx.xx is uboot version and y.y.y is Real-Time Edge Software version, for example
@@ -75,21 +119,45 @@ v2.9.0), and pre-build images and user guide can be found at `Real-Time Edge Sof
75
119
.. _Real-Time Edge Software :
76
120
https://www.nxp.com/rtedge
77
121
78
- Copy the compiled ``zephyr.bin `` to the first FAT partition of the SD card and
79
- plug the SD card into the board. Power it up and stop the u-boot execution at
80
- prompt.
122
+ Step 1: Download Zephyr Image into DDR Memory
123
+ ---------------------------------------------
124
+
125
+ Firstly need to download Zephyr binary image into DDR memory, it can use tftp:
126
+
127
+ .. code-block :: console
128
+
129
+ tftp 0xc0000000 zephyr.bin
130
+
131
+ Or copy the Zephyr image ``zephyr.bin `` SD card and plug the card into the board, for example
132
+ if copy to the FAT partition of the SD card, use the following U-Boot command to load the image
133
+ into DDR memory (assuming the SD card is dev 1, fat partition ID is 1, they could be changed
134
+ based on actual setup):
81
135
82
- Use U-Boot to load and kick zephyr.bin to Cortex-A53 Core0:
136
+ .. code-block :: console
137
+
138
+ fatload mmc 1:1 0xc0000000 zephyr.bin;
139
+
140
+ Step 2: Boot Zephyr
141
+ -------------------
142
+
143
+ Then use the following command to boot Zephyr on the core0:
83
144
84
145
.. code-block :: console
85
146
86
- fatload mmc 1:1 0xc0000000 zephyr.bin; dcache flush ; icache flush; go 0xc0000000
147
+ dcache off ; icache flush; go 0xc0000000;
87
148
88
- Or kick zephyr.bin to the other Cortex-A53 Core, for example Core2 :
149
+ Or use "cpu" command to boot from secondary Core, for example Core1 :
89
150
90
151
.. code-block :: console
91
152
92
- fatload mmc 1:1 0xc0000000 zephyr.bin; dcache flush; icache flush; cpu 2 release 0xc0000000
153
+ dcache flush; icache flush; cpu 1 release 0xc0000000
154
+
155
+ Option 3. Boot Zephyr by Using Remoteproc under Linux
156
+ =====================================================
157
+
158
+ When running Linux on the A55 core, it can use the remoteproc framework to load and boot Zephyr,
159
+ refer to Real-Time Edge user guide for more details. Pre-build images and user guide can be found
160
+ at `Real-Time Edge Software `_.
93
161
94
162
Use this configuration to run basic Zephyr applications and kernel tests,
95
163
for example, with the :zephyr:code-sample: `synchronization ` sample:
@@ -98,28 +166,19 @@ for example, with the :zephyr:code-sample:`synchronization` sample:
98
166
:zephyr-app: samples/synchronization
99
167
:host-os: unix
100
168
:board: imx8mp_evk/mimx8ml8/a53
101
- :goals: run
169
+ :goals: build
102
170
103
171
This will build an image with the synchronization sample app, boot it and
104
172
display the following console output:
105
173
106
174
.. code-block :: console
107
175
108
- *** Booting Zephyr OS build zephyr-v3.1.0-3575-g44dd713bd883 ***
109
- thread_a: Hello World from cpu 0 on mimx8mp_evk_a53!
110
- thread_b: Hello World from cpu 0 on mimx8mp_evk_a53!
111
- thread_a: Hello World from cpu 0 on mimx8mp_evk_a53!
112
- thread_b: Hello World from cpu 0 on mimx8mp_evk_a53!
113
- thread_a: Hello World from cpu 0 on mimx8mp_evk_a53!
114
-
115
- Use Jailhouse hypervisor, after root cell linux is up:
116
-
117
- .. code-block :: console
118
-
119
- #jailhouse enable imx8mp.cell
120
- #jailhouse cell create imx8mp-zephyr.cell
121
- #jailhouse cell load 1 zephyr.bin -a 0xc0000000
122
- #jailhouse cell start 1
176
+ *** Booting Zephyr OS build v4.1.0-3063-g38519ca2c028 ***
177
+ thread_a: Hello World from cpu 0 on mimx8mp_evk!
178
+ thread_b: Hello World from cpu 0 on mimx8mp_evk!
179
+ thread_a: Hello World from cpu 0 on mimx8mp_evk!
180
+ thread_b: Hello World from cpu 0 on mimx8mp_evk!
181
+ thread_a: Hello World from cpu 0 on mimx8mp_evk!
123
182
124
183
Programming and Debugging (M7)
125
184
******************************
0 commit comments