-
Notifications
You must be signed in to change notification settings - Fork 8.2k
ARM: Introduce gigadevice gd32f403 #38661
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
Merged
carlescufi
merged 7 commits into
zephyrproject-rtos:main
from
nandojve:gd32_zephyr_arm_minimal
Oct 28, 2021
Merged
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
49f4eaa
modules: Add gigadevice hal module
nandojve 10f6599
dts: bindings: vendor-prefixes: Add gigadevice prefix
nandojve aa1524e
dts: arm: Introduce gigadevice soc bindings
nandojve 975e92e
soc: arm: Introduce gigadevice soc
nandojve 3c6bb1a
drivers: serial: Add gd32 uart driver
nandojve 094434f
boards: arm: Introduce gd32f403z_eval board
nandojve ddb2422
CODEOWNERS: Add nandojve for gigadevices
nandojve 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
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
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,45 @@ | ||
| # Copyright (c) 2021 ATL-Electronics | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| if(CONFIG_HAS_GD32_HAL) | ||
|
|
||
| zephyr_library_named(hal_gigadevice) | ||
|
|
||
| zephyr_library_compile_definitions(${gd32_soc_uc}) | ||
|
|
||
| set(gd32_soc_dir ${ZEPHYR_HAL_GIGADEVICE_MODULE_DIR}/${gd32_soc_uc}) | ||
| set(gd32_cmsis_dir ${gd32_soc_dir}/CMSIS/GD/${gd32_soc_uc}) | ||
| set(gd32_std_dir ${gd32_soc_dir}/standard_peripheral) | ||
| set(gd32_std_src_dir ${gd32_std_dir}/Source) | ||
|
|
||
| # Global includes to be used outside hal_gigadevice | ||
| zephyr_include_directories(${gd32_cmsis_dir}/Include) | ||
| zephyr_include_directories(${gd32_std_dir}/Include) | ||
|
|
||
| zephyr_library_sources(${gd32_cmsis_dir}/Source/system_${gd32_soc_lc}.c) | ||
|
|
||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_ADC ${gd32_std_src_dir}/${gd32_soc_lc}_adc.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_BKP ${gd32_std_src_dir}/${gd32_soc_lc}_bkp.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_CAN ${gd32_std_src_dir}/${gd32_soc_lc}_can.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_CRC ${gd32_std_src_dir}/${gd32_soc_lc}_crc.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_CTC ${gd32_std_src_dir}/${gd32_soc_lc}_ctc.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_DAC ${gd32_std_src_dir}/${gd32_soc_lc}_dac.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_DBG ${gd32_std_src_dir}/${gd32_soc_lc}_dbg.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_DMA ${gd32_std_src_dir}/${gd32_soc_lc}_dma.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_EXMC ${gd32_std_src_dir}/${gd32_soc_lc}_exmc.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_EXTI ${gd32_std_src_dir}/${gd32_soc_lc}_exti.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_FMC ${gd32_std_src_dir}/${gd32_soc_lc}_fmc.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_FWDGT ${gd32_std_src_dir}/${gd32_soc_lc}_fwdgt.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_GPIO ${gd32_std_src_dir}/${gd32_soc_lc}_gpio.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_I2C ${gd32_std_src_dir}/${gd32_soc_lc}_i2c.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_MISC ${gd32_std_src_dir}/${gd32_soc_lc}_misc.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_PMU ${gd32_std_src_dir}/${gd32_soc_lc}_pmu.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_RCU ${gd32_std_src_dir}/${gd32_soc_lc}_rcu.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_RTC ${gd32_std_src_dir}/${gd32_soc_lc}_rtc.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_SDIO ${gd32_std_src_dir}/${gd32_soc_lc}_sdio.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_SPI ${gd32_std_src_dir}/${gd32_soc_lc}_spi.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_TIMER ${gd32_std_src_dir}/${gd32_soc_lc}_timer.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_USART ${gd32_std_src_dir}/${gd32_soc_lc}_usart.c) | ||
| zephyr_library_sources_ifdef(CONFIG_USE_GD32_WWDGT ${gd32_std_src_dir}/${gd32_soc_lc}_wwdgt.c) | ||
|
|
||
| endif() |
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,182 @@ | ||
| # Copyright (c) 2021 ATL-Electronics | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| config ZEPHYR_HAL_GIGADEVICE_MODULE | ||
| bool | ||
|
|
||
| config HAS_GD32_HAL | ||
| bool | ||
|
|
||
| if HAS_GD32_HAL | ||
|
|
||
| config USE_GD32_ADC | ||
| bool | ||
| help | ||
| Enable GD32 Analog-to-Digital Converter (ADC) HAL module driver | ||
|
|
||
| config USE_GD32_BKP | ||
| bool | ||
| help | ||
| Enable GD32 Backup Registers (BKP) HAL module driver | ||
|
|
||
| config USE_GD32_CAN | ||
| bool | ||
| help | ||
| Enable GD32 Controller Area Network (CAN) HAL module driver | ||
|
|
||
| config USE_GD32_CMP | ||
| bool | ||
| help | ||
| Enable GD32 Comparator (CMP) HAL module driver | ||
|
|
||
| config USE_GD32_CRC | ||
| bool | ||
| help | ||
| Enable GD32 Cyclic redundancy check calculation unit (CRC) HAL | ||
| module driver | ||
|
|
||
| config USE_GD32_CTC | ||
| bool | ||
| help | ||
| Enable GD32 Clock Trim Controller (CTC) HAL module driver | ||
|
|
||
| config USE_GD32_DAC | ||
| bool | ||
| help | ||
| Enable GD32 Digital-to-Analog Converter (DAC) HAL module driver | ||
|
|
||
| config USE_GD32_DBG | ||
| bool | ||
| help | ||
| Enable GD32 Debug (DBG) HAL module driver | ||
|
|
||
| config USE_GD32_DMA | ||
| bool | ||
| help | ||
| Enable GD32 Direct Memory Access controller (DMA) HAL module driver | ||
|
|
||
| config USE_GD32_ECLIC | ||
| bool | ||
| help | ||
| Enable GD32 Enhancement Core-Local Interrupt Controller (ECLIC) HAL | ||
| module driver | ||
|
|
||
| config USE_GD32_ENET | ||
| bool | ||
| help | ||
| Enable GD32 Ethernet (ENET) HAL module driver | ||
|
|
||
| config USE_GD32_EXMC | ||
| bool | ||
| help | ||
| Enable GD32 External Memory Controller (EXMC) HAL module driver | ||
|
|
||
| config USE_GD32_EXTI | ||
| bool | ||
| help | ||
| Enable GD32 Interrupt/Event controller (EXTI) HAL module driver | ||
|
|
||
| config USE_GD32_FMC | ||
| bool | ||
| help | ||
| Enable GD32 Flash Memory Controller (FMC) HAL module driver | ||
|
|
||
| config USE_GD32_FWDGT | ||
| bool | ||
| help | ||
| Enable GD32 Free Watchdog Timer (FWDGT) HAL module driver | ||
|
|
||
| config USE_GD32_GPIO | ||
| bool | ||
| default y | ||
| help | ||
| Enable GD32 General-purpose and Alternate-Function I/Os | ||
| (GPIO and AFIO) HAL module driver | ||
|
|
||
| config USE_GD32_I2C | ||
| bool | ||
| help | ||
| Enable GD32 Inter-Integrated Circuit Interface (I2C) HAL module driver | ||
|
|
||
| config USE_GD32_MISC | ||
| bool | ||
| help | ||
| Enable GD32 System Utilities (MISC) HAL module driver | ||
|
|
||
| config USE_GD32_PMU | ||
| bool | ||
| help | ||
| Enable GD32 Power Management Unit (PMU) HAL module driver | ||
|
|
||
| config USE_GD32_RCU | ||
| bool | ||
| default y | ||
| help | ||
| Enable GD32 Reset and Clock Unit (RCU) HAL module driver | ||
|
|
||
| config USE_GD32_RTC | ||
| bool | ||
| help | ||
| Enable GD32 Real-Time Clock (RTC) HAL module driver | ||
|
|
||
| config USE_GD32_SDIO | ||
| bool | ||
| help | ||
| Enable GD32 Secure Digital Input/Output interface (SDIO) HAL module | ||
| driver | ||
|
|
||
| config USE_GD32_SPI | ||
| bool | ||
| help | ||
| Enable GD32 Serial Peripheral Interface(SPI) HAL module driver | ||
|
|
||
| config USE_GD32_SQPI | ||
| bool | ||
| help | ||
| Enable GD32 Serial/Quad Parallel Interface (SQPI) HAL module driver | ||
|
|
||
| config USE_GD32_SHRTIMER | ||
| bool | ||
| help | ||
| Enable GD32 Super High-Resolution Timer (SHRTIMER) HAL module driver | ||
|
|
||
| config USE_GD32_TIMER | ||
| bool | ||
| help | ||
| Enable GD32 Timer (TIMER) HAL module driver | ||
|
|
||
| config USE_GD32_TMU | ||
| bool | ||
| help | ||
| Enable GD32 Trigonometric Math Unit (TMU) HAL module driver | ||
|
|
||
| config USE_GD32_USART | ||
| bool | ||
| help | ||
| Enable GD32 Universal Synchronous/Asynchronous Receiver/Transmitter | ||
| (USART) HAL module driver | ||
|
|
||
| config USE_GD32_USBD | ||
| bool | ||
| help | ||
| Enable GD32 Universal Serial Bus full-speed Device interface (USBD) | ||
| HAL module driver | ||
|
|
||
| config USE_GD32_USBFS | ||
| bool | ||
| help | ||
| Enable GD32 Universal Serial Bus on-the-go Full-Speed (USBFS) HAL | ||
| module driver | ||
|
|
||
| config USE_GD32_USBHS | ||
| bool | ||
| help | ||
| Enable GD32 Universal Serial Bus High-Speed interface (USBHS) HAL | ||
| module driver | ||
|
|
||
| config USE_GD32_WWDGT | ||
| bool | ||
| help | ||
| Enable GD32 Window Watchdog Timer (WWDGT) HAL module driver | ||
|
|
||
| endif # HAS_GD32_HAL |
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
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.
Uh oh!
There was an error while loading. Please reload this page.