Additional Software Setup
This board requires additional software setup. Complete all steps below before proceeding to the labs.
Switching to the Zephyr4Microchip Repo
Zephyr support for this board has not yet been released to the main Zephyr repo. To that end, we need to use the Microchip fork of Zephyr. This fork contains support for the latest Microchip boards and will eventually be mainlined into Zephyr. Since you have already completed the Zephyr Getting Started Guide, run the following commands from your Zephyr project directory to switch to the Microchip fork:
- 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
Downloading the Custom OpenOCD Binary
Adding new board support to the upstream OpenOCD release takes time. Microchip provides a customized OpenOCD binary that supports the latest boards ahead of upstream. Clone the repository into your Zephyr workspace:
- Ubuntu
- macOS
- Windows
$ cd ~/zephyrproject
$ git clone https://github.com/MicrochipTech/openOCD-wireless
$ cd ~/zephyrproject
$ git clone https://github.com/MicrochipTech/openOCD-wireless
PS C:\Users\...> cd C:\Users\...\zephyrproject
PS C:\Users\...\zephyrproject> git clone https://github.com/MicrochipTech/openOCD-wireless
Installing Zephyr SDK v0.17.4
The Zephyr Getting Started Guide installs the latest SDK, which is currently v1.0.1. This version is not compatible with the Microchip Zephyr fork used in this course. You must install SDK v0.17.4 alongside it.
Run the following commands from your Zephyr project directory. Once installed, the build system will automatically select v0.17.4.
- Ubuntu
- macOS
- Windows
$ source .venv/bin/activate
(.venv) $ west sdk install --version 0.17.4 -t arm-zephyr-eabi
$ source .venv/bin/activate
(.venv) $ west sdk install --version 0.17.4 -t arm-zephyr-eabi
PS C:\Users\...\zephyrproject> .\.venv\Scripts\Activate.ps1
(.venv) PS C:\Users\...\zephyrproject> west sdk install --version 0.17.4 -t arm-zephyr-eabi
The -t arm-zephyr-eabi flag installs only the ARM cross-compiler toolchain, which targets the ARM Cortex-M4 processor on this board. Without it, west sdk install downloads cross-compilers for every supported target architecture (~4 GB). The host machine architecture (your laptop's CPU) is detected automatically regardless of this flag.