-
Notifications
You must be signed in to change notification settings - Fork 8.1k
boards: microchip: Add PIC32CM JH01 Curiosity Nano Evaluation Kit Support #97470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ArunMCHP
wants to merge
1
commit into
zephyrproject-rtos:main
Choose a base branch
from
Zephyr4Microchip:add_board_support_pic32cm_jh01_cnano
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+225
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
boards/microchip/pic32c/pic32cm_jh01_cnano/Kconfig.pic32cm_jh01_cnano
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_PIC32CM_JH01_CNANO | ||
select SOC_PIC32CM5164JH01048 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
board_runner_args(pyocd "--target=pic32cm5164jh01048" "--frequency=4000") | ||
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
board: | ||
name: pic32cm_jh01_cnano | ||
full_name: PIC32CM JH01 Curiosity Nano+ Touch Evaluation Kit | ||
vendor: microchip | ||
socs: | ||
- name: pic32cm5164jh01048 |
Binary file added
BIN
+33.4 KB
boards/microchip/pic32c/pic32cm_jh01_cnano/doc/img/pic32cm_jh01_cnano.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
126 changes: 126 additions & 0 deletions
126
boards/microchip/pic32c/pic32cm_jh01_cnano/doc/index.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
.. zephyr:board:: pic32cm_jh01_cnano | ||
Overview | ||
******** | ||
|
||
The PIC32CM JH01 Curiosity Nano+ Touch Evaluation Kit (EV29G58A) is | ||
a hardware platform that contains a PIC32CM5164JH01048 microcontroller (MCU). | ||
The Curiosity Nano+ Touch Evaluation Kit provides easy access | ||
to the MCU features and can develop custom applications. | ||
|
||
Hardware | ||
******** | ||
|
||
- PIC32CM5164JH01048 MCU | ||
- Arm® Cortex®-M0+ based MCU | ||
- One yellow user LED | ||
- One mechanical user switch | ||
- One user touch button | ||
- CAN interface | ||
- LIN interface | ||
- USB for debugger | ||
|
||
- Can be used for powering the board | ||
- Must be used to program, or debug, the board | ||
- On-board nano debugger (nEDBG) | ||
|
||
- One green power/status LED | ||
- Programming and debugging | ||
- Communications Device Class (CDC) virtual COM port | ||
- One logic analyzer DGI GPIO | ||
- The target device is programmed and debugged by the on-board Nano | ||
debugger; no external programmer, or debugging tool, is required | ||
- Adjustable target voltage | ||
|
||
- MIC5353 LDO regulator controlled by the on-board debugger | ||
- 1.7V to 3.6V output voltage | ||
- 500-mA maximum output current (limited by ambient | ||
temperature and output voltage) | ||
|
||
Supported Features | ||
================== | ||
|
||
.. zephyr:board-supported-hw:: | ||
Connections and IOs | ||
=================== | ||
|
||
The `PIC32CM JH01 Curiosity Nano User Guide`_ has detailed information about board connections. | ||
|
||
Programming & Debugging | ||
*********************** | ||
|
||
.. zephyr:board-supported-runners:: | ||
Setting Up the Debug Interface | ||
============================== | ||
|
||
PyOCD Setup | ||
=========== | ||
|
||
1. Install Device Pack | ||
|
||
- Add support for the PIC32CM family devices using the following command: | ||
|
||
.. code-block:: console | ||
pyocd pack install pic32cm | ||
2. Verify Device Support | ||
|
||
- Confirm that the target is recognized: | ||
|
||
.. code-block:: console | ||
pyocd list --targets | ||
- You should see an entry similar to: | ||
|
||
.. code-block:: text | ||
pic32cm5164jh01048 Microchip PIC32CM5164JH01048 PIC32CM-JH pack | ||
3. Connect the Board | ||
|
||
- Connect the DEBUG USB(J18) port on the board to your host machine. | ||
- This connection **power up the board** and provides access to the **on-board Embedded Debugger (EDBG)**, | ||
which enables programming and debugging of the target microcontroller through PyOCD. | ||
|
||
Building and Flashing the Application | ||
===================================== | ||
|
||
1. Build the Application | ||
|
||
You can build a sample Zephyr application, such as **Blinky**, using the ``west`` tool. | ||
Run the following commands from your Zephyr workspace: | ||
|
||
.. code-block:: console | ||
west build -b pic32cm_jh01_cnano -p -s samples/basic/blinky | ||
This will build the Blinky application for the ``pic32cm_jh01_cnano`` board. | ||
|
||
2. Flash the Device | ||
|
||
Once the build completes, flash the firmware using: | ||
|
||
.. code-block:: console | ||
west flash | ||
3. Observe the Result | ||
|
||
After flashing, **LED1** on the board should start **blinking**, indicating that the | ||
application is running successfully. | ||
|
||
References | ||
********** | ||
|
||
PIC32CM JH01 Product Page: | ||
https://www.microchip.com/en-us/product/PIC32CM5164JH01048 | ||
|
||
PIC32CM JH01 Curiosity Nano evaluation kit Page: | ||
https://www.microchip.com/en-us/development-tool/ev29g58a | ||
|
||
.. _PIC32CM JH01 Curiosity Nano User Guide: | ||
https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/UserGuides/PIC32CM-JH01-Curiosity-Nano%2B-Touch-User-Guide-DS70005552.pdf |
60 changes: 60 additions & 0 deletions
60
boards/microchip/pic32c/pic32cm_jh01_cnano/pic32cm_jh01_cnano.dts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Copyright (c) 2025 Microchip Technology Inc. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
#include <microchip/pic32c/pic32cm_jh/pic32cm_jh01/pic32cm5164jh01048.dtsi> | ||
#include <zephyr/dt-bindings/input/input-event-codes.h> | ||
|
||
/ { | ||
model = "PIC32CM JH01 Curiosity Nano"; | ||
compatible = "pic32cmjh01,cnano", "microchip,pic32cm5164jh01048", "microchip,pic32cm"; | ||
|
||
chosen { | ||
zephyr,sram = &sram0; | ||
zephyr,flash = &flash0; | ||
}; | ||
|
||
aliases { | ||
led0 = &led0; | ||
sw0 = &button0; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
|
||
led0: led_0 { | ||
gpios = <&porta 19 GPIO_ACTIVE_HIGH>; | ||
label = "Yellow LED"; | ||
}; | ||
}; | ||
|
||
buttons { | ||
compatible = "gpio-keys"; | ||
|
||
button0: button_0 { | ||
gpios = <&porta 27 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>; | ||
label = "SW0"; | ||
zephyr,code = <INPUT_KEY_0>; | ||
}; | ||
}; | ||
}; | ||
|
||
&flash0 { | ||
partitions { | ||
compatible = "fixed-partitions"; | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
storage_partition: partition@7c000 { | ||
label = "storage"; | ||
reg = <0x0007c000 0x4000>; | ||
}; | ||
}; | ||
}; | ||
|
||
&cpu0 { | ||
clock-frequency = <4000000>; | ||
}; |
15 changes: 15 additions & 0 deletions
15
boards/microchip/pic32c/pic32cm_jh01_cnano/pic32cm_jh01_cnano.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
identifier: pic32cm_jh01_cnano | ||
name: PIC32CM JH01 Curiosity Nano | ||
type: mcu | ||
arch: arm | ||
toolchain: | ||
- zephyr | ||
flash: 512 | ||
ram: 64 | ||
supported: | ||
- gpio | ||
- pinctrl | ||
vendor: microchip |
5 changes: 5 additions & 0 deletions
5
boards/microchip/pic32c/pic32cm_jh01_cnano/pic32cm_jh01_cnano_defconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Copyright (c) 2025 Microchip Technology Inc. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_BUILD_OUTPUT_HEX=y | ||
CONFIG_ARM_MPU=y |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non-blocking but maybe you can use a transparent image, as this usually looks better in the online docs :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool :) By the way, how can we create transparent images from
normal images with background
? Is there any handy tool that can do this without increasing the image size?