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