# microchip-hal **Repository Path**: zephyr4microchip/microchip-hal ## Basic Information - **Project Name**: microchip-hal - **Description**: Microchip downstream of https://github.com/zephyrproject-rtos/hal_microchip - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-03 - **Last Updated**: 2026-07-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Introduction The **hal_microchip** is a set of register definitions for Microchip SoC's. The HAL directory structure detailed below. ## Directory Structure ``` . ├── CMakeLists.txt ├── dts │   └── microchip │   └── mec5 │   ├── MEC5 PINCTRL DTSI files │ ├── include │   └── dt-bindings │      ├── sam │ │ ├── sam_d5x_e5x — dt-binding header files for SAM_D5X_E5X family devices │ │   ├── sama7d6 — dt-binding header files for SAMA7D6 family devices │ │   ├── sama7g5 — dt-binding header files for SAMA7G5 family devices | | │      ├── pic32c | | ├── pic32ck_sg_gc — dt-binding header files for PIC32CK SG/GC family devices │ │   ├── pic32cm_jh — dt-binding header files for PIC32CM JH family devices │ │   ├── pic32cm_pl — dt-binding header files for PIC32CM PL family devices | | ├── pic32cm_sg_gc — dt-binding header files for PIC32CM SG/GC family devices │ │   ├── pic32cx_sg — dt-binding header files for PIC32CX SG family devices │ │   ├── pic32cz_ca — dt-binding header files for PIC32CZ CA family devices │ ├── mec │   ├── Legacy MEC150x/2x C chip and peripheral header files │ ├── mec5 │   ├── CMakeLists.txt │   ├── devices │   │   ├── MEC5 HAL chip and peripheral header files │   └── drivers │   ├── MEC5 HAL peripheral C source files │ ├── mpfs │   ├── PolarFire board and HAL files │ ├── packs │ ├── CMakeLists.txt │ ├── pic32c │ │   ├── CMakeLists.txt | | ├── pic32ck_sg_gc — DFP header files for PIC32CK SG/GC family devices │ │   ├── pic32cm_jh — DFP header files for PIC32CM JH family devices │ │   ├── pic32cm_pl — DFP header files for PIC32CM PL family devices | | ├── pic32cm_sg_gc — DFP header files for PIC32CM SG/GC family devices │ │   ├── pic32cx_sg — DFP header files for PIC32CX SG family devices │ │   ├── pic32cz_ca — DFP header files for PIC32CZ CA family devices │ │ │ └── sam │ ├── CMakeLists.txt │ ├── sam_d5x_e5x — DFP header files for SAM_D5X_E5X family devices │ ├── sama7d6 — DFP header files for SAMA7D6 family devices │ ├── sama7g5 — DFP header files for SAMA7G5 family devices │ ├── README.md │ └── zephyr └── module.yml ``` - MEC5 chips Zephyr device tree PINCFG DTSI files - Includes specific for these platforms - devicetree bindings - Legacy MEC152x header files - MEC5 HAL chip and peripheral header and C source files - Device family DFP header files of PIC32C devices - Device family DFP header files of SAM devices - This README file - ZephyrRTOS module directory (`zephyr`). # How to submit code Any contribution should follow the `How to submit code` using as premisses the [Zephyr Contribution Guidelines](https://docs.zephyrproject.org/latest/contribute/index.html). For more information about External Modules see [Modules Section](https://docs.zephyrproject.org/latest/develop/modules.html) in special [Submitting Changes to Modules](https://docs.zephyrproject.org/latest/develop/modules.html#submitting-changes-to-modules) ## MEC5 HAL The MEC5 HAL currently support Microchip MEC172x (named MECH172x in Zephyr SoC), MEC174x, and MEC175x.
On the Zephyr side the SoC layer build rules set CONFIG_HAS_MEC5_HAL=y.
The top level CMakeLists.txt then processes the hal_microchip/mec5 subfolder.
The MEC5 HAL device is chosen using Zephyr CONFIG_SOC_SERIES and CONFIG_SOC.
Zephyr SoC layer soc.h for MECH172x, MEC174x, and MEC175x include device_mec5.h from the MEC5 HAL.
Zephyr drivres and applications should include individual HAL API headers to access specific peripherals.
## MPFS PolarFile HAL The Microchip Polarfire SOC HAL was downloaded from: https://github.com/polarfire-soc/platform Addditionally, the bare metal samples from https://github.com/polarfire-soc/polarfire-soc-bare-metal-examples are required to extract the Icicle Kit bopard configuration files. Both are from Tag 21.08 The following changes were made: - platform-2021.08 top folder renamed to mpfs and located at modules/hal/microchip - The applications/mpfs-pmp-demo/mpfs-pmp-app-u54-1/src/boards folder is copied to modules/hal/microchip/mpfs