-
Notifications
You must be signed in to change notification settings - Fork 8.1k
soc: microchip: Introduce pic32cxsg sg41 #86952
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
Changes from 1 commit
2218375
a151edd
7adc77c
74b0f44
2f35e49
750923e
9608226
daa9f91
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Makefile - Microchip PIC32CXSG MCU family | ||
|
||
# Copyright (c) 2024 Microchip | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
zephyr_include_directories(${ZEPHYR_BASE}/drivers) | ||
|
||
add_subdirectory(common) | ||
add_subdirectory(${SOC_SERIES}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Microchip PIC32CXSG MCU family configuration options | ||
# Copyright (c) 2024 Microchip | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config SOC_FAMILY_MICROCHIP_PIC32CXSG | ||
select PIC32C | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems that you want select options to your HAL based in the family. Why not just select all this options in the module itself, something like: config PIC32C
bool
select HAS_CMSIS_CORE
config HAS_PIC32C_HAL
bool
select PIC32C
config HAS_PIC32CXSG_HAL
bool
select HAS_PIC32C_HAL There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What you want is define all the HAL at once. This can be achieved by - select PIC32C
+ select HAS_PIC32CXSG_HAL |
||
select HAS_SEGGER_RTT if ZEPHYR_SEGGER_MODULE | ||
|
||
if SOC_FAMILY_MICROCHIP_PIC32CXSG | ||
|
||
rsource "common/Kconfig.pic32cxsg" | ||
rsource "*/Kconfig" | ||
|
||
endif # SOC_FAMILY_MICROCHIP_PIC32CXSG |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Microchip PIC32CXSG MCU family default configuration options | ||
|
||
# Copyright (c) 2024 Microchip | ||
|
||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if SOC_FAMILY_MICROCHIP_PIC32CXSG | ||
|
||
rsource "*/Kconfig.defconfig" | ||
|
||
config GPIO | ||
default y | ||
|
||
config SYS_CLOCK_HW_CYCLES_PER_SEC | ||
nordicjm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency) | ||
|
||
if USB_DEVICE_DRIVER | ||
|
||
config HEAP_MEM_POOL_ADD_SIZE_SOC | ||
def_int 1024 | ||
|
||
endif # USB_DEVICE_DRIVER | ||
|
||
endif # SOC_FAMILY_MICROCHIP_PIC32CXSG |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Microchip PIC32CXSG MCU family | ||
|
||
# Copyright (c) 2024 Microchip | ||
|
||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config SOC_FAMILY_MICROCHIP_PIC32CXSG | ||
bool | ||
|
||
config SOC_FAMILY | ||
default "microchip_pic32cxsg" if SOC_FAMILY_MICROCHIP_PIC32CXSG | ||
nordicjm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
rsource "*/Kconfig.soc" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Makefile - Microchip PIC32CXSG MCU family | ||
# | ||
# Copyright (c) 2024 Microchip | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
zephyr_sources(soc_port.c) | ||
|
||
zephyr_sources_ifdef(CONFIG_BOOTLOADER_BOSSA bossa.c) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be dropped for now. When you add on a board (another PR) you can add here. |
||
|
||
zephyr_sources_ifdef(CONFIG_SOC_FAMILY_MICROCHIP_PIC32CXSG soc_pic32cxsg.c) | ||
|
||
zephyr_include_directories(.) | ||
|
||
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "") |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (c) 2024 Microchip | ||
|
||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if SOC_FAMILY_MICROCHIP_PIC32CXSG | ||
|
||
config SOC_MICROCHIP_PIC32CXSG_XOSC32K | ||
nordicjm marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since it is on devicetree, this config is useless and must be dropped. |
||
bool "The external 32 kHz crystal oscillator" | ||
default y if DT_HAS_ATMEL_SAM0_OSC32KCTRL_ENABLED | ||
help | ||
Enable gclk device tree node to use 32K crystal | ||
as clock source. If not enabled the soc will be | ||
configured for internal oscillator. | ||
|
||
endif |
Uh oh!
There was an error while loading. Please reload this page.