From fa4d4ab7cf774ccb701d01a6fd1371ce8d9474e9 Mon Sep 17 00:00:00 2001 From: armink Date: Fri, 12 Apr 2019 10:18:57 +0800 Subject: [PATCH] Update all of debug log definition to DBG_TAG and DBG_LVL. --- bsp/allwinner_tina/drivers/drv_gpio.c | 4 ++-- bsp/allwinner_tina/drivers/drv_sdio.c | 10 +++++----- bsp/allwinner_tina/drivers/spi/drv_spi.c | 6 +++--- bsp/allwinner_tina/drivers/spi/drv_spi_flash.c | 4 ++-- bsp/amebaz/drivers/wlan/drv_wifi.c | 4 ++-- bsp/imxrt/Libraries/imxrt1021/drivers/drv_eth.c | 7 +++---- .../Libraries/imxrt1021/drivers/drv_flexspi_nor.c | 4 ++-- bsp/imxrt/Libraries/imxrt1050/drivers/drv_eth.c | 4 ++-- bsp/imxrt/Libraries/imxrt1050/drivers/drv_eth_fire.c | 4 ++-- .../Libraries/imxrt1050/drivers/drv_flexspi_hyper.c | 4 ++-- .../Libraries/imxrt1050/drivers/drv_flexspi_nor.c | 4 ++-- bsp/k210/driver/drv_gpio.c | 4 ++-- bsp/k210/driver/drv_lcd.c | 6 ++---- bsp/qemu-vexpress-a9/drivers/audio/drv_pl041.c | 10 +++++----- bsp/qemu-vexpress-a9/drivers/drv_keyboard.c | 2 +- bsp/qemu-vexpress-a9/drivers/drv_mouse.c | 4 ++-- bsp/qemu-vexpress-a9/drivers/drv_sdio.c | 4 ++-- bsp/stm32/libraries/HAL_Drivers/drv_log.h | 8 ++++---- .../stm32f103-fire-arbitrary/board/ports/sdcard_port.c | 4 ++-- .../stm32f407-atk-explorer/board/ports/sdcard_port.c | 4 ++-- .../stm32f429-armfly-v6/board/ports/sdcard_port.c | 4 ++-- .../stm32f429-atk-apollo/board/ports/sdcard_port.c | 4 ++-- .../board/ports/sdcard_port.c | 4 ++-- bsp/stm32/stm32f746-st-disco/board/ports/sdcard_port.c | 4 ++-- .../stm32f767-atk-apollo/board/ports/sdcard_port.c | 4 ++-- .../board/ports/sdcard_port.c | 5 ++--- .../stm32l475-atk-pandora/board/ports/sdcard_port.c | 5 ++--- .../stm32l496-ali-developer/board/ports/sdcard_port.c | 5 ++--- bsp/stm32f429-apollo/drivers/audio/drv_mic.c | 4 ++-- bsp/stm32f429-apollo/drivers/audio/drv_sound.c | 4 ++-- bsp/w60x/drivers/drv_wifi.c | 6 ++---- bsp/x1000/drivers/mmc/drv_mmc.c | 4 ++-- components/dfs/include/dfs_private.h | 4 ++-- components/drivers/misc/adc.c | 4 ++-- components/drivers/sdio/block_dev.c | 6 +++--- components/drivers/sdio/mmc.c | 6 +++--- components/drivers/sdio/mmcsd_core.c | 6 +++--- components/drivers/sdio/sd.c | 6 +++--- components/drivers/sdio/sdio.c | 6 +++--- components/drivers/sensors/sensor.c | 4 ++-- components/drivers/sensors/sensor_cmd.c | 4 ++-- components/drivers/serial/serial.c | 4 ++-- components/drivers/wlan/wlan_cfg.c | 8 ++++---- components/drivers/wlan/wlan_dev.c | 8 ++++---- components/drivers/wlan/wlan_lwip.c | 8 ++++---- components/drivers/wlan/wlan_mgnt.c | 9 ++++----- components/drivers/wlan/wlan_prot.c | 8 ++++---- components/drivers/wlan/wlan_workqueue.c | 4 ++-- components/libc/libdl/dlelf.c | 4 ++-- components/libc/libdl/dlmodule.c | 4 ++-- components/lwp/lwp.c | 4 ++-- components/lwp/lwp_mem.c | 4 ++-- components/lwp/lwp_syscall.c | 4 ++-- components/net/at/include/at_log.h | 8 ++++---- components/net/sal_socket/src/sal_socket.c | 4 ++-- components/utilities/ulog/ulog_def.h | 8 ++++++-- components/utilities/utest/utest.c | 10 +++++----- components/utilities/utest/utest_log.h | 10 +++++----- examples/network/tcpclient.c | 6 +++--- examples/network/tcpserver.c | 6 +++--- examples/network/udpclient.c | 6 +++--- examples/network/udpserver.c | 6 +++--- src/signal.c | 4 ++-- 63 files changed, 166 insertions(+), 171 deletions(-) diff --git a/bsp/allwinner_tina/drivers/drv_gpio.c b/bsp/allwinner_tina/drivers/drv_gpio.c index e8d82a3fae..b121842b30 100644 --- a/bsp/allwinner_tina/drivers/drv_gpio.c +++ b/bsp/allwinner_tina/drivers/drv_gpio.c @@ -27,8 +27,8 @@ #include "drv_gpio.h" #include "interrupt.h" -#define DBG_SECTION_NAME "GPIO" -#define DBG_LEVEL DBG_WARNING +#define DBG_TAG "GPIO" +#define DBG_LVL DBG_WARNING #include #define readl(addr) (*(volatile unsigned int *)(addr)) diff --git a/bsp/allwinner_tina/drivers/drv_sdio.c b/bsp/allwinner_tina/drivers/drv_sdio.c index c1b4bcc41c..11b5a63d02 100644 --- a/bsp/allwinner_tina/drivers/drv_sdio.c +++ b/bsp/allwinner_tina/drivers/drv_sdio.c @@ -33,11 +33,11 @@ #include "drv_clock.h" -#define DBG_SECTION_NAME "MMC" -// #define DBG_LEVEL DBG_LOG -// #define DBG_LEVEL DBG_INFO -#define DBG_LEVEL DBG_WARNING -// #define DBG_LEVEL DBG_ERROR +#define DBG_TAG "MMC" +// #define DBG_LVL DBG_LOG +// #define DBG_LVL DBG_INFO +#define DBG_LVL DBG_WARNING +// #define DBG_LVL DBG_ERROR #include #ifdef RT_USING_SDIO diff --git a/bsp/allwinner_tina/drivers/spi/drv_spi.c b/bsp/allwinner_tina/drivers/spi/drv_spi.c index a271c2e7d9..506b0cae99 100644 --- a/bsp/allwinner_tina/drivers/spi/drv_spi.c +++ b/bsp/allwinner_tina/drivers/spi/drv_spi.c @@ -35,11 +35,11 @@ //#define DEBUG -#define DBG_SECTION_NAME "SPI" +#define DBG_TAG "SPI" #ifdef DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_WARNING +#define DBG_LVL DBG_WARNING #endif /* DEBUG */ #include diff --git a/bsp/allwinner_tina/drivers/spi/drv_spi_flash.c b/bsp/allwinner_tina/drivers/spi/drv_spi_flash.c index 0b01200ee8..e507859928 100644 --- a/bsp/allwinner_tina/drivers/spi/drv_spi_flash.c +++ b/bsp/allwinner_tina/drivers/spi/drv_spi_flash.c @@ -26,8 +26,8 @@ #include #include -#define DBG_SECTION_NAME "FLASH" -#define DBG_LEVEL DBG_LOG +#define DBG_TAG "FLASH" +#define DBG_LVL DBG_LOG #include #define SPI_FLASH_DEVICE_NAME "spi00" diff --git a/bsp/amebaz/drivers/wlan/drv_wifi.c b/bsp/amebaz/drivers/wlan/drv_wifi.c index 753952df43..12865bfc3b 100644 --- a/bsp/amebaz/drivers/wlan/drv_wifi.c +++ b/bsp/amebaz/drivers/wlan/drv_wifi.c @@ -28,8 +28,8 @@ #include "drv_wlan.h" #include "drv_wifi.h" -#define DBG_LEVEL DBG_INFO -#define DBG_SECTION_NAME "WIFI" +#define DBG_LVL DBG_INFO +#define DBG_TAG "WIFI" #include #define MAX_ADDR_LEN (6) diff --git a/bsp/imxrt/Libraries/imxrt1021/drivers/drv_eth.c b/bsp/imxrt/Libraries/imxrt1021/drivers/drv_eth.c index 24b8e51736..15aa05e838 100644 --- a/bsp/imxrt/Libraries/imxrt1021/drivers/drv_eth.c +++ b/bsp/imxrt/Libraries/imxrt1021/drivers/drv_eth.c @@ -40,10 +40,9 @@ //#define ETH_RX_DUMP //#define ETH_TX_DUMP -#define DBG_ENABLE -#define DBG_SECTION_NAME "ETH" -#define DBG_COLOR -#define DBG_LEVEL DBG_INFO + +#define DBG_TAG "ETH" +#define DBG_LVL DBG_INFO #include #define MAX_ADDR_LEN 6 diff --git a/bsp/imxrt/Libraries/imxrt1021/drivers/drv_flexspi_nor.c b/bsp/imxrt/Libraries/imxrt1021/drivers/drv_flexspi_nor.c index 0e49ae01fb..fc69e65375 100644 --- a/bsp/imxrt/Libraries/imxrt1021/drivers/drv_flexspi_nor.c +++ b/bsp/imxrt/Libraries/imxrt1021/drivers/drv_flexspi_nor.c @@ -14,8 +14,8 @@ #include #include "drv_flexspi.h" -#define DBG_SECTION_NAME "FLEXSPI" -#define DBG_LEVEL DBG_LOG +#define DBG_TAG "FLEXSPI" +#define DBG_LVL DBG_LOG #include #define FLEXSPI_CLOCK kCLOCK_FlexSpi diff --git a/bsp/imxrt/Libraries/imxrt1050/drivers/drv_eth.c b/bsp/imxrt/Libraries/imxrt1050/drivers/drv_eth.c index efc5cb9ca9..cc591b944a 100644 --- a/bsp/imxrt/Libraries/imxrt1050/drivers/drv_eth.c +++ b/bsp/imxrt/Libraries/imxrt1050/drivers/drv_eth.c @@ -46,8 +46,8 @@ //#define ETH_RX_DUMP //#define ETH_TX_DUMP -#define DBG_SECTION_NAME "ETH" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "ETH" +#define DBG_LVL DBG_INFO #include #define MAX_ADDR_LEN 6 diff --git a/bsp/imxrt/Libraries/imxrt1050/drivers/drv_eth_fire.c b/bsp/imxrt/Libraries/imxrt1050/drivers/drv_eth_fire.c index 1cae69ba17..ef6008ca78 100644 --- a/bsp/imxrt/Libraries/imxrt1050/drivers/drv_eth_fire.c +++ b/bsp/imxrt/Libraries/imxrt1050/drivers/drv_eth_fire.c @@ -37,8 +37,8 @@ //#define ETH_RX_DUMP //#define ETH_TX_DUMP -#define DBG_SECTION_NAME "ETH" -#define DBG_LEVEL DBG_LOG +#define DBG_TAG "ETH" +#define DBG_LVL DBG_LOG #include #define MAX_ADDR_LEN 6 diff --git a/bsp/imxrt/Libraries/imxrt1050/drivers/drv_flexspi_hyper.c b/bsp/imxrt/Libraries/imxrt1050/drivers/drv_flexspi_hyper.c index 5ca326070c..5e0192f8ba 100644 --- a/bsp/imxrt/Libraries/imxrt1050/drivers/drv_flexspi_hyper.c +++ b/bsp/imxrt/Libraries/imxrt1050/drivers/drv_flexspi_hyper.c @@ -14,8 +14,8 @@ #include #include "drv_flexspi.h" -#define DBG_SECTION_NAME "Hyper" -#define DBG_LEVEL DBG_LOG +#define DBG_TAG "Hyper" +#define DBG_LVL DBG_LOG #include #define FLEXSPI_CLOCK kCLOCK_FlexSpi diff --git a/bsp/imxrt/Libraries/imxrt1050/drivers/drv_flexspi_nor.c b/bsp/imxrt/Libraries/imxrt1050/drivers/drv_flexspi_nor.c index 4e9e738b6c..05b4e32331 100644 --- a/bsp/imxrt/Libraries/imxrt1050/drivers/drv_flexspi_nor.c +++ b/bsp/imxrt/Libraries/imxrt1050/drivers/drv_flexspi_nor.c @@ -13,8 +13,8 @@ #include #include "drv_flexspi.h" -#define DBG_SECTION_NAME "FLEXSPI" -#define DBG_LEVEL DBG_LOG +#define DBG_TAG "FLEXSPI" +#define DBG_LVL DBG_LOG #include #define FLEXSPI_CLOCK kCLOCK_FlexSpi diff --git a/bsp/k210/driver/drv_gpio.c b/bsp/k210/driver/drv_gpio.c index 25ee6f68b0..4efce0e827 100644 --- a/bsp/k210/driver/drv_gpio.c +++ b/bsp/k210/driver/drv_gpio.c @@ -20,8 +20,8 @@ #include #define DBG_ENABLE -#define DBG_SECTION_NAME "PIN" -#define DBG_LEVEL DBG_WARNING +#define DBG_TAG "PIN" +#define DBG_LVL DBG_WARNING #define DBG_COLOR #include diff --git a/bsp/k210/driver/drv_lcd.c b/bsp/k210/driver/drv_lcd.c index cd7d11bbb5..2719391154 100644 --- a/bsp/k210/driver/drv_lcd.c +++ b/bsp/k210/driver/drv_lcd.c @@ -21,10 +21,8 @@ #include #include -#define DBG_ENABLE -#define DBG_SECTION_NAME "LCD" -#define DBG_LEVEL DBG_WARNING -#define DBG_COLOR +#define DBG_TAG "LCD" +#define DBG_LVL DBG_WARNING #include #define NO_OPERATION 0x00 diff --git a/bsp/qemu-vexpress-a9/drivers/audio/drv_pl041.c b/bsp/qemu-vexpress-a9/drivers/audio/drv_pl041.c index 68f8f09c10..51cf3710ef 100644 --- a/bsp/qemu-vexpress-a9/drivers/audio/drv_pl041.c +++ b/bsp/qemu-vexpress-a9/drivers/audio/drv_pl041.c @@ -28,11 +28,11 @@ #include "drv_ac97.h" #include "realview.h" -#define DBG_SECTION_NAME "PL041" -// #define DBG_LEVEL DBG_LOG -// #define DBG_LEVEL DBG_INFO -#define DBG_LEVEL DBG_WARNING -// #define DBG_LEVEL DBG_ERROR +#define DBG_TAG "PL041" +// #define DBG_LVL DBG_LOG +// #define DBG_LVL DBG_INFO +#define DBG_LVL DBG_WARNING +// #define DBG_LVL DBG_ERROR #include #define FRAME_PERIOD_US (50) diff --git a/bsp/qemu-vexpress-a9/drivers/drv_keyboard.c b/bsp/qemu-vexpress-a9/drivers/drv_keyboard.c index 4948f46117..246e053a60 100644 --- a/bsp/qemu-vexpress-a9/drivers/drv_keyboard.c +++ b/bsp/qemu-vexpress-a9/drivers/drv_keyboard.c @@ -6,7 +6,7 @@ #include "interrupt.h" #include "drv_keyboard.h" -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #include "rtdbg.h" #define KEYBOARD_ADDRESS (0x10006000) diff --git a/bsp/qemu-vexpress-a9/drivers/drv_mouse.c b/bsp/qemu-vexpress-a9/drivers/drv_mouse.c index 852cc56129..07e3ed16f6 100644 --- a/bsp/qemu-vexpress-a9/drivers/drv_mouse.c +++ b/bsp/qemu-vexpress-a9/drivers/drv_mouse.c @@ -7,8 +7,8 @@ #include "drv_mouse.h" #include "drv_clcd.h" -#define DBG_SECTION_NAME "drv.mouse" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "drv.mouse" +#define DBG_LVL DBG_INFO #include "rtdbg.h" #define MOUSE_ADDRESS (0x10007000) diff --git a/bsp/qemu-vexpress-a9/drivers/drv_sdio.c b/bsp/qemu-vexpress-a9/drivers/drv_sdio.c index c031011e51..17c6b11f57 100644 --- a/bsp/qemu-vexpress-a9/drivers/drv_sdio.c +++ b/bsp/qemu-vexpress-a9/drivers/drv_sdio.c @@ -77,8 +77,8 @@ #define PL180_CLR_DAT_END (1 << 8) #define PL180_CLR_DAT_BLK_END (1 << 10) -#define DBG_SECTION_NAME "drv.sdio" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "drv.sdio" +#define DBG_LVL DBG_INFO #include "rtdbg.h" struct sdhci_pl180_pdata_t diff --git a/bsp/stm32/libraries/HAL_Drivers/drv_log.h b/bsp/stm32/libraries/HAL_Drivers/drv_log.h index 69328b368a..7e0bfee5b4 100644 --- a/bsp/stm32/libraries/HAL_Drivers/drv_log.h +++ b/bsp/stm32/libraries/HAL_Drivers/drv_log.h @@ -13,15 +13,15 @@ */ #ifndef LOG_TAG -#define DBG_SECTION_NAME "drv" +#define DBG_TAG "drv" #else -#define DBG_SECTION_NAME LOG_TAG +#define DBG_TAG LOG_TAG #endif /* LOG_TAG */ #ifdef DRV_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #endif /* DRV_DEBUG */ #include diff --git a/bsp/stm32/stm32f103-fire-arbitrary/board/ports/sdcard_port.c b/bsp/stm32/stm32f103-fire-arbitrary/board/ports/sdcard_port.c index 45c8a6d74d..bf5f3e10a7 100644 --- a/bsp/stm32/stm32f103-fire-arbitrary/board/ports/sdcard_port.c +++ b/bsp/stm32/stm32f103-fire-arbitrary/board/ports/sdcard_port.c @@ -16,8 +16,8 @@ #include #include -#define DBG_SECTION_NAME "app.card" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "app.card" +#define DBG_LVL DBG_INFO #include void sd_mount(void *parameter) diff --git a/bsp/stm32/stm32f407-atk-explorer/board/ports/sdcard_port.c b/bsp/stm32/stm32f407-atk-explorer/board/ports/sdcard_port.c index 625cec463d..0a9c36fd42 100644 --- a/bsp/stm32/stm32f407-atk-explorer/board/ports/sdcard_port.c +++ b/bsp/stm32/stm32f407-atk-explorer/board/ports/sdcard_port.c @@ -16,8 +16,8 @@ #include #include -#define DBG_SECTION_NAME "app.card" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "app.card" +#define DBG_LVL DBG_INFO #include void sd_mount(void *parameter) diff --git a/bsp/stm32/stm32f429-armfly-v6/board/ports/sdcard_port.c b/bsp/stm32/stm32f429-armfly-v6/board/ports/sdcard_port.c index 0eb7035ddf..b46537d311 100644 --- a/bsp/stm32/stm32f429-armfly-v6/board/ports/sdcard_port.c +++ b/bsp/stm32/stm32f429-armfly-v6/board/ports/sdcard_port.c @@ -16,8 +16,8 @@ #include #include -#define DBG_SECTION_NAME "app.card" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "app.card" +#define DBG_LVL DBG_INFO #include void sd_mount(void *parameter) diff --git a/bsp/stm32/stm32f429-atk-apollo/board/ports/sdcard_port.c b/bsp/stm32/stm32f429-atk-apollo/board/ports/sdcard_port.c index 625cec463d..0a9c36fd42 100644 --- a/bsp/stm32/stm32f429-atk-apollo/board/ports/sdcard_port.c +++ b/bsp/stm32/stm32f429-atk-apollo/board/ports/sdcard_port.c @@ -16,8 +16,8 @@ #include #include -#define DBG_SECTION_NAME "app.card" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "app.card" +#define DBG_LVL DBG_INFO #include void sd_mount(void *parameter) diff --git a/bsp/stm32/stm32f429-fire-challenger/board/ports/sdcard_port.c b/bsp/stm32/stm32f429-fire-challenger/board/ports/sdcard_port.c index c7200001e3..d7b740ae47 100644 --- a/bsp/stm32/stm32f429-fire-challenger/board/ports/sdcard_port.c +++ b/bsp/stm32/stm32f429-fire-challenger/board/ports/sdcard_port.c @@ -17,8 +17,8 @@ #include #include "drv_gpio.h" -#define DBG_SECTION_NAME "app.card" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "app.card" +#define DBG_LVL DBG_INFO #include #define WIFI_RESET_PIN GET_PIN(G, 9) diff --git a/bsp/stm32/stm32f746-st-disco/board/ports/sdcard_port.c b/bsp/stm32/stm32f746-st-disco/board/ports/sdcard_port.c index 143576eb12..0797f9326c 100644 --- a/bsp/stm32/stm32f746-st-disco/board/ports/sdcard_port.c +++ b/bsp/stm32/stm32f746-st-disco/board/ports/sdcard_port.c @@ -16,8 +16,8 @@ #include #include -#define DBG_SECTION_NAME "app.card" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "app.card" +#define DBG_LVL DBG_INFO #include void sd_mount(void *parameter) diff --git a/bsp/stm32/stm32f767-atk-apollo/board/ports/sdcard_port.c b/bsp/stm32/stm32f767-atk-apollo/board/ports/sdcard_port.c index 625cec463d..0a9c36fd42 100644 --- a/bsp/stm32/stm32f767-atk-apollo/board/ports/sdcard_port.c +++ b/bsp/stm32/stm32f767-atk-apollo/board/ports/sdcard_port.c @@ -16,8 +16,8 @@ #include #include -#define DBG_SECTION_NAME "app.card" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "app.card" +#define DBG_LVL DBG_INFO #include void sd_mount(void *parameter) diff --git a/bsp/stm32/stm32f767-fire-challenger/board/ports/sdcard_port.c b/bsp/stm32/stm32f767-fire-challenger/board/ports/sdcard_port.c index b8db33d0d2..615ad6e06e 100644 --- a/bsp/stm32/stm32f767-fire-challenger/board/ports/sdcard_port.c +++ b/bsp/stm32/stm32f767-fire-challenger/board/ports/sdcard_port.c @@ -17,9 +17,8 @@ #include #include "drv_gpio.h" - -#define DBG_SECTION_NAME "app.card" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "app.card" +#define DBG_LVL DBG_INFO #include #define WIFI_RESET_PIN GET_PIN(G, 9) diff --git a/bsp/stm32/stm32l475-atk-pandora/board/ports/sdcard_port.c b/bsp/stm32/stm32l475-atk-pandora/board/ports/sdcard_port.c index 11c66f34b7..e1af109455 100644 --- a/bsp/stm32/stm32l475-atk-pandora/board/ports/sdcard_port.c +++ b/bsp/stm32/stm32l475-atk-pandora/board/ports/sdcard_port.c @@ -18,9 +18,8 @@ #include "drv_spi.h" #include "spi_msd.h" - -#define DBG_SECTION_NAME "app.card" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "app.card" +#define DBG_LVL DBG_INFO #include void sd_mount(void *parameter) diff --git a/bsp/stm32/stm32l496-ali-developer/board/ports/sdcard_port.c b/bsp/stm32/stm32l496-ali-developer/board/ports/sdcard_port.c index 54b5af7ed6..8a2c1cade7 100644 --- a/bsp/stm32/stm32l496-ali-developer/board/ports/sdcard_port.c +++ b/bsp/stm32/stm32l496-ali-developer/board/ports/sdcard_port.c @@ -16,9 +16,8 @@ #include #include - -#define DBG_SECTION_NAME "app.card" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "app.card" +#define DBG_LVL DBG_INFO #include void sd_mount(void *parameter) diff --git a/bsp/stm32f429-apollo/drivers/audio/drv_mic.c b/bsp/stm32f429-apollo/drivers/audio/drv_mic.c index 3dab97c60a..745fb53869 100644 --- a/bsp/stm32f429-apollo/drivers/audio/drv_mic.c +++ b/bsp/stm32f429-apollo/drivers/audio/drv_mic.c @@ -18,8 +18,8 @@ #include "drv_wm8978.h" #include -#define DBG_LEVEL DBG_INFO -#define DBG_SECTION_NAME "MIC" +#define DBG_TAG "MIC" +#define DBG_LVL DBG_INFO #include struct micphone_device diff --git a/bsp/stm32f429-apollo/drivers/audio/drv_sound.c b/bsp/stm32f429-apollo/drivers/audio/drv_sound.c index 5bebc01470..b35be5af61 100644 --- a/bsp/stm32f429-apollo/drivers/audio/drv_sound.c +++ b/bsp/stm32f429-apollo/drivers/audio/drv_sound.c @@ -19,8 +19,8 @@ #include "drv_wm8978.h" #include -#define DBG_LEVEL DBG_LOG -#define DBG_SECTION_NAME "Sound" +#define DBG_TAG "Sound" +#define DBG_LVL DBG_LOG #include /** diff --git a/bsp/w60x/drivers/drv_wifi.c b/bsp/w60x/drivers/drv_wifi.c index b7bc9eb459..2ae441b420 100644 --- a/bsp/w60x/drivers/drv_wifi.c +++ b/bsp/w60x/drivers/drv_wifi.c @@ -14,10 +14,8 @@ #include "wm_wifi.h" #include "drv_wifi.h" -#define DBG_ENABLE -#define DBG_LEVEL DBG_INFO -#define DBG_SECTION_NAME "WIFI" -#define DBG_COLOR +#define DBG_TAG "WIFI" +#define DBG_LVL DBG_INFO #include #include "wm_ram_config.h" diff --git a/bsp/x1000/drivers/mmc/drv_mmc.c b/bsp/x1000/drivers/mmc/drv_mmc.c index d2b0016f4b..8e6e86c942 100644 --- a/bsp/x1000/drivers/mmc/drv_mmc.c +++ b/bsp/x1000/drivers/mmc/drv_mmc.c @@ -33,8 +33,8 @@ #define DMA_ALIGN (32U) #define PIO_THRESHOLD 64 /* use pio mode if data length < PIO_THRESHOLD */ -#define DBG_SECTION_NAME "SDIO" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "SDIO" +#define DBG_LVL DBG_INFO #include /* diff --git a/components/dfs/include/dfs_private.h b/components/dfs/include/dfs_private.h index 77dbe8562d..fccd260ac0 100644 --- a/components/dfs/include/dfs_private.h +++ b/components/dfs/include/dfs_private.h @@ -12,8 +12,8 @@ #include -#define DBG_SECTION_NAME "DFS" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "DFS" +#define DBG_LVL DBG_INFO #include #define NO_WORKING_DIR "system does not support working directory\n" diff --git a/components/drivers/misc/adc.c b/components/drivers/misc/adc.c index fec4f736e0..2d26beb243 100644 --- a/components/drivers/misc/adc.c +++ b/components/drivers/misc/adc.c @@ -15,8 +15,8 @@ #include #include -#define DBG_SECTION_NAME "adc" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "adc" +#define DBG_LVL DBG_INFO #include static rt_size_t _adc_read(rt_device_t dev, rt_off_t pos, void *buffer, rt_size_t size) diff --git a/components/drivers/sdio/block_dev.c b/components/drivers/sdio/block_dev.c index dcfbc0ca7b..cac4fc5036 100644 --- a/components/drivers/sdio/block_dev.c +++ b/components/drivers/sdio/block_dev.c @@ -13,11 +13,11 @@ #include -#define DBG_SECTION_NAME "SDIO" +#define DBG_TAG "SDIO" #ifdef RT_SDIO_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #endif /* RT_SDIO_DEBUG */ #include diff --git a/components/drivers/sdio/mmc.c b/components/drivers/sdio/mmc.c index 5f9259ef52..5c7ddcb258 100644 --- a/components/drivers/sdio/mmc.c +++ b/components/drivers/sdio/mmc.c @@ -11,11 +11,11 @@ #include #include -#define DBG_SECTION_NAME "SDIO" +#define DBG_TAG "SDIO" #ifdef RT_SDIO_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #endif /* RT_SDIO_DEBUG */ #include diff --git a/components/drivers/sdio/mmcsd_core.c b/components/drivers/sdio/mmcsd_core.c index 160defa645..8131a33133 100644 --- a/components/drivers/sdio/mmcsd_core.c +++ b/components/drivers/sdio/mmcsd_core.c @@ -14,11 +14,11 @@ #include #include -#define DBG_SECTION_NAME "SDIO" +#define DBG_TAG "SDIO" #ifdef RT_SDIO_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #endif /* RT_SDIO_DEBUG */ #include diff --git a/components/drivers/sdio/sd.c b/components/drivers/sdio/sd.c index f4e925507c..3e7ad1cd16 100644 --- a/components/drivers/sdio/sd.c +++ b/components/drivers/sdio/sd.c @@ -11,11 +11,11 @@ #include #include -#define DBG_SECTION_NAME "SDIO" +#define DBG_TAG "SDIO" #ifdef RT_SDIO_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #endif /* RT_SDIO_DEBUG */ #include diff --git a/components/drivers/sdio/sdio.c b/components/drivers/sdio/sdio.c index b0516704fd..f31f5b81a8 100644 --- a/components/drivers/sdio/sdio.c +++ b/components/drivers/sdio/sdio.c @@ -12,11 +12,11 @@ #include #include -#define DBG_SECTION_NAME "SDIO" +#define DBG_TAG "SDIO" #ifdef RT_SDIO_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #endif /* RT_SDIO_DEBUG */ #include diff --git a/components/drivers/sensors/sensor.c b/components/drivers/sensors/sensor.c index ec1ad98fb6..c86f96c14d 100644 --- a/components/drivers/sensors/sensor.c +++ b/components/drivers/sensors/sensor.c @@ -10,8 +10,8 @@ #include "sensor.h" -#define DBG_LEVEL DBG_INFO -#define DBG_SECTION_NAME "sensor" +#define DBG_TAG "sensor" +#define DBG_LVL DBG_INFO #include #include diff --git a/components/drivers/sensors/sensor_cmd.c b/components/drivers/sensors/sensor_cmd.c index 4658a42722..3369ee376a 100644 --- a/components/drivers/sensors/sensor_cmd.c +++ b/components/drivers/sensors/sensor_cmd.c @@ -10,8 +10,8 @@ #include "sensor.h" -#define DBG_LEVEL DBG_INFO -#define DBG_SECTION_NAME "sensor.cmd" +#define DBG_TAG "sensor.cmd" +#define DBG_LVL DBG_INFO #include #include diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index 13bf54e721..d4cf35414c 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -28,8 +28,8 @@ #include #include -#define DBG_LEVEL DBG_INFO -#define DBG_SECTION_NAME "UART" +#define DBG_TAG "UART" +#define DBG_LVL DBG_INFO #include #ifdef RT_USING_POSIX diff --git a/components/drivers/wlan/wlan_cfg.c b/components/drivers/wlan/wlan_cfg.c index 00e9dbc83e..43fed8e6e8 100644 --- a/components/drivers/wlan/wlan_cfg.c +++ b/components/drivers/wlan/wlan_cfg.c @@ -11,12 +11,12 @@ #include #include +#define DBG_TAG "WLAN.cfg" #ifdef RT_WLAN_CFG_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO -#endif -#define DBG_SECTION_NAME "WLAN.cfg" +#define DBG_LVL DBG_INFO +#endif /* RT_WLAN_CFG_DEBUG */ #include #define WLAN_CFG_LOCK() (rt_mutex_take(&cfg_mutex, RT_WAITING_FOREVER)) diff --git a/components/drivers/wlan/wlan_dev.c b/components/drivers/wlan/wlan_dev.c index 3f4adf35ad..82fa4e73e7 100644 --- a/components/drivers/wlan/wlan_dev.c +++ b/components/drivers/wlan/wlan_dev.c @@ -13,12 +13,12 @@ #include #include +#define DBG_TAG "WLAN.dev" #ifdef RT_WLAN_DEV_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO -#endif -#define DBG_SECTION_NAME "WLAN.dev" +#define DBG_LVL DBG_INFO +#endif /* RT_WLAN_DEV_DEBUG */ #include #ifndef RT_DEVICE diff --git a/components/drivers/wlan/wlan_lwip.c b/components/drivers/wlan/wlan_lwip.c index 052c2afd2e..84b448c68f 100644 --- a/components/drivers/wlan/wlan_lwip.c +++ b/components/drivers/wlan/wlan_lwip.c @@ -21,12 +21,12 @@ #include #endif +#define DBG_TAG "WLAN.lwip" #ifdef RT_WLAN_LWIP_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO -#endif -#define DBG_SECTION_NAME "WLAN.lwip" +#define DBG_LVL DBG_INFO +#endif /* RT_WLAN_LWIP_DEBUG */ #include #ifndef IPADDR_STRLEN_MAX diff --git a/components/drivers/wlan/wlan_mgnt.c b/components/drivers/wlan/wlan_mgnt.c index ced5bfa1c2..91a77e43d0 100644 --- a/components/drivers/wlan/wlan_mgnt.c +++ b/components/drivers/wlan/wlan_mgnt.c @@ -16,13 +16,12 @@ #include #include - +#define DBG_TAG "WLAN.mgnt" #ifdef RT_WLAN_MGNT_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO -#endif -#define DBG_SECTION_NAME "WLAN.mgnt" +#define DBG_LVL DBG_INFO +#endif /* RT_WLAN_MGNT_DEBUG */ #include #ifndef RT_WLAN_DEVICE diff --git a/components/drivers/wlan/wlan_prot.c b/components/drivers/wlan/wlan_prot.c index 48adbc48f3..0402962e01 100644 --- a/components/drivers/wlan/wlan_prot.c +++ b/components/drivers/wlan/wlan_prot.c @@ -13,12 +13,12 @@ #include #include +#define DBG_TAG "WLAN.prot" #ifdef RT_WLAN_PROT_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO -#endif -#define DBG_SECTION_NAME "WLAN.prot" +#define DBG_LVL DBG_INFO +#endif /* RT_WLAN_PROT_DEBUG */ #include #if RT_WLAN_PROT_NAME_LEN < 4 diff --git a/components/drivers/wlan/wlan_workqueue.c b/components/drivers/wlan/wlan_workqueue.c index 23823afae0..ec21243d60 100644 --- a/components/drivers/wlan/wlan_workqueue.c +++ b/components/drivers/wlan/wlan_workqueue.c @@ -13,8 +13,8 @@ #include #include -#define DBG_LEVEL DBG_INFO -#define DBG_SECTION_NAME "WLAN.work" +#define DBG_TAG "WLAN.work" +#define DBG_LVL DBG_INFO #include struct rt_wlan_work diff --git a/components/libc/libdl/dlelf.c b/components/libc/libdl/dlelf.c index 4557ee3458..1265ffcb07 100644 --- a/components/libc/libdl/dlelf.c +++ b/components/libc/libdl/dlelf.c @@ -11,8 +11,8 @@ #include "dlmodule.h" #include "dlelf.h" -#define DBG_SECTION_NAME "DLMD" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "DLMD" +#define DBG_LVL DBG_INFO #include // must after of DEBUG_ENABLE or some other options rt_err_t dlmodule_load_shared_object(struct rt_dlmodule* module, void *module_ptr) diff --git a/components/libc/libdl/dlmodule.c b/components/libc/libdl/dlmodule.c index 14cbfe4cfb..dbebfc8961 100644 --- a/components/libc/libdl/dlmodule.c +++ b/components/libc/libdl/dlmodule.c @@ -16,8 +16,8 @@ #include -#define DBG_SECTION_NAME "DLMD" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "DLMD" +#define DBG_LVL DBG_INFO #include // must after of DEBUG_ENABLE or some other options static struct rt_module_symtab *_rt_module_symtab_begin = RT_NULL; diff --git a/components/lwp/lwp.c b/components/lwp/lwp.c index e1ba26f21c..7881fcc68f 100644 --- a/components/lwp/lwp.c +++ b/components/lwp/lwp.c @@ -19,8 +19,8 @@ #include "lwp.h" -#define DBG_SECTION_NAME "LWP" -#define DBG_LEVEL DBG_WARNING +#define DBG_TAG "LWP" +#define DBG_LVL DBG_WARNING #include extern void lwp_user_entry(void *args, const void *text, void *data); diff --git a/components/lwp/lwp_mem.c b/components/lwp/lwp_mem.c index e733166934..63fd5c89e1 100644 --- a/components/lwp/lwp_mem.c +++ b/components/lwp/lwp_mem.c @@ -11,8 +11,8 @@ #include #include -#define DBG_SECTION_NAME "LWPMEM" -#define DBG_LEVEL DBG_WARNING +#define DBG_TAG "LWPMEM" +#define DBG_LVL DBG_WARNING #include // todo: remove repleat code diff --git a/components/lwp/lwp_syscall.c b/components/lwp/lwp_syscall.c index 723786f1cd..be95c5fb89 100644 --- a/components/lwp/lwp_syscall.c +++ b/components/lwp/lwp_syscall.c @@ -24,8 +24,8 @@ #define SYSCALL_NET(f) ((void*)sys_notimpl) #endif -#define DBG_SECTION_NAME "LWP_CALL" -#define DBG_LEVEL DBG_WARNING +#define DBG_TAG "LWP_CALL" +#define DBG_LVL DBG_WARNING #include static void __exit_files(rt_thread_t tid) diff --git a/components/net/at/include/at_log.h b/components/net/at/include/at_log.h index fe8766ba95..9e133561f7 100644 --- a/components/net/at/include/at_log.h +++ b/components/net/at/include/at_log.h @@ -13,15 +13,15 @@ */ #ifndef LOG_TAG -#define DBG_SECTION_NAME "at" +#define DBG_TAG "at" #else -#define DBG_SECTION_NAME LOG_TAG +#define DBG_TAG LOG_TAG #endif /* LOG_TAG */ #ifdef AT_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #endif /* AT_DEBUG */ #include diff --git a/components/net/sal_socket/src/sal_socket.c b/components/net/sal_socket/src/sal_socket.c index 771a56f061..8d699b63e7 100644 --- a/components/net/sal_socket/src/sal_socket.c +++ b/components/net/sal_socket/src/sal_socket.c @@ -19,8 +19,8 @@ #endif #include -#define DBG_SECTION_NAME "SAL_SKT" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "SAL_SKT" +#define DBG_LVL DBG_INFO #include #define SOCKET_TABLE_STEP_LEN 4 diff --git a/components/utilities/ulog/ulog_def.h b/components/utilities/ulog/ulog_def.h index 40b39de972..de5e82fcc5 100644 --- a/components/utilities/ulog/ulog_def.h +++ b/components/utilities/ulog/ulog_def.h @@ -54,7 +54,9 @@ extern "C" { #if !defined(LOG_TAG) /* compatible for rtdbg */ - #if defined(DBG_SECTION_NAME) + #if defined(DBG_TAG) + #define LOG_TAG DBG_TAG + #elif defined(DBG_SECTION_NAME) #define LOG_TAG DBG_SECTION_NAME #else #define LOG_TAG "NO_TAG" @@ -63,7 +65,9 @@ extern "C" { #if !defined(LOG_LVL) /* compatible for rtdbg */ - #if defined(DBG_LEVEL) + #if defined(DBG_LVL) + #define LOG_LVL DBG_LVL + #elif defined(DBG_LEVEL) #define LOG_LVL DBG_LEVEL #else #define LOG_LVL LOG_LVL_DBG diff --git a/components/utilities/utest/utest.c b/components/utilities/utest/utest.c index 99775ab09f..f59f97bb64 100644 --- a/components/utilities/utest/utest.c +++ b/components/utilities/utest/utest.c @@ -15,14 +15,14 @@ #include "utest.h" #include -#undef DBG_SECTION_NAME -#undef DBG_LEVEL +#undef DBG_TAG +#undef DBG_LVL -#define DBG_SECTION_NAME "utest" +#define DBG_TAG "utest" #ifdef UTEST_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #endif #include diff --git a/components/utilities/utest/utest_log.h b/components/utilities/utest/utest_log.h index c4bd25a80b..0403268351 100644 --- a/components/utilities/utest/utest_log.h +++ b/components/utilities/utest/utest_log.h @@ -15,14 +15,14 @@ #define UTEST_DEBUG -#undef DBG_SECTION_NAME -#undef DBG_LEVEL +#undef DBG_TAG +#undef DBG_LVL -#define DBG_SECTION_NAME "testcase" +#define DBG_TAG "testcase" #ifdef UTEST_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #endif #include diff --git a/examples/network/tcpclient.c b/examples/network/tcpclient.c index be50711e94..2059d9f17f 100644 --- a/examples/network/tcpclient.c +++ b/examples/network/tcpclient.c @@ -12,11 +12,11 @@ #define DEBUG_TCP_CLIENT -#define DBG_SECTION_NAME "TCP" +#define DBG_TAG "TCP" #ifdef DEBUG_TCP_CLIENT -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO /* DBG_ERROR */ +#define DBG_LVL DBG_INFO /* DBG_ERROR */ #endif #include diff --git a/examples/network/tcpserver.c b/examples/network/tcpserver.c index 0837495366..c019ec132f 100644 --- a/examples/network/tcpserver.c +++ b/examples/network/tcpserver.c @@ -12,11 +12,11 @@ #define DEBUG_TCP_SERVER -#define DBG_SECTION_NAME "TCP" +#define DBG_TAG "TCP" #ifdef DEBUG_TCP_SERVER -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO /* DBG_ERROR */ +#define DBG_LVL DBG_INFO /* DBG_ERROR */ #endif #include diff --git a/examples/network/udpclient.c b/examples/network/udpclient.c index d43b46a446..cd870cd758 100644 --- a/examples/network/udpclient.c +++ b/examples/network/udpclient.c @@ -5,11 +5,11 @@ #define DEBUG_UDP_CLIENT -#define DBG_SECTION_NAME "UDP" +#define DBG_TAG "UDP" #ifdef DEBUG_UDP_CLIENT -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO /* DBG_ERROR */ +#define DBG_LVL DBG_INFO /* DBG_ERROR */ #endif #include diff --git a/examples/network/udpserver.c b/examples/network/udpserver.c index 40dd754673..ed63363189 100644 --- a/examples/network/udpserver.c +++ b/examples/network/udpserver.c @@ -12,11 +12,11 @@ #define DEBUG_UDP_SERVER -#define DBG_SECTION_NAME "UDP" +#define DBG_TAG "UDP" #ifdef DEBUG_UDP_SERVER -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO /* DBG_ERROR */ +#define DBG_LVL DBG_INFO /* DBG_ERROR */ #endif #include diff --git a/src/signal.c b/src/signal.c index 2d68562535..06c2055d26 100644 --- a/src/signal.c +++ b/src/signal.c @@ -22,8 +22,8 @@ #define RT_SIG_INFO_MAX 32 #endif -#define DBG_SECTION_NAME "SIGN" -#define DBG_LEVEL DBG_INFO +#define DBG_TAG "SIGN" +#define DBG_LVL DBG_INFO #include #define sig_mask(sig_no) (1u << sig_no)