Thanks for your reply.
The UART1 can print debug OK. But when I send data over UART0 and use UART1 debug this data, nothing to show.. But it's not successfully. Please advise.
This is irq_J516x.S and makefile.
############################################################################
TARGET = Coordinator
###############################################################################
# User definable make parameters that may be overwritten from the command line
ZBPRO_DEVICE_TYPE = ZCR
JENNIC_MAC ?= MiniMacShim
PDM_BUILD_TYPE ?= _EEPROM
BAUD ?= 115200
DEBUG ?= NONE
STACK_SIZE = 5000
MINIMUM_HEAP_SIZE = 2000
# Chip variant
JENNIC_CHIP ?= JN5179
JENNIC_CHIP_FAMILY ?= JN517x
JENNIC_PCB ?= DEVKIT5
ifeq ($(JENNIC_CHIP_FAMILY), JN517x)
JENNIC_SDK = JN-SW-4270
ZNCLKCMD = AppBuildZBPro.ld
JENNIC_PCB = DEVKIT5
ENDIAN = LITTLE_ENDIAN_PROCESSOR
DISABLE_LTO = 1
else
ifeq ($(JENNIC_CHIP_FAMILY), JN516x)
JENNIC_SDK = JN-SW-4170
ZNCLKCMD = AppBuildZBPro.ld
JENNIC_PCB = DEVKIT4
ENDIAN = BIG_ENDIAN
endif
endif
###############################################################################
# Network settings
# Optional network.mk for channel
sinclude ../../../network.mk
# Channel (0 for default channels)
SINGLE_CHANNEL ?= 0
CFLAGS += -DSINGLE_CHANNEL=$(SINGLE_CHANNEL)
###############################################################################
# Default DK4 development kit target hardware
DR ?= DR1199
ifeq ($(DR), DR1199)
CFLAGS += -DBUTTON_MAP_$(DR)
CFLAGS += -D$(DR)
else ifeq ($(DR), DONGLE)
CFLAGS += -DBUTTON_MAP_DR1199
CFLAGS += -D$(DR)
endif
ICODES ?=0
ifeq ($(ICODES), 1)
CFLAGS += -DBDB_JOIN_USES_INSTALL_CODE_KEY=1
endif
# NFC NCI ICODE (new) functionality
APP_NCI_ICODE ?= 0
ifeq ($(DR), DONGLE)
APP_NCI_ICODE = 0
endif
ifeq ($(APP_NCI_ICODE), 1)
CFLAGS += -DAPP_NCI_ICODE
endif
# NFC NCI AES (old) functionality (6x only)
APP_NCI_AES ?= 0
ifeq ($(DR), DONGLE)
APP_NCI_AES = 0
endif
ifeq ($(JENNIC_CHIP_FAMILY),JN517x)
APP_NCI_AES = 0
endif
ifeq ($(APP_NCI_AES), 1)
CFLAGS += -DAPP_NCI_AES
endif
ifeq ($(JENNIC_CHIP_FAMILY),JN517x)
INTERRUPT_HANDLER_BBC = zps_isrMAC
LDFLAGS += -Wl,-u$(INTERRUPT_HANDLER_BBC) -Wl,-defsym,vAHI_IntHandlerBbc_select=$(INTERRUPT_HANDLER_BBC)
endif
###############################################################################
# Select the network stack (e.g. MAC, ZBPro)
JENNIC_STACK ?= ZCL
# BDB features Enable as required
#BDB_SUPPORT_TOUCHLINK_INITIATOR ?= 1
#BDB_SUPPORT_TOUCHLINK_TARGET ?= 1
BDB_SUPPORT_NWK_STEERING ?= 1
BDB_SUPPORT_NWK_FORMATION ?= 1
BDB_SUPPORT_FIND_AND_BIND_INITIATOR ?= 1
#BDB_SUPPORT_FIND_AND_BIND_TARGET ?= 1
ifeq ($(APP_NCI_ICODE), 1)
BDB_SUPPORT_OOBC ?= 1
endif
ifeq ($(APP_NCI_AES), 1)
BDB_SUPPORT_OOBC ?= 1
endif
###############################################################################
# commands options
# enable optional commands as required per applicaion.
#
#NETWORK_RECOVERY ?= 0
STACK_MEASURE ?= 0
#
###############################################################################
# Debug options - define DEBUG to enable
# DEBUG ?=HW
#
# Define which UART to use for HW debug
DEBUG_PORT ?= UART1
# DEBUG_MODE ?= SWD # For ARM core
CFLAGS += -DUART=1
###############################################################################
CFLAGS += -DUART_BAUD_RATE=$(BAUD)
TRACE ?=1
ifeq ($(TRACE), 1)
CFLAGS += -DDBG_ENABLE=TRUE
# Enable any debug output here:
CFLAGS += -DDEBUG_APP=TRUE
CFLAGS += -DDEBUG_BDB=TRUE
CFLAGS += -DDEBUG_ZCL=TRUE
CFLAGS += -DDEBUG_APP_BUTTON=TRUE
CFLAGS += -DDEBUG_APP_BDB=TRUE
CFLAGS += -DDEBUG_APP_EVENT=TRUE
CFLAGS += -DDEBUG_APP_NCI=TRUE
CFLAGS += -DDEBUG_APP_ICODE=TRUE
CFLAGS += -DUART_DEBUGGING=TRUE
CFLAGS += -DDEBUG_UART=TRUE
endif
CFLAGS += -D$(TARGET)
GROUPS ?=0
ifeq ($(GROUPS), 1)
CFLAGS += -DUSE_GROUPS
CFLAGS += -DGROUP_ID=0x5678
endif
###############################################################################
# Path definitions
# Use if application directory contains multiple targets
SDK_BASE_DIR = $(abspath ../../../../sdk/$(JENNIC_SDK))
APP_BASE = $(abspath ../..)
APP_BLD_DIR = $(APP_BASE)/$(TARGET)/Build
APP_SRC_DIR = $(APP_BASE)/$(TARGET)/Source
APP_COMMON_SRC_DIR = $(APP_BASE)/Common/Source
HW_SRC_DIR = $(COMPONENTS_BASE_DIR)/HardwareAPI/Source
###############################################################################
# Application Source files
# Note: Path to source file is found using vpath below, so only .c filename is required
APPSRC = app_main.c
ifeq ($(JENNIC_CHIP_FAMILY), JN517x)
APPSRC += port_JN517x.c
endif
ifeq ($(JENNIC_CHIP_FAMILY), JN516x)
APPSRC += irq_JN516x.S
APPSRC += portasm_JN516x.S
APPSRC += port_JN516x.c
endif
APPSRC += pdum_gen.c
APPSRC += pdum_apdu.S
APPSRC += zps_gen.c
APPSRC += app_start.c
APPSRC += app_coordinator.c
APPSRC += app_serial_commands.c
APPSRC += app_zcl_task.c
APPSRC += app_buttons.c
APPSRC += app_pdm.c
ifeq ($(JENNIC_CHIP_FAMILY), JN516x)
#APPSRC += StackMeasure.c
endif
ifeq ($(JENNIC_CHIP_FAMILY), JN517x)
APPSRC += AHI_ModuleConfiguration.c
endif
APPSRC += uart.c
ifeq ($(APP_NCI_ICODE),1)
APPSRC += app_nci_icode.c
#APPSRC += app_icode.c
endif
ifeq ($(APP_NCI_AES),1)
APPSRC += app_nci_aes.c
endif
APP_ZPSCFG = app.zpscfg
OPTIONAL_STACK_FEATURES = $(shell $(ZPSCONFIG) -n $(TARGET) -f $(APP_COMMON_SRC_DIR)/$(APP_ZPSCFG) -y )