We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37a1df7 commit 9a8fe19Copy full SHA for 9a8fe19
1 file changed
options.mk
@@ -618,10 +618,18 @@ ifeq ($(NO_XIP),1)
618
endif
619
620
ifeq ($(DEBUG_UART),1)
621
- CFLAGS+=-DDEBUG_UART
622
- UART_DRV_OBJ:=hal/uart/uart_drv_$(UART_TARGET).o
623
- ifneq ($(findstring $(UART_DRV_OBJ),$(OBJS)),$(UART_DRV_OBJ))
624
- OBJS+=$(UART_DRV_OBJ)
+ ifeq ($(strip $(UART_TARGET)),)
+ $(warning DEBUG_UART=1 but UART_TARGET is not set; DEBUG_UART disabled)
+ else
+ UART_DRV_OBJ:=hal/uart/uart_drv_$(UART_TARGET).o
625
+ ifneq ($(wildcard $(UART_DRV_OBJ)),)
626
+ CFLAGS+=-DDEBUG_UART
627
+ ifneq ($(findstring $(UART_DRV_OBJ),$(OBJS)),$(UART_DRV_OBJ))
628
+ OBJS+=$(UART_DRV_OBJ)
629
+ endif
630
631
+ $(warning DEBUG_UART=1 but $(UART_DRV_OBJ) not found; DEBUG_UART disabled)
632
633
634
635
ifeq ($(NO_QNX),1)
0 commit comments