Skip to content

Commit b32eaa7

Browse files
scottwcpgkartben
authored andcommitted
boards: microchip: mec_assy6941: Add MEC5 evaluation board 6941
We added the mec_assy6941 an evaluation board for MEC5 HAL based MEC174x and MEC175x parts. We support these Microchip chips: mec1743_qlj, mec1743_qsz, mec1753_qlj, and mec1753_qsz. LJ refers to 176-pin and SZ to 144-pin WFGA packages. Q refers to total SRAM of 480KB. Building the board with one of the SoC's requires passing mec_assy9641/<soc_name>. For example: mec_assy6941/mec1753_qlj is passed to west via the "-b" command line option. The SoC's are configured to use Microchip's 32-bit 32KHz RTOS timer as the kernel tick. Refer to the board DTS rtimer node. If the user wishes to use ARM SYSTICK as the kernel timer then disable the rtimer node in the application overlay. Signed-off-by: Scott Worley <scott.worley@microchip.com>
1 parent 059ee10 commit b32eaa7

25 files changed

+1015
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#
2+
# Copyright (c) 2025 Microchip Technology Inc.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
if(CONFIG_SOC_SERIES_MEC174X)
8+
set(PART_PREFIX mec174x)
9+
elseif(CONFIG_SOC_SERIES_MEC175X)
10+
set(PART_PREFIX mec175x)
11+
else()
12+
message(NOTICE "Unknown SoC series! No SPI image will be generated")
13+
endif()
14+
15+
if(DEFINED ENV{MEC5_SPI_GEN})
16+
# Grab it from environment variable if defined
17+
set(MEC5_SPI_GEN $ENV{MEC5_SPI_GEN})
18+
else()
19+
# Else find the tool in PATH
20+
if(CMAKE_HOST_APPLE)
21+
# CMAKE_HOST_UNIX is also true for Apple,
22+
# but there is no tool for Apple. So
23+
# we need to skip it.
24+
message(NOTICE "There is no SPI image generation tool for MacOS.")
25+
elseif(CMAKE_HOST_UNIX)
26+
set(MEC5_SPI_GEN_FILENAME ${PART_PREFIX}_spi_gen_linux_x86_64)
27+
elseif(CMAKE_HOST_WIN32)
28+
set(MEC5_SPI_GEN_FILENAME ${PART_PREFIX}_spi_gen.exe)
29+
endif()
30+
31+
find_file(MEC5_SPI_GEN_FINDFILE ${MEC5_SPI_GEN_FILENAME})
32+
if(MEC5_SPI_GEN_FINDFILE STREQUAL MEC5_SPI_GEN_FINDFILE-NOTFOUND)
33+
message(WARNING "Microchip SPI Image Generation tool (${MEC5_SPI_GEN_FILENAME}) is not available. SPI Image will not be generated.")
34+
else()
35+
set(MEC5_SPI_GEN ${MEC5_SPI_GEN_FINDFILE})
36+
endif()
37+
38+
unset(MEC5_SPI_GEN_FINDFILE)
39+
unset(MEC5_SPI_GEN_FILENAME)
40+
endif()
41+
42+
if(DEFINED MEC5_SPI_GEN)
43+
if(DEFINED ENV{MEC5_SPI_CFG})
44+
set(MEC5_SPI_CFG $ENV{MEC5_SPI_CFG})
45+
else()
46+
set(MEC5_SPI_CFG ${BOARD_DIR}/support/${PART_PREFIX}_spi_cfg.txt)
47+
endif()
48+
49+
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
50+
COMMAND ${MEC5_SPI_GEN}
51+
-i ${MEC5_SPI_CFG}
52+
-o ${PROJECT_BINARY_DIR}/${SPI_IMAGE_NAME}
53+
)
54+
55+
unset(MEC5_SPI_GEN)
56+
unset(MEC5_SPI_CFG)
57+
endif()
58+
59+
unset(PART_PREFIX)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2025 Microchip Technology Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_MEC_ASSY6941
5+
select SOC_MEC1743_QLJ if BOARD_MEC_ASSY6941_MEC1743_QLJ
6+
select SOC_MEC1743_QSZ if BOARD_MEC_ASSY6941_MEC1743_QSZ
7+
select SOC_MEC1753_QLJ if BOARD_MEC_ASSY6941_MEC1753_QLJ
8+
select SOC_MEC1753_QSZ if BOARD_MEC_ASSY6941_MEC1753_QSZ
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025, Microchip Technology Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_MEC_ASSY6941_MEC1743_QLJ
5+
select SOC_MEC1743_QLJ
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025, Microchip Technology Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_MEC_ASSY6941_MEC1743_QSZ
5+
select SOC_MEC1743_QSZ
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025, Microchip Technology Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_MEC_ASSY6941_MEC1753_QLJ
5+
select SOC_MEC1753_QLJ
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025, Microchip Technology Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_MEC_ASSY6941_MEC1753_QSZ
5+
select SOC_MEC1753_QSZ
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
set(SPI_IMAGE_NAME spi_image.bin)
4+
5+
board_set_flasher_ifnset(dediprog)
6+
7+
# --vcc=0 - use 3.5V to flash
8+
board_finalize_runner_args(dediprog
9+
"--spi-image=${PROJECT_BINARY_DIR}/${SPI_IMAGE_NAME}"
10+
"--vcc=0"
11+
)
12+
13+
# This allows a custom script to be used for flashing the SPI chip.
14+
include(${ZEPHYR_BASE}/boards/common/misc.board.cmake)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
board:
2+
name: mec_assy6941
3+
full_name: MEC17xxEVB ASSY6941
4+
vendor: microchip
5+
socs:
6+
- name: mec1743_qlj
7+
- name: mec1743_qsz
8+
- name: mec1753_qlj
9+
- name: mec1753_qsz

0 commit comments

Comments
 (0)