-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Cmakefiles for below parts to build them with zephyr - MAX32665 - MAX32690 - MAX32655 Added zephyr/module.yml file to it build with zephyr Signed-off-by: Sadik Ozer <[email protected]>
- Loading branch information
Showing
6 changed files
with
596 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,8 @@ | ||
# Makefile - Analog Devices SDK | ||
# | ||
# Copyright (c) 2023 Analog Devices, Inc. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
|
||
add_subdirectory_ifdef(CONFIG_SOC_SERIES_MAX32 MAX) |
This file contains 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,49 @@ | ||
# Makefile - Analog Devices SDK | ||
# | ||
# Copyright (c) 2023 Analog Devices, Inc. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
|
||
if (${CONFIG_SOC} MATCHES "max32666") | ||
set(TARGET_LC "max32665") | ||
elseif (${CONFIG_SOC} MATCHES "max326651") | ||
set(TARGET_LC "max32650") | ||
else () | ||
set(TARGET_LC ${CONFIG_SOC}) | ||
endif() | ||
string(TOUPPER ${TARGET_LC} TARGET_UC) | ||
|
||
zephyr_compile_definitions( | ||
-DTARGET=${TARGET_UC} | ||
-DMSDK_NO_GPIO_CLK_INIT=1 | ||
-DMSDK_NO_LOCKING=1 | ||
) | ||
|
||
get_filename_component(MSDK_LIBRARY_DIR "./Libraries" ABSOLUTE) | ||
set(MSDK_CMSIS_DIR ${MSDK_LIBRARY_DIR}/CMSIS/Device/Maxim/${TARGET_UC}) | ||
set(MSDK_PERIPH_DIR ${MSDK_LIBRARY_DIR}/PeriphDrivers) | ||
set(MSDK_PERIPH_SRC_DIR ${MSDK_PERIPH_DIR}/Source) | ||
set(MSDK_PERIPH_INC_DIR ${MSDK_PERIPH_DIR}/Include/${TARGET_UC}) | ||
|
||
zephyr_include_directories( | ||
${MSDK_CMSIS_DIR}/Include | ||
${MSDK_PERIPH_INC_DIR} | ||
) | ||
|
||
add_subdirectory_ifdef(CONFIG_SOC_MAX32520 Source/MAX32520) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32570 Source/MAX32570) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32572 Source/MAX32572) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32650 Source/MAX32650) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32655 Source/MAX32655) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32660 Source/MAX32660) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32662 Source/MAX32662) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32665 Source/MAX32665) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32666 Source/MAX32665) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32670 Source/MAX32670) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32672 Source/MAX32672) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32675 Source/MAX32675) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32680 Source/MAX32680) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX32690 Source/MAX32690) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX78000 Source/MAX78000) | ||
add_subdirectory_ifdef(CONFIG_SOC_MAX78002 Source/MAX78002) |
This file contains 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,170 @@ | ||
# Makefile - Analog Devices SDK | ||
# | ||
# Copyright (c) 2023 Analog Devices, Inc. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
|
||
if(NOT TARGET_REV) | ||
# Default version A1, not actively use in driver but requires to be defined. | ||
zephyr_compile_definitions(-DTARGET_REV=0x4131) | ||
endif() | ||
|
||
zephyr_include_directories( | ||
${MSDK_PERIPH_SRC_DIR}/SYS | ||
${MSDK_PERIPH_SRC_DIR}/ADC | ||
${MSDK_PERIPH_SRC_DIR}/AES | ||
${MSDK_PERIPH_SRC_DIR}/CRC | ||
${MSDK_PERIPH_SRC_DIR}/DMA | ||
${MSDK_PERIPH_SRC_DIR}/FLC | ||
${MSDK_PERIPH_SRC_DIR}/GPIO | ||
${MSDK_PERIPH_SRC_DIR}/I2C | ||
${MSDK_PERIPH_SRC_DIR}/I2S | ||
${MSDK_PERIPH_SRC_DIR}/ICC | ||
${MSDK_PERIPH_SRC_DIR}/LP | ||
${MSDK_PERIPH_SRC_DIR}/LPCMP | ||
${MSDK_PERIPH_SRC_DIR}/OWM | ||
${MSDK_PERIPH_SRC_DIR}/PT | ||
${MSDK_PERIPH_SRC_DIR}/RTC | ||
${MSDK_PERIPH_SRC_DIR}/SEMA | ||
${MSDK_PERIPH_SRC_DIR}/SIMO | ||
${MSDK_PERIPH_SRC_DIR}/SPI | ||
${MSDK_PERIPH_SRC_DIR}/TRNG | ||
${MSDK_PERIPH_SRC_DIR}/TMR | ||
${MSDK_PERIPH_SRC_DIR}/UART | ||
${MSDK_PERIPH_SRC_DIR}/WDT | ||
${MSDK_PERIPH_SRC_DIR}/WUT | ||
) | ||
|
||
zephyr_library_sources( | ||
|
||
${MSDK_CMSIS_DIR}/Source/system_max32655.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/SYS/mxc_assert.c | ||
${MSDK_PERIPH_SRC_DIR}/SYS/mxc_delay.c | ||
${MSDK_PERIPH_SRC_DIR}/SYS/mxc_lock.c | ||
${MSDK_PERIPH_SRC_DIR}/SYS/pins_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/SYS/sys_me17.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/ICC/icc_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/ICC/icc_reva.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/LP/lp_me17.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/LPCMP/lpcmp_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/LPCMP/lpcmp_reva.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/PT/pt_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/PT/pt_reva.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/SEMA/sema_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/SEMA/sema_reva.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/SIMO/simo_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/SIMO/simo_reva.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/WUT/wut_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/WUT/wut_reva.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/DMA/dma_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/DMA/dma_reva.c | ||
) | ||
|
||
if (CONFIG_UART_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/UART/uart_common.c | ||
${MSDK_PERIPH_SRC_DIR}/UART/uart_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/UART/uart_revb.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_GPIO_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/GPIO/gpio_common.c | ||
${MSDK_PERIPH_SRC_DIR}/GPIO/gpio_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/GPIO/gpio_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_SPI_MAX32_V1) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/SPI/spi_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/SPI/spi_reva1.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_I2C_MAX32_V1) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/I2C/i2c_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/I2C/i2c_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_WDT_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/WDT/wdt_common.c | ||
${MSDK_PERIPH_SRC_DIR}/WDT/wdt_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/WDT/wdt_revb.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_RTC_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/RTC/rtc_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/RTC/rtc_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_SOC_FLASH_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/FLC/flc_common.c | ||
${MSDK_PERIPH_SRC_DIR}/FLC/flc_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/FLC/flc_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_ADC_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/ADC/adc_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/ADC/adc_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_OWM_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/OWM/owm_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/OWM/owm_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_PWM_MAX32 OR CONFIG_TIMER_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/TMR/tmr_common.c | ||
${MSDK_PERIPH_SRC_DIR}/TMR/tmr_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/TMR/tmr_revb.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_I2S_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/I2S/i2s_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/I2S/i2s_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_ENTROPY_MAX32_TRNG) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/TRNG/trng_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/TRNG/trng_revb.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_CRYPTO_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/AES/aes_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/AES/aes_revb.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/CRC/crc_me17.c | ||
${MSDK_PERIPH_SRC_DIR}/CRC/crc_reva.c | ||
) | ||
endif() |
Oops, something went wrong.