risc-v/esp32c3: Build serial driver only when selected

This commit is contained in:
Gustavo Henrique Nihei 2021-02-22 10:25:15 -03:00 committed by Xiang Xiao
parent 491a4c1ed2
commit ca30c1db69
2 changed files with 11 additions and 1 deletions

View File

@ -104,6 +104,10 @@ config ESP32C3_CPU_FREQ_MHZ
menu "ESP32-C3 Peripheral Support"
config ESP32C3_UART
bool
default n
config ESP32C3_WDT
bool
default n
@ -116,11 +120,13 @@ config ESP32C3_GPIO_IRQ
config ESP32C3_UART0
bool "UART0"
default y
select ESP32C3_UART
select UART0_SERIALDRIVER
config ESP32C3_UART1
bool "UART1"
default n
select ESP32C3_UART
select UART1_SERIALDRIVER
config ESP32C3_MWDT0

View File

@ -52,7 +52,11 @@ endif
CHIP_CSRCS = esp32c3_allocateheap.c esp32c3_start.c esp32c3_idle.c
CHIP_CSRCS += esp32c3_irq.c esp32c3_timerisr.c
CHIP_CSRCS += esp32c3_clockconfig.c esp32c3_gpio.c
CHIP_CSRCS += esp32c3_serial.c esp32c3_lowputc.c
CHIP_CSRCS += esp32c3_lowputc.c
ifeq ($(CONFIG_ESP32C3_UART),y)
CHIP_CSRCS += esp32c3_serial.c
endif
ifeq ($(CONFIG_ESP32C3_WDT),y)
CHIP_CSRCS += esp32c3_wdt.c