{"id":20841223,"url":"https://github.com/zephyrproject-rtos/hal_microchip","last_synced_at":"2025-09-05T02:39:59.117Z","repository":{"id":35179557,"uuid":"179893203","full_name":"zephyrproject-rtos/hal_microchip","owner":"zephyrproject-rtos","description":"HAL module for Microchip devices","archived":false,"fork":false,"pushed_at":"2025-08-21T05:51:17.000Z","size":6171,"stargazers_count":11,"open_issues_count":3,"forks_count":25,"subscribers_count":39,"default_branch":"master","last_synced_at":"2025-08-27T11:52:30.626Z","etag":null,"topics":["hal","module"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zephyrproject-rtos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-06T22:26:50.000Z","updated_at":"2025-08-21T06:09:56.000Z","dependencies_parsed_at":"2024-06-03T22:02:19.253Z","dependency_job_id":"1a6e9a6e-6fe8-4f25-b97b-e92a443d878a","html_url":"https://github.com/zephyrproject-rtos/hal_microchip","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zephyrproject-rtos/hal_microchip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephyrproject-rtos%2Fhal_microchip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephyrproject-rtos%2Fhal_microchip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephyrproject-rtos%2Fhal_microchip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephyrproject-rtos%2Fhal_microchip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zephyrproject-rtos","download_url":"https://codeload.github.com/zephyrproject-rtos/hal_microchip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephyrproject-rtos%2Fhal_microchip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273703278,"owners_count":25152999,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hal","module"],"created_at":"2024-11-18T01:19:19.917Z","updated_at":"2025-09-05T02:39:54.101Z","avatar_url":"https://github.com/zephyrproject-rtos.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nThe **hal_microchip** is a set of register definitions for Microchip PIC32C/PIC32M SoC's.\nThe HAL is organized following the directory structure detailed below.\n\n## Directory Structure\n\nThe directory is composed of:\n\n```\n.\n├── CMakeLists.txt\n├── dts\n│   └── microchip\n│       └── mec5\n│           ├── MEC5 PINCTRL DTSI files\n├── include\n│   └── dt-bindings\n│       ├── sam\n|       |   └── sam_d5x_e5x — dt-binding header files for the SAM_D5X_E5X family devices\n│       └── pinctrl\n│           ├── PIC32CX PINCTRL C header files\n├── mec\n│   ├── Legacy MEC150x/2x C chip and peripheral header files\n├── mec5\n│   ├── CMakeLists.txt\n│   ├── devices\n│   │   ├── MEC5 HAL chip and peripheral header files\n│   └── drivers\n│       ├── MEC5 HAL peripheral C source files\n├── mpfs\n│   ├── PolarFire board and HAL files\n├── pic32c\n│   ├── PIC32CX chip and peripheral HAL files\n├── pinconfigs\n│   ├── PIC32CX pin config definition XML\n├── sam\n│   ├── CMakeLists.txt\n│   ├── sam_d5x_e5x — DFP header files for SAM_D5X_E5X family devices\n├── README.md\n├── scripts\n│   ├── PIC32C Python pin config generation scripts\n└── zephyr\n    └── module.yml\n\n```\n\n - MEC5 chips Zephyr device tree PINCFG DTSI files\n - PIC32C SoC specific include libraries.\n - Includes specific for these platforms\n   - devicetree bindings\n - Legacy MEC152x header files\n - MEC5 HAL chip and peripheral header and C source files\n - [PIC32C Pin definitions](pinconfigs/README.md)\n - sam device family dfp header files\n - This README file\n - [PIC32C Scripts](scripts/README.md) used for code generation\n - ZephyrRTOS module directory (`zephyr`).\n\n# How to submit code\n\nAny contribution should follow the `How to submit code` using as premisses the\n[Zephyr Contribution Guidelines](https://docs.zephyrproject.org/latest/contribute/index.html).\nFor more information about External Modules see\n[Modules Section](https://docs.zephyrproject.org/latest/develop/modules.html) in special\n[Submitting Changes to Modules](https://docs.zephyrproject.org/latest/develop/modules.html#submitting-changes-to-modules)\n\n## MEC5 HAL\nThe MEC5 HAL currently support Microchip MEC172x (named MECH172x in Zephyr SoC), MEC174x, and MEC175x.\u003cbr/\u003e\nOn the Zephyr side the SoC layer build rules set CONFIG_HAS_MEC5_HAL=y.\u003cbr/\u003e\nThe top level CMakeLists.txt then processes the hal_microchip/mec5 subfolder.\u003cbr/\u003e\nThe MEC5 HAL device is chosen using Zephyr CONFIG_SOC_SERIES and CONFIG_SOC.\u003cbr/\u003e\nZephyr SoC layer soc.h for MECH172x, MEC174x, and MEC175x include device_mec5.h from the MEC5 HAL.\u003cbr/\u003e\nZephyr drivres and applications should include individual HAL API headers to access specific peripherals.\u003cbr/\u003e\n\n## MPFS PolarFile HAL\nThe Microchip Polarfire SOC HAL was downloaded from:\n\nhttps://github.com/polarfire-soc/platform\n\nAddditionally, the bare metal samples from https://github.com/polarfire-soc/polarfire-soc-bare-metal-examples\nare required to extract the Icicle Kit bopard configuration files.\n\nBoth are from Tag 21.08\n\nThe following changes were made:\n\n - platform-2021.08 top folder renamed to mpfs and located at modules/hal/microchip\n - The applications/mpfs-pmp-demo/mpfs-pmp-app-u54-1/src/boards folder is copied to modules/hal/microchip/mpfs\n\n## PIC32C Repository specific guidelines\n\n - When submitting an updated firmware library version, it is important to make\n   sure that the last firmware version will be merged. The library version is\n   used to be checked at [Microchip packs download site](https://packs.download.microchip.com/).\n - When submitting an updated firmware library version the patchset already\n   applied should be rebased on top of the newer version.\n - The patchset must be sent as an individual commit per SoC series to easy rebase.\n - This repository is managed mainly on Linux. This means that changes should\n   be submitted using Linux LF format. Usually running a similar command to\n   `find * type f -print0 | xargs -0 dos2unix -k` should be enough.\n - Make sure directory structure is respected.\n - The `pic32c/[pic32cxsg]/include/\u003csoc\u003e/README` file should be updated accordingly.\n   If for some reason the file not exists it should be created.\n - Directory names should be converted to lowercase.\n - The recommendation is add **all fixups** in the `hal_microchip` instead on the\n   ZephyrRTOS project.\n\nThe above are general guidelines and exceptions could happen. In this case, the\nexception should be addressed at review phase.\n\n## PIC32C Standard API\n\nThe PIC32C/PIC32M standard API define all information to access Microchip SoC's\nperipherals. This library does not have namespaces and prefixes which\neasily results in name collision with ZephyrRTOS core and libraries. To avoid\nthat situation, macros, enum values and function names should follow two\ngeneral rules:\n\n - Public API functions must be prefixed with `pic32cxsg_` or .\n - Public defines and enum values must be uppercase and prefixed with `PIC32CXSG_`\n   or .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzephyrproject-rtos%2Fhal_microchip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzephyrproject-rtos%2Fhal_microchip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzephyrproject-rtos%2Fhal_microchip/lists"}