Appendix D: Using the Zephyr4Microchip Repo
The Zephyr4Microchip repo is a fork of the main Zephyr repository that contains support for the latest Microchip dev boards. These contributions will eventually be mainlined to the main Zephyr repo. For more information, take a look at the Zephyr4Microchip website.
Using the Zephyr4Microchip repo before running west init
Instead of running west init to download the main Zephyr repo, it is possible to directly download the Microchip4Zephyr repo. Go to the folder for your zephyr project and run the following in your terminal:
- Ubuntu
- macOS
- Windows
$ source ~/zephyrproject/.venv/bin/activate
(.venv) $ west init -m https://github.com/Zephyr4Microchip/zephyr.git --mr mchp_pic32cxbz_v420
(.venv) $ west blobs fetch hal_microchip
$ source ~/zephyrproject/.venv/bin/activate
(.venv) $ west init -m https://github.com/Zephyr4Microchip/zephyr.git --mr mchp_pic32cxbz_v420
(.venv) $ west blobs fetch hal_microchip
PS C:\Users\...\zephyrproject> .\.venv\Scripts\Activate.ps1
(.venv) PS C:\Users\...\zephyrproject> west init -m https://github.com/Zephyr4Microchip/zephyr.git --mr mchp_pic32cxbz_v420
(.venv) PS C:\Users\...\zephyrproject> west blobs fetch hal_microchip
Switching to the Zephyr4Microchip Repo after running west init
If you already ran west init and downloaded the regular Zephyr repo, you need to change the git remote and run west update. Run the following commands from your Zephyr project directory:
- Ubuntu
- macOS
- Windows
$ git -C zephyr remote set-url origin https://github.com/Zephyr4Microchip/zephyr
$ git -C zephyr fetch
$ git -C zephyr checkout mchp_pic32cxbz_v420
$ source .venv/bin/activate
(.venv) $ west update
(.venv) $ west blobs fetch hal_microchip
$ git -C zephyr remote set-url origin https://github.com/Zephyr4Microchip/zephyr
$ git -C zephyr fetch
$ git -C zephyr checkout mchp_pic32cxbz_v420
$ source .venv/bin/activate
(.venv) $ west update
(.venv) $ west blobs fetch hal_microchip
PS C:\Users\...\zephyrproject> git -C zephyr remote set-url origin https://github.com/Zephyr4Microchip/zephyr
PS C:\Users\...\zephyrproject> git -C zephyr fetch
PS C:\Users\...\zephyrproject> git -C zephyr checkout mchp_pic32cxbz_v420
PS C:\Users\...\zephyrproject> .\.venv\Scripts\Activate.ps1
(.venv) PS C:\Users\...\zephyrproject> west update
(.venv) PS C:\Users\...\zephyrproject> west blobs fetch hal_microchip