mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
arch/stm32: Only compile stm32_serial.c when STM32_USART is enabled
When SEMIHOST_SYSLOG is enabled it creates its own up_putc() function however the stm32_serial.c also creates this same function, even when all STM32_USARTs are disabled. Fix patch fixes this issue. Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit is contained in:
committed by
Matteo Golin
parent
5d784a2abc
commit
744ce66135
@@ -35,7 +35,6 @@ list(
|
|||||||
stm32_flash.c
|
stm32_flash.c
|
||||||
stm32_irq.c
|
stm32_irq.c
|
||||||
stm32_lowputc.c
|
stm32_lowputc.c
|
||||||
stm32_serial.c
|
|
||||||
stm32_spi.c
|
stm32_spi.c
|
||||||
stm32_i2s.c
|
stm32_i2s.c
|
||||||
stm32_sdio.c
|
stm32_sdio.c
|
||||||
@@ -46,6 +45,10 @@ list(
|
|||||||
stm32_capture.c
|
stm32_capture.c
|
||||||
stm32_dfumode.c)
|
stm32_dfumode.c)
|
||||||
|
|
||||||
|
if(CONFIG_STM32_USART)
|
||||||
|
list(APPEND SRCS stm32_serial.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CONFIG_STM32_DMA)
|
if(CONFIG_STM32_DMA)
|
||||||
list(APPEND SRCS stm32_dma.c)
|
list(APPEND SRCS stm32_dma.c)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -25,10 +25,14 @@ include armv7-m/Make.defs
|
|||||||
CHIP_CSRCS = stm32_allocateheap.c stm32_start.c stm32_rcc.c stm32_lse.c
|
CHIP_CSRCS = stm32_allocateheap.c stm32_start.c stm32_rcc.c stm32_lse.c
|
||||||
CHIP_CSRCS += stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c
|
CHIP_CSRCS += stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c
|
||||||
CHIP_CSRCS += stm32_irq.c stm32_lowputc.c
|
CHIP_CSRCS += stm32_irq.c stm32_lowputc.c
|
||||||
CHIP_CSRCS += stm32_serial.c stm32_spi.c stm32_i2s.c stm32_sdio.c stm32_tim.c
|
CHIP_CSRCS += stm32_spi.c stm32_i2s.c stm32_sdio.c stm32_tim.c
|
||||||
CHIP_CSRCS += stm32_waste.c stm32_ccm.c stm32_uid.c stm32_capture.c
|
CHIP_CSRCS += stm32_waste.c stm32_ccm.c stm32_uid.c stm32_capture.c
|
||||||
CHIP_CSRCS += stm32_dfumode.c
|
CHIP_CSRCS += stm32_dfumode.c
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_STM32_USART),y)
|
||||||
|
CHIP_CSRCS += stm32_serial.c
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_STM32_DMA),y)
|
ifeq ($(CONFIG_STM32_DMA),y)
|
||||||
CHIP_CSRCS += stm32_dma.c
|
CHIP_CSRCS += stm32_dma.c
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user