Skip to content

Update hal nxp to mcux sdk 25.06.00 #93306

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions boards/nxp/frdm_mcxa166/Kconfig.frdm_mcxa166

This file was deleted.

6 changes: 0 additions & 6 deletions boards/nxp/frdm_mcxa166/board.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

config BOARD_FRDM_MCXA166
config BOARD_FRDM_MCXA346
select BOARD_EARLY_INIT_HOOK
6 changes: 6 additions & 0 deletions boards/nxp/frdm_mcxa346/Kconfig.frdm_mcxa346
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright 2025 NXP
# SPDX-License-Identifier: Apache-2.0

config BOARD_FRDM_MCXA346
select SOC_MCXA346
select SOC_PART_NUMBER_MCXA346VLQ
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# SPDX-License-Identifier: Apache-2.0
#

board_runner_args(jlink "--device=MCXA166")
board_runner_args(linkserver "--device=MCXA166:FRDM-MCXA166")
board_runner_args(pyocd "--target=mcxA166")
board_runner_args(jlink "--device=MCXA346")
board_runner_args(linkserver "--device=MCXA346:FRDM-MCXA346")
board_runner_args(pyocd "--target=MCXA346")

include(${ZEPHYR_BASE}/boards/common/linkserver.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
Expand Down
6 changes: 6 additions & 0 deletions boards/nxp/frdm_mcxa346/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
board:
name: frdm_mcxa346
full_name: FRDM-MCXA346
vendor: nxp
socs:
- name: mcxa346
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
.. zephyr:board:: frdm_mcxa166
.. zephyr:board:: frdm_mcxa346

Overview
********

FRDM-MCXA166 are compact and scalable development boards for rapid prototyping of
FRDM-MCXA346 are compact and scalable development boards for rapid prototyping of
MCX A16X MCUs. They offer industry standard headers for easy access to the MCUs I/Os,
integrated open-standard serial interfaces and an on-board MCU-Link debugger.
MCX A Series are high-performance, low-power microcontrollers with MAU,SmartDMA and performance efficiency.

Hardware
********

- MCX-A166 Arm Cortex-M33 microcontroller running at 180 MHz
- MCX-A346 Arm Cortex-M33 microcontroller running at 180 MHz
- 1MB dual-bank on chip Flash
- 256 KB RAM
- 1x FlexCAN with FD, 1x RGB LED, 3x SW buttons
- On-board MCU-Link debugger with CMSIS-DAP
- Arduino Header, SmartDMA/Camera Header, mikroBUS

For more information about the MCX-A166 SoC and FRDM-MCXA166 board, see:
For more information about the MCX-A346 SoC and FRDM-MCXA346 board, see:

- `MCX-A166 SoC Website`_
- `MCX-A166 Datasheet`_
- `MCX-A166 Reference Manual`_
- `FRDM-MCXA166 Website`_
- `FRDM-MCXA166 User Guide`_
- `FRDM-MCXA166 Board User Manual`_
- `FRDM-MCXA166 Schematics`_
- `MCX-A346 SoC Website`_
- `MCX-A346 Datasheet`_
- `MCX-A346 Reference Manual`_
- `FRDM-MCXA346 Website`_
- `FRDM-MCXA346 User Guide`_
- `FRDM-MCXA346 Board User Manual`_
- `FRDM-MCXA346 Schematics`_

Supported Features
==================
Expand All @@ -36,7 +36,7 @@ Supported Features
Connections and IOs
===================

The MCX-A166 SoC has 6 gpio controllers and has pinmux registers which
The MCX-A346 SoC has 6 gpio controllers and has pinmux registers which
can be used to configure the functionality of a pin.

+------------+-----------------+----------------------------+
Expand All @@ -50,13 +50,13 @@ can be used to configure the functionality of a pin.
System Clock
============

The MCX-A166 SoC is configured to use FRO running at 180MHz as a source for
The MCX-A346 SoC is configured to use FRO running at 180MHz as a source for
the system clock.

Serial Port
===========

The FRDM-MCXA166 SoC has 6 LPUART interfaces for serial communication.
The FRDM-MCXA346 SoC has 6 LPUART interfaces for serial communication.
LPUART 2 is configured as UART for the console.

Programming and Debugging
Expand Down Expand Up @@ -118,7 +118,7 @@ Here is an example for the :zephyr:code-sample:`hello_world` application.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: frdm_mcxa166
:board: frdm_mcxa346
:goals: flash

Open a serial terminal, reset the board (press the RESET button), and you should
Expand All @@ -127,7 +127,7 @@ see the following message in the terminal:
.. code-block:: console

*** Booting Zephyr OS build v3.6.0-4478-ge6c3a42f5f52 ***
Hello World! frdm_mcxa166/mcxa166
Hello World! frdm_mcxa346/mcxa346

Debugging
=========
Expand All @@ -136,7 +136,7 @@ Here is an example for the :zephyr:code-sample:`hello_world` application.

.. zephyr-app-commands::
:zephyr-app: samples/hello_world
:board: frdm_mcxa166/mcxa166
:board: frdm_mcxa346/mcxa346
:goals: debug

Open a serial terminal, step through the application in your debugger, and you
Expand All @@ -145,7 +145,7 @@ should see the following message in the terminal:
.. code-block:: console

*** Booting Zephyr OS build v3.6.0-4478-ge6c3a42f5f52 ***
Hello World! frdm_mcxa166/mcxa166
Hello World! frdm_mcxa346/mcxa346

Troubleshooting
===============
Expand All @@ -156,23 +156,23 @@ Troubleshooting
.. include:: ../../common/board-footer.rst
:start-after: nxp-board-footer

.. _MCX-A166 SoC Website:
.. _MCX-A346 SoC Website:
https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/mcx-arm-cortex-m/mcx-a-series-microcontrollers/mcx-a13x-14x-15x-mcus-with-arm-cortex-m33-scalable-device-options-low-power-and-intelligent-peripherals:MCX-A13X-A14X-A15X

.. _MCX-A166 Datasheet:
.. _MCX-A346 Datasheet:
https://www.nxp.com/docs/en/data-sheet/MCXAP100M96FS6.pdf

.. _MCX-A166 Reference Manual:
.. _MCX-A346 Reference Manual:
https://www.nxp.com/webapp/Download?colCode=MCXAP100M96FS6RM

.. _FRDM-MCXA166 Website:
https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/frdm-development-board-for-mcx-a144-5-6-a154-5-6-mcus:FRDM-MCXA166
.. _FRDM-MCXA346 Website:
https://www.nxp.com/design/design-center/development-boards-and-designs/general-purpose-mcus/frdm-development-board-for-mcx-a144-5-6-a154-5-6-mcus:FRDM-MCXA346

.. _FRDM-MCXA166 User Guide:
https://www.nxp.com/document/guide/getting-started-with-frdm-mcxa166:GS-FRDM-MCXA166
.. _FRDM-MCXA346 User Guide:
https://www.nxp.com/document/guide/getting-started-with-frdm-mcxa346:GS-FRDM-MCXA346

.. _FRDM-MCXA166 Board User Manual:
.. _FRDM-MCXA346 Board User Manual:
https://www.nxp.com/docs/en/user-manual/UM12121.pdf

.. _FRDM-MCXA166 Schematics:
.. _FRDM-MCXA346 Schematics:
https://www.nxp.com/webapp/Download?colCode=SPF-90841
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/


#include <nxp/mcx/MCXA166VLQ-pinctrl.h>
#include <nxp/mcx/MCXA346VLQ-pinctrl.h>

&pinctrl {
pinmux_lpuart2: pinmux_lpuart2 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

/dts-v1/;

#include <nxp/nxp_mcxa166.dtsi>
#include "frdm_mcxa166-pinctrl.dtsi"
#include <nxp/nxp_mcxa346.dtsi>
#include "frdm_mcxa346-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>

/ {
model = "NXP FRDM_MCXA166 board";
compatible = "nxp,mcxa166", "nxp,mcx";
model = "NXP FRDM_MCXA346 board";
compatible = "nxp,mcxa346", "nxp,mcx";

aliases{
led0 = &red_led;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# SPDX-License-Identifier: Apache-2.0
#

identifier: frdm_mcxa166
name: NXP FRDM MCXA166
identifier: frdm_mcxa346
name: NXP FRDM MCXA346
type: mcu
arch: arm
ram: 240
Expand Down
2 changes: 1 addition & 1 deletion boards/nxp/mimxrt1170_evk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
# This configuration block may need modification if another SDRAM chip
# is used on your custom board.
zephyr_compile_definitions(XIP_BOOT_HEADER_XMCD_ENABLE=1)
zephyr_library_sources(${RT1170_BOARD_DIR}/xmcd/xmcd.c)
zephyr_library_sources(${RT1170_BOARD_DIR}/xmcd.c)
else()
if(CONFIG_SRAM_BASE_ADDRESS EQUAL 0x80000000)
message(WARNING "You are using SDRAM as RAM but no external memory"
Expand Down
2 changes: 2 additions & 0 deletions doc/releases/migration-guide-4.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Kernel
Boards
******

* NXP ``frdm_mcxa166`` is renamed to ``frdm_mcxa346``.

Device Drivers and Devicetree
*****************************

Expand Down
4 changes: 4 additions & 0 deletions drivers/interrupt_controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@ if(CONFIG_PLIC_SHELL)
)
endif()

if(CONFIG_NXP_PINT)
zephyr_compile_definitions(PINT_USE_LEGACY_CALLBACK=1)
endif()

zephyr_library_include_directories(${ZEPHYR_BASE}/arch/common/include)
File renamed without changes.
41 changes: 41 additions & 0 deletions modules/hal_nxp/mcux/mcux-sdk-ng/device/device.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ endif()
if(DEFINED CONFIG_MCUX_CORE_SUFFIX)
if (CONFIG_SOC_MIMXRT595S_F1)
set(core_id "fusionf1")
elseif (CONFIG_SOC_MIMXRT685S_HIFI4)
set(core_id "hifi4")
else()
string (REGEX REPLACE "^_" "" core_id "${CONFIG_MCUX_CORE_SUFFIX}")
endif()
Expand Down Expand Up @@ -85,6 +87,45 @@ zephyr_compile_definitions("CPU_${CONFIG_SOC_PART_NUMBER}${core_id_suffix_name}"
# Definitions to load device drivers, like: CPU_MIMXRT595SFAWC_dsp.
set(CONFIG_MCUX_HW_DEVICE_CORE "${MCUX_DEVICE}${core_id_suffix_name}")

# Necessary values to load right SDK NG cmake files
# CONFIG_MCUX_HW_CORE
# CONFIG_MCUX_HW_FPU_TYPE
#
# They are used by the files like:
# zephyr/modules/hal/nxp/mcux/mcux-sdk-ng/devices/arm/shared.cmake
# zephyr/modules/hal/nxp/mcux/mcux-sdk-ng/devices/xtensa/shared.cmake
if (CONFIG_CPU_CORTEX_M0PLUS)
set(CONFIG_MCUX_HW_CORE cm0p)
elseif (CONFIG_CPU_CORTEX_M3)
set(CONFIG_MCUX_HW_CORE cm3)
elseif (CONFIG_CPU_CORTEX_M33)
set(CONFIG_MCUX_HW_CORE cm33)
elseif (CONFIG_CPU_CORTEX_M4)
if (CONFIG_CPU_HAS_FPU)
set(CONFIG_MCUX_HW_CORE cm4f)
else()
set(CONFIG_MCUX_HW_CORE cm4)
endif()
elseif (CONFIG_CPU_CORTEX_M7)
set(CONFIG_MCUX_HW_CORE cm7f)
elseif (CONFIG_XTENSA)
set(CONFIG_MCUX_HW_CORE dsp)
endif()

if (CONFIG_CPU_HAS_FPU)
if (CONFIG_CPU_CORTEX_M33 OR CONFIG_CPU_CORTEX_M7)
if (CONFIG_CPU_HAS_FPU_DOUBLE_PRECISION)
set(CONFIG_MCUX_HW_FPU_TYPE fpv5_dp)
else()
set(CONFIG_MCUX_HW_FPU_TYPE fpv5_sp)
endif()
elseif (CONFIG_CPU_CORTEX_M4)
set(CONFIG_MCUX_HW_FPU_TYPE fpv4_sp)
endif()
else()
set(CONFIG_MCUX_HW_FPU_TYPE no_fpu)
endif()

# Load device files
mcux_add_cmakelists(${mcux_device_folder})

Expand Down
13 changes: 11 additions & 2 deletions modules/hal_nxp/mcux/mcux-sdk-ng/drivers/drivers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ set_variable_ifdef(CONFIG_DMA_MCUX_LPC CONFIG_MCUX_COMPONENT_driver.lpc
set_variable_ifdef(CONFIG_GPIO_MCUX_LPC CONFIG_MCUX_COMPONENT_driver.lpc_gpio)
set_variable_ifdef(CONFIG_NXP_PINT CONFIG_MCUX_COMPONENT_driver.pint)
set_variable_ifdef(CONFIG_NXP_PINT CONFIG_MCUX_COMPONENT_driver.inputmux)
set_variable_ifdef(CONFIG_DMA_MCUX_SMARTDMA CONFIG_MCUX_COMPONENT_driver.inputmux)
set_variable_ifdef(CONFIG_I2C_MCUX_FLEXCOMM CONFIG_MCUX_COMPONENT_driver.flexcomm)
set_variable_ifdef(CONFIG_I2C_MCUX_FLEXCOMM CONFIG_MCUX_COMPONENT_driver.flexcomm_i2c)
set_variable_ifdef(CONFIG_I2S_MCUX_FLEXCOMM CONFIG_MCUX_COMPONENT_driver.flexcomm)
Expand Down Expand Up @@ -121,7 +120,6 @@ set_variable_ifdef(CONFIG_ADC_MCUX_ETC CONFIG_MCUX_COMPONENT_driver.adc
set_variable_ifdef(CONFIG_MCUX_XBARA CONFIG_MCUX_COMPONENT_driver.xbara)
set_variable_ifdef(CONFIG_QDEC_MCUX CONFIG_MCUX_COMPONENT_driver.enc)
set_variable_ifdef(CONFIG_CRYPTO_MCUX_DCP CONFIG_MCUX_COMPONENT_driver.dcp)
set_variable_ifdef(CONFIG_DMA_MCUX_SMARTDMA CONFIG_MCUX_COMPONENT_driver.smartdma)
set_variable_ifdef(CONFIG_DAC_MCUX_LPDAC CONFIG_MCUX_COMPONENT_driver.dac_1)
set_variable_ifdef(CONFIG_NXP_IRQSTEER CONFIG_MCUX_COMPONENT_driver.irqsteer)
set_variable_ifdef(CONFIG_AUDIO_DMIC_MCUX CONFIG_MCUX_COMPONENT_driver.dmic)
Expand Down Expand Up @@ -150,6 +148,17 @@ set_variable_ifdef(CONFIG_SOC_FAMILY_KINETIS CONFIG_MCUX_COMPONENT_driver.p
set_variable_ifdef(CONFIG_SOC_FAMILY_MCXW CONFIG_MCUX_COMPONENT_driver.ccm32k)
set_variable_ifdef(CONFIG_SOC_SERIES_IMXRT5XX CONFIG_MCUX_COMPONENT_driver.iap3)

if(CONFIG_DMA_MCUX_SMARTDMA)
set(CONFIG_MCUX_COMPONENT_driver.smartdma ON)
set(CONFIG_MCUX_COMPONENT_driver.inputmux ON)
if(CONFIG_SOC_SERIES_IMXRT5XX)
set(CONFIG_MCUX_COMPONENT_driver.smartdma_rt500 ON)
endif()
if(CONFIG_SOC_MCXN947)
set(CONFIG_MCUX_COMPONENT_driver.smartdma_mcxn ON)
endif()
endif()

if(CONFIG_ETH_NXP_IMX_NETC)
set_variable_ifdef(CONFIG_SOC_MIMXRT1189 CONFIG_MCUX_COMPONENT_driver.netc_rt1180)
set_variable_ifdef(CONFIG_SOC_MIMX9596 CONFIG_MCUX_COMPONENT_driver.netc_imx95)
Expand Down
2 changes: 1 addition & 1 deletion samples/drivers/adc/adc_dt/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tests:
- xg24_rb4187c
- xg29_rb4412a
- raytac_an54l15q_db/nrf54l15/cpuapp
- frdm_mcxa166
- frdm_mcxa346
- frdm_mcxa276
- s32k148_evb
integration_platforms:
Expand Down
6 changes: 3 additions & 3 deletions samples/sensor/mcux_lpcmp/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ LPCMP positive input port voltage by changing the voltage input to J2-9.
:goals: build flash
:compact:

Building and Running for NXP FRDM-MCXA166
Building and Running for NXP FRDM-MCXA346
=========================================
Build the application for the :zephyr:board:`frdm_mcxa166` board, and adjust the
Build the application for the :zephyr:board:`frdm_mcxa346` board, and adjust the
LPCMP positive input port voltage by changing the voltage input to J2-17.

.. zephyr-app-commands::
:zephyr-app: samples/sensor/mcux_lpcmp
:board: frdm_mcxa166
:board: frdm_mcxa346
:goals: build flash
:compact:

Expand Down
4 changes: 2 additions & 2 deletions samples/sensor/mcux_lpcmp/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ common:
- frdm_mcxn236
- frdm_mcxa156
- frdm_mcxa153
- frdm_mcxa166
- frdm_mcxa346
- frdm_mcxa276
integration_platforms:
- frdm_mcxn947/mcxn947/cpu0
- frdm_mcxn236
- frdm_mcxa166
- frdm_mcxa346
- frdm_mcxa276
tags:
- drivers
Expand Down
4 changes: 4 additions & 0 deletions scripts/ci/check_compliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -1223,8 +1223,12 @@ def check_no_undef_outside_kconfig(self, kconf):
"MCUBOOT_SERIAL", # Used in (sysbuild-based) test/
# documentation
"MCUMGR_GRP_EXAMPLE_OTHER_HOOK", # Used in documentation
"MCUX_HW_CORE", # Used in modules/hal_nxp/mcux/mcux-sdk-ng/device/device.cmake.
# It is a variable used by MCUX SDK CMake.
"MCUX_HW_DEVICE_CORE", # Used in modules/hal_nxp/mcux/mcux-sdk-ng/device/device.cmake.
# It is a variable used by MCUX SDK CMake.
"MCUX_HW_FPU_TYPE", # Used in modules/hal_nxp/mcux/mcux-sdk-ng/device/device.cmake.
# It is a variable used by MCUX SDK CMake.
"MISSING",
"MODULES",
"MODVERSIONS", # Linux, in boards/xtensa/intel_adsp_cavs25/doc
Expand Down
Loading
Loading