@@ -47,8 +47,7 @@ Board features:
4747 :height: 405px
4848 :alt: PhyBOARD Pollux
4949
50- More information about the board can be found at the
51- `PHYTEC website `_.
50+ More information about the board can be found at the `PHYTEC website `_.
5251
5352Supported Features
5453==================
@@ -78,10 +77,8 @@ The default configuration can be found in the defconfig file:
7877:zephyr_file: `boards/phytec/mimx8mp_phyboard_pollux/mimx8mp_phyboard_pollux_mimx8ml8_m7_defconfig `.
7978
8079It's recommended to disable peripherals used by the M7-Core on the host running
81- on the Linux host.
82-
83- Other hardware features are not currently supported with Zephyr on the
84- M7-Core.
80+ on the Linux host. Other hardware features are not currently supported with
81+ Zephyr on the M7-Core.
8582
8683Connections and IOs
8784===================
@@ -102,30 +99,23 @@ UART
10299+-----------------+----------+----------------------------+
103100
104101.. note ::
105- Please note, that the, to UART3 connected, Wifi/BLE Module isn't working with
106- Zephyr yet. UART3 can also be used through pin 31(RX) and 33(TX) of the
107- X6 Connector.
102+ The WiFi/BLE Module connected to UART3 isn't working with Zephyr yet. UART3
103+ can also be used through pin 31(RX) and 33(TX) of connector X6.
108104
109105GPIO
110106----
111107
112108The pinmuxing for the GPIOs is the standard pinmuxing of the mimx8mp devicetree
113- created by NXP. You can find it here:
114-
115- :zephyr_file: `dts/arm/nxp/nxp_imx8ml_m7.dtsi `.
116-
117- The Pinout of the PhyBOARD Polis can be found here:
118-
119- `PHYTEC website `_
109+ created by NXP and can be found at
110+ :zephyr_file: `dts/arm/nxp/nxp_imx8ml_m7.dtsi `. The Pinout of the PhyBOARD Polis
111+ can be found at the `PHYTEC website `_.
120112
121113Programming and Debugging
122114*************************
123115
124116The i.MX8MP does not have a separate flash for the M7-Core. Because of this
125117the A53-Core has to load the program for the M7-Core to the right memory
126118address, set the PC and start the processor.
127- This can only by done with u-boot at the moment. We are working on our BSP to
128- enable remoteproc support.
129119
130120The M7 can use up to 3 different RAMs (currently, only two configurations are
131121supported: ITCM and DDR). These are the memory mapping for A53 and M7:
@@ -151,20 +141,17 @@ At compilation time you have to choose which memory region will be used. This
151141configuration is done in the devicetree and the defconfig / the config of your
152142program.
153143
154- **By default Zephyr will use the TCM memory region. ** You can configure it like
155- this for the DDR region:
156-
157- In the devicetree overwrite the following nodes like this:
144+ **By default Zephyr will use the TCM memory region. ** You can configure it
145+ to use the DDR region. In the devicetree overwrite you can select both options.
158146
159147.. code-block :: DTS
160148
161149 chosen {
162150 /* TCM */
163151 zephyr,flash = &itcm;
164- zephyr,sram = &dtcm;
152+ zephyr,sram = &dtcm;
165153 };
166154
167- change it to
168155
169156 .. code-block :: DTS
170157
@@ -175,93 +162,93 @@ change it to
175162 };
176163
177164
178- In your prj.conf overwrite the configuration like this for the **DDR ** memory
179- region:
165+ And in the prj.conf the configuration to the **DDR ** memory region:
180166
181167.. code-block :: cfg
182168
183169 CONFIG_CODE_DDR =y
184170 CONFIG_CODE_ITCM =n
185171
172+ Connecting to the Serial Console
173+ ================================
186174
187- Starting the M7-Core via U-Boot
188- ===============================
189-
190- Load the compiled zephyr.bin to memory address 0x4800000.
191- This should output something like this:
175+ A serial console for both the application CPU and the Cortex M7 coprocessor are
176+ available via the onboard dual USB-to-UART converter. If you use Linux, create a
177+ udev rule (as ``root ``) to fix a permission issue when not using root for
178+ flashing.
192179
193180.. code-block :: console
194181
195- u-boot=> tftp 0x48000000 192.168.3.10:zephyr.bin
196- Using ethernet@30be0000 device
197- TFTP from server 192.168.3.10; our IP address is 192.168.3.11
198- Filename 'zephyr.bin'.
199- Load address: 0x48000000
200- Loading: ##
201- 2 KiB/s
202- done
203- Bytes transferred = 27240 (6a68 hex)
182+ # echo 'ATTR{idProduct}=="0a70", ATTR{idVendor}=="10c4", MODE="0666", GROUP="plugdev"' > /etc/udev/rules.d/50-usb-uart.rules
204183
205- Because it's not possible to load directly to the TCM memory area you have to
206- copy the binaries. The last argument given is the size of the file in bytes,
207- you can copy it from the output of the last command.
184+ Reload the rules and replug the device.
208185
209186.. code-block :: console
210187
211- u-boot=> cp.b 0x48000000 0x7e0000 27240
188+ $ sudo udevadm control --reload-rules
212189
213- And finaly starting the M7-Core at the right memory address:
190+ Finally, unplug and plug the board again for the rules to take effect.
191+
192+ Connect to the console via your favorite terminal program. For example:
214193
215194.. code-block :: console
216195
217- u-boot=> bootaux 0x7e0000
218- ## Starting auxiliary core stack = 0x20003A58, pc = 0x1FFE1905...
196+ $ minicom -D /dev/ttyUSB1 -b 115200
219197
220- Debugging
221- =========
198+ Flashing and Debugging via JTAG
199+ ===============================
222200
223- The PhyBOARD Polis can be debugged using a JTAG Debugger.
224- The easiest way to do that is to use a SEGGER JLink Debugger and Phytec's
225- ``PEB-EVAL-01 `` Shield, which can be directly connected to the JLink.
226- You can find the JLink Software package here: `JLink Software `_
201+ The PhyBOARD-Pollux can be debugged using a JTAG or SWD debug adapter. A Segger
202+ JLink can be connected to the compatible JTAG connector on Phytec's
203+ ``PEB-EVAL-01 `` shield.
227204
228205.. figure :: img/PEB-EVAL-01.jpg
229206 :alt: PEB-EVAL-01
230207 :width: 350
231208
232209 PEB-EVAL-01
233210
234- To debug efficiently you have to use multiple terminals:
235-
236- After connecting everything and building with west use this command while in
237- the directory of the program you build earlier to start a debug server:
211+ Before flashing or debugging via a JTAG debug adapter,
212+ the M7 core has to be switched on:
238213
239214.. code-block :: console
240215
241- host$ west debugserver
216+ u-boot=> bootaux 0x7e0000
242217
243- West automatically connects via the JLink to the Target and keeps open a
244- debug server.
218+ Here is an example for the :ref: `hello_world ` application:
245219
246- Use another terminal, start gdb, connect to target and load Zephyr on the
247- target:
220+ .. zephyr-app-commands ::
221+ :zephyr-app: samples/hello_world
222+ :board: mimx8mp_phyboard_pollux/mimx8ml8/m7
223+ :goals: flash
224+
225+ The console should now show the output of the application:
248226
249227.. code-block :: console
250228
251- host$ gdb-multiarch build/zephyr/zephyr.elf -tui
252- (gdb) targ rem :2331
253- Remote debugging using :2331
254- 0x1ffe0008 in _vector_table ()
255- (gdb) mon halt
256- (gdb) mon reset
257- (gdb) c
258- Continuing.
229+ *** Booting Zephyr OS build v3.7.0 ***
230+ Hello World! mimx8mp_phyboard_pollux/mimx8ml8/m7
231+
232+ Starting a debug session is similar to flashing:
259233
260- The program can be debugged using standard gdb techniques.
234+ .. zephyr-app-commands ::
235+ :zephyr-app: samples/hello_world
236+ :board: mimx8mp_phyboard_pollux/mimx8ml8/m7
237+ :goals: debug
238+
239+ Starting the M7-Core from U-Boot and Linux
240+ ==========================================
241+
242+ Loading binaries and starting the M7-Core is supported from Linux via remoteproc
243+ or from U-boot by directly copying the firmware binary. Please check the
244+ `phyCORE-i.MX 8M Plus BSP Manual `_ for more information.
261245
262246References
263247==========
264248
249+ - `i.MX 8M Plus Applications Processor Reference Manual `_
250+ - `phyCORE-i.MX 8M Plus BSP Manual `_
251+
265252.. _PHYTEC website :
266253 https://www.phytec.de/produkte/single-board-computer/phyboard-pollux/
267254
@@ -270,3 +257,6 @@ References
270257
271258.. _JLink Software :
272259 https://www.segger.com/downloads/jlink/
260+
261+ .. _phyCORE-i.MX 8M Plus BSP Manual :
262+ https://phytec.github.io/doc-bsp-yocto/bsp/imx8/imx8mp/imx8mp.html
0 commit comments