Skip to content

Commit 3f96bfb

Browse files
lucien-nxpnashif
authored andcommitted
boards: nxp: add mimxrt1180_evk board
Support rgpio/lpuart peripherals Support linkserver/jlink debug ways Test cases: hello_world; button; blinky; synchronization; philosophers There is one limitation with flashing and debugging the SoC's second core(M7) that will be addressed with furture submission Signed-off-by: Lucien Zhao <[email protected]>
1 parent e073c92 commit 3f96bfb

15 files changed

+575
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#
2+
# Copyright 2024 NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
if(CONFIG_NXP_IMXRT_BOOT_HEADER)
8+
zephyr_library()
9+
if(NOT ((DEFINED CONFIG_BOARD_MIMXRT1180_EVK_MIMXRT1189_CM33)
10+
OR (DEFINED CONFIG_BOARD_MIMXRT1180_EVK_MIMXRT1189_CM7)))
11+
message(WARNING "It appears you are using the board definition for "
12+
"the MIMXRT1180-EVK, but targeting a custom board. You may need to "
13+
"update your flash configuration or device configuration data blocks")
14+
endif()
15+
set(RT1180_BOARD_DIR
16+
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1180")
17+
if(CONFIG_BOOT_FLEXSPI_NOR)
18+
# Include flash configuration block for RT1180 EVK from NXP's HAL.
19+
# This configuration block may need modification if another flash chip is
20+
# used on your custom board.
21+
zephyr_compile_definitions(XIP_EXTERNAL_FLASH=1)
22+
zephyr_compile_definitions(XIP_BOOT_HEADER_ENABLE=1)
23+
zephyr_library_sources(${RT1180_BOARD_DIR}/xip/evkmimxrt1180_flexspi_nor_config.c)
24+
zephyr_library_include_directories(${RT1180_BOARD_DIR}/xip)
25+
zephyr_library_include_directories(${RT1180_BOARD_DIR})
26+
endif()
27+
endif()
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# MIMXRT1180-EVK board
2+
3+
# Copyright 2024 NXP
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_MIMXRT1180_EVK
7+
8+
endif # BOARD_MIMXRT1180_EVK
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Copyright 2024 NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
config BOARD_MIMXRT1180_EVK
8+
select SOC_PART_NUMBER_MIMXRT1189CVM8B
9+
select SOC_MIMXRT1189_CM33 if BOARD_MIMXRT1180_EVK_MIMXRT1189_CM33
10+
select SOC_MIMXRT1189_CM7 if BOARD_MIMXRT1180_EVK_MIMXRT1189_CM7

boards/nxp/mimxrt1180_evk/board.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Copyright 2024 NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
set(RT1180_BOARD_DIR
8+
"${ZEPHYR_HAL_NXP_MODULE_DIR}/mcux/mcux-sdk/boards/evkmimxrt1180")
9+
# Note1: Suggest developers use Secure Provisioning Tool(SPT) to download RT1180 image
10+
# SPT can be downloaded on NXP web: https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-secure-provisioning-tool:MCUXPRESSO-SECURE-PROVISIONING
11+
# Details about the usage of SPT on MIMXRT1180-EVK board can be referred on chapter 7 of getting start with Mcuxpresso SDK for MIMXRT1180-EVK doc in SDK package.
12+
if(CONFIG_SOC_MIMXRT1189_CM33)
13+
board_runner_args(linkserver "--device=MIMXRT1189xxxxx:MIMXRT1180-EVK")
14+
board_runner_args(jlink "--device=MIMXRT1189xxx8_M33" "--reset-after-load" "--tool-opt=-jlinkscriptfile ${RT1180_BOARD_DIR}/jlinkscript/evkmimxrt1180_cm33.jlinkscript")
15+
elseif(CONFIG_SOC_MIMXRT1189_CM7)
16+
# Note: Only support run cm7 image when debugging due to default boot core on board is cm33 core
17+
board_runner_args(linkserver "--device=MIMXRT1189xxxxx:MIMXRT1180-EVK")
18+
board_runner_args(linkserver "--core=cm7")
19+
board_runner_args(jlink "--device=MIMXRT1189xxx8_M7" "--speed=4000" "--no-reset" "--tool-opt=-jlinkscriptfile ${RT1180_BOARD_DIR}/jlinkscript/evkmimxrt1180_cm7.jlinkscript" "--tool-opt=-ir")
20+
endif()
21+
22+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
23+
include(${ZEPHYR_BASE}/boards/common/linkserver.board.cmake)

boards/nxp/mimxrt1180_evk/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: mimxrt1180_evk
3+
vendor: nxp
4+
socs:
5+
- name: mimxrt1189
Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
.. _mimxrt1180_evk:
2+
3+
NXP MIMXRT1180-EVK
4+
##################
5+
6+
Overview
7+
********
8+
9+
The dual core i.MX RT1180 runs on the Cortex-M33 core at 240 MHz and on the
10+
Cortex-M7 at 792 MHz. The i.MX RT1180 MCU offers support over a wide
11+
temperature range and is qualified for consumer, industrial and automotive
12+
markets.
13+
14+
.. image:: mimxrt1180_evk.webp
15+
:align: center
16+
:alt: MIMXRT1180-EVK
17+
18+
Hardware
19+
********
20+
21+
- MIMXRT1189CVM8B MCU
22+
23+
- 240MHz Cortex-M33 & 792Mhz Cortex-M7
24+
- 1.5MB SRAM with 512KB of TCM for Cortex-M7 and 256KB of TCM for Cortex-M4
25+
26+
- Memory
27+
28+
- 512 Mbit SDRAM
29+
- 128 Mbit QSPI Flash
30+
- 512 Mbit HYPER RAM
31+
- TF socket for SD card
32+
33+
- Ethernet
34+
35+
- 1000 Mbit/s Ethernet PHY
36+
37+
- USB
38+
39+
- 2* USB 2.0 OTG connector
40+
41+
- Audio
42+
43+
- 3.5 mm audio stereo headphone jack
44+
- Board-mounted microphone
45+
- Left and right speaker out connectors
46+
47+
- Power
48+
49+
- 5 V DC jack
50+
51+
- Debug
52+
53+
- JTAG 20-pin connector
54+
- MCU-Link with DAPLink
55+
56+
- Expansion port
57+
58+
- Arduino interface
59+
60+
- CAN bus connector
61+
62+
For more information about the MIMXRT1180 SoC and MIMXRT1180-EVK board, see
63+
these references:
64+
65+
- `i.MX RT1180 Website`_
66+
- `MIMXRT1180-EVK Website`_
67+
68+
External Memory
69+
===============
70+
71+
This platform has the following external memories:
72+
73+
+--------------------+------------+-------------------------------------+
74+
| Device | Controller | Status |
75+
+====================+============+=====================================+
76+
| W9825G6KH | SEMC | Enabled via device configuration |
77+
| | | data block, which sets up SEMC at |
78+
| | | boot time |
79+
+--------------------+------------+-------------------------------------+
80+
| W25Q128JWSIQ | FLEXSPI | Enabled via flash configurationn |
81+
| | | block, which sets up FLEXSPI at |
82+
| | | boot time. |
83+
+--------------------+------------+-------------------------------------+
84+
85+
Supported Features
86+
==================
87+
88+
The mimxrt1180_evk board configuration supports the hardware features listed
89+
below. For additional features not yet supported, please also refer to the
90+
:ref:`mimxrt1170_evk` , which is the superset board in NXP's i.MX RT11xx family.
91+
NXP prioritizes enabling the superset board with NXP's Full Platform Support for
92+
Zephyr. Therefore, the mimxrt1170_evk board may have additional features
93+
already supported, which can also be re-used on this mimxrt1180_evk board:
94+
95+
+-----------+------------+-------------------------------------+
96+
| Interface | Controller | Driver/Component |
97+
+===========+============+=====================================+
98+
| NVIC | on-chip | nested vector interrupt controller |
99+
+-----------+------------+-------------------------------------+
100+
| SYSTICK | on-chip | systick |
101+
+-----------+------------+-------------------------------------+
102+
| GPIO | on-chip | gpio |
103+
+-----------+------------+-------------------------------------+
104+
| COUNTER | on-chip | counter |
105+
+-----------+------------+-------------------------------------+
106+
| UART | on-chip | serial port-polling; |
107+
| | | serial port-interrupt |
108+
+-----------+------------+-------------------------------------+
109+
110+
The default configuration can be found in the defconfig file:
111+
:zephyr_file:`boards/nxp/mimxrt1180_evk/mimxrt1180_evk_mimxrt1189_cm33_defconfig`
112+
113+
Other hardware features are not currently supported by the port.
114+
115+
116+
Connections and I/Os
117+
====================
118+
119+
The MIMXRT1180 SoC has six pairs of pinmux/gpio controllers.
120+
121+
+---------------+-----------------+---------------------------+
122+
| Name | Function | Usage |
123+
+===============+=================+===========================+
124+
| GPIO_AON_04 | GPIO | SW8 |
125+
+---------------+-----------------+---------------------------+
126+
| GPIO_AD_27 | GPIO | LED |
127+
+---------------+-----------------+---------------------------+
128+
| GPIO_AON_08 | LPUART1_TX | UART Console |
129+
+---------------+-----------------+---------------------------+
130+
| GPIO_AON_09 | LPUART1_RX | UART Console |
131+
+---------------+-----------------+---------------------------+
132+
133+
System Clock
134+
============
135+
136+
The MIMXRT1180 SoC is configured to use SysTick as the system clock source,
137+
running at 240MHz. When targeting the M7 core, SysTick will also be used,
138+
running at 792MHz
139+
140+
Serial Port
141+
===========
142+
143+
The MIMXRT1180 SoC has 12 UARTs. One is configured for the console and the
144+
remaining are not used.
145+
146+
Programming and Debugging
147+
*************************
148+
149+
Build and flash applications as usual (see :ref:`build_an_application` and
150+
:ref:`application_run` for more details).
151+
152+
Configuring a Debug Probe
153+
=========================
154+
155+
A debug probe is used for both flashing and debugging the board. This board is
156+
configured by default to use the :ref:`mcu-link-cmsis-onboard-debug-probe`,
157+
however the :ref:`pyocd-debug-host-tools` do not yet support programming the
158+
external flashes on this board so you must reconfigure the board for one of the
159+
following debug probes instead.
160+
161+
.. _Using J-Link RT1180:
162+
163+
Using J-Link
164+
------------
165+
166+
Please ensure used JLINK above V7.94g and jumper JP5 installed if using
167+
external jlink plus on J37 as debugger.
168+
169+
When debugging cm33 core, need to ensure the SW5 on "0100" mode.
170+
When debugging cm7 core, need to ensure the SW5 on "0001" mode.
171+
(Only support run cm7 image when debugging due to default boot core on board is cm33 core)
172+
173+
Install the :ref:`jlink-debug-host-tools` and make sure they are in your search
174+
path.
175+
176+
There are two options: the onboard debug circuit can be updated with Segger
177+
J-Link firmware, or :ref:`jlink-external-debug-probe` can be attached to the
178+
EVK.
179+
180+
181+
Using Linkserver
182+
----------------
183+
184+
Please ensure used linkserver above V1.5.30 and jumper JP5 uninstalled.
185+
186+
When debugging cm33 core, need to ensure the SW5 on "0100" mode.
187+
When debugging cm7 core, need to ensure the SW5 on "0001" mode.
188+
(Only support run cm7 image when debugging due to default boot core on board is cm33 core)
189+
190+
Configuring a Console
191+
=====================
192+
193+
Regardless of your choice in debug probe, we will use the MCU-Link
194+
microcontroller as a usb-to-serial adapter for the serial console. Check that
195+
jumpers JP5 and JP3 are **on** (they are on by default when boards ship from
196+
the factory) to connect UART signals to the MCU-Link microcontroller.
197+
198+
Connect a USB cable from your PC to J53.
199+
200+
Use the following settings with your serial terminal of choice (minicom, putty,
201+
etc.):
202+
203+
- Speed: 115200
204+
- Data: 8 bits
205+
- Parity: None
206+
- Stop bits: 1
207+
208+
Flashing
209+
========
210+
211+
Here is an example for the :ref:`hello_world` application on cm33 core.
212+
213+
Before power on the board, make sure SW5 is set to 0100b
214+
215+
.. zephyr-app-commands::
216+
:zephyr-app: samples/hello_world
217+
:board: mimxrt1180_evk/mimxrt1189/cm33
218+
:goals: flash
219+
220+
Power off the board, then power on the board and
221+
open a serial terminal, reset the board (press the SW3 button), and you should
222+
see the following message in the terminal:
223+
224+
.. code-block:: console
225+
226+
***** Booting Zephyr OS v3.7.0-xxx-xxxxxxxxxxxxx *****
227+
Hello World! mimxrt1180_evk/mimxrt1189/cm33
228+
229+
Debugging
230+
=========
231+
232+
Here is an example for the :ref:`hello_world` application.
233+
234+
.. zephyr-app-commands::
235+
:zephyr-app: samples/hello_world
236+
:board: mimxrt1180_evk/mimxrt1189/cm33
237+
:goals: debug
238+
239+
Open a serial terminal, step through the application in your debugger, and you
240+
should see the following message in the terminal:
241+
242+
.. code-block:: console
243+
244+
***** Booting Zephyr OS v3.7.0-xxx-xxxxxxxxxxxxx *****
245+
Hello World! mimxrt1180_evk/mimxrt1189/cm33
246+
247+
.. _MIMXRT1180-EVK Website:
248+
https://www.nxp.com/design/design-center/development-boards-and-designs/i-mx-evaluation-and-development-boards/i-mx-rt1180-evaluation-kit:MIMXRT1180-EVK
249+
250+
.. _i.MX RT1180 Website:
251+
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt1180-crossover-mcu-with-tsn-switch-and-edgelock:i.MX-RT1180
Binary file not shown.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright 2024 NXP
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
*/
6+
7+
#include <nxp/nxp_imx/rt/mimxrt1189cvm8b-pinctrl.dtsi>
8+
9+
&pinctrl {
10+
pinmux_lpspi3: pinmux_lpspi3 {
11+
group0 {
12+
pinmux = <&iomuxc_gpio_sd_b1_00_lpspi3_pcs0>,
13+
<&iomuxc_gpio_sd_b1_01_lpspi3_sck>,
14+
<&iomuxc_gpio_sd_b1_02_lpspi3_sout>,
15+
<&iomuxc_gpio_sd_b1_03_lpspi3_sin>;
16+
drive-strength = "high";
17+
slew-rate = "fast";
18+
};
19+
};
20+
21+
pinmux_lpuart1: pinmux_lpuart1 {
22+
group0 {
23+
pinmux = <&iomuxc_aon_gpio_aon_09_lpuart1_rxd>,
24+
<&iomuxc_aon_gpio_aon_08_lpuart1_txd>;
25+
drive-strength = "high";
26+
slew-rate = "fast";
27+
};
28+
};
29+
30+
pinmux_lpuart1_sleep: pinmux_lpuart1_sleep {
31+
group0 {
32+
pinmux = <&iomuxc_aon_gpio_aon_09_gpio1_io09>;
33+
drive-strength = "high";
34+
bias-pull-up;
35+
slew-rate = "fast";
36+
};
37+
group1 {
38+
pinmux = <&iomuxc_aon_gpio_aon_08_lpuart1_txd>;
39+
drive-strength = "high";
40+
slew-rate = "fast";
41+
};
42+
};
43+
};

0 commit comments

Comments
 (0)