-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Other): Add MAX78002 SoC into the Zephyr build system (#1158)
Signed-off-by: Furkan Akkiz <[email protected]>
- Loading branch information
Showing
12 changed files
with
228 additions
and
11 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
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
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
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
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
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
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
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
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
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
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,183 @@ | ||
############################################################################## | ||
# | ||
# Copyright (C) 2024 Analog Devices, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
############################################################################## | ||
|
||
|
||
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}/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}/SPI | ||
${MSDK_PERIPH_SRC_DIR}/SDHC | ||
${MSDK_PERIPH_SRC_DIR}/SYS | ||
${MSDK_PERIPH_SRC_DIR}/TMR | ||
${MSDK_PERIPH_SRC_DIR}/TRNG | ||
${MSDK_PERIPH_SRC_DIR}/UART | ||
${MSDK_PERIPH_SRC_DIR}/WDT | ||
${MSDK_PERIPH_SRC_DIR}/WUT | ||
) | ||
|
||
if(CONFIG_ARM) | ||
zephyr_library_sources(${MSDK_CMSIS_DIR}/Source/system_max78002.c) | ||
zephyr_library_sources(${MSDK_PERIPH_SRC_DIR}/SYS/mxc_lock.c) | ||
elseif(CONFIG_RISCV) | ||
zephyr_library_sources(${MSDK_CMSIS_DIR}/Source/system_riscv_max78002.c) | ||
endif() | ||
|
||
zephyr_library_sources( | ||
./max78xxx_system.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/ICC/icc_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/ICC/icc_reva.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/LP/lp_ai87.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/LPCMP/lpcmp_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/LPCMP/lpcmp_reva.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/SYS/mxc_assert.c | ||
${MSDK_PERIPH_SRC_DIR}/SYS/mxc_delay.c | ||
${MSDK_PERIPH_SRC_DIR}/SYS/pins_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/SYS/sys_ai87.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/DMA/dma_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/DMA/dma_reva.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/PT/pt_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/PT/pt_reva.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/SDHC/sdhc_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/SDHC/sdhc_reva.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/WUT/wut_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/WUT/wut_reva.c | ||
) | ||
|
||
if (CONFIG_ADC_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/ADC/adc_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/ADC/adc_revb.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_UART_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/UART/uart_common.c | ||
${MSDK_PERIPH_SRC_DIR}/UART/uart_ai87.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_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/GPIO/gpio_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_SPI_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/SPI/spi_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/SPI/spi_reva1.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_I2C_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/I2C/i2c_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/I2C/i2c_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_I2S_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/I2S/i2s_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/I2S/i2s_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_WDT_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/WDT/wdt_common.c | ||
${MSDK_PERIPH_SRC_DIR}/WDT/wdt_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/WDT/wdt_revb.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_RTC_MAX32 OR CONFIG_COUNTER_RTC_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/RTC/rtc_ai87.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_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/FLC/flc_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_PWM_MAX32 OR CONFIG_TIMER_MAX32 OR CONFIG_COUNTER_TIMER_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/TMR/tmr_common.c | ||
${MSDK_PERIPH_SRC_DIR}/TMR/tmr_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/TMR/tmr_revb.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_ENTROPY_MAX32_TRNG) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/TRNG/trng_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/TRNG/trng_revb.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_CRYPTO_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/AES/aes_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/AES/aes_revb.c | ||
|
||
${MSDK_PERIPH_SRC_DIR}/CRC/crc_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/CRC/crc_reva.c | ||
) | ||
endif() | ||
|
||
if (CONFIG_W1_MAX32) | ||
zephyr_library_sources( | ||
${MSDK_PERIPH_SRC_DIR}/OWM/owm_ai87.c | ||
${MSDK_PERIPH_SRC_DIR}/OWM/owm_reva.c | ||
) | ||
endif() |
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,24 @@ | ||
/****************************************************************************** | ||
* | ||
* Copyright (C) 2024 Analog Devices, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
******************************************************************************/ | ||
|
||
#include "max78002.h" | ||
|
||
/* | ||
* This function is called during boot up. | ||
*/ | ||
void max32xx_system_init(void) {} |