]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/NXP_Code/utilities/fsl_debug_console_conf.h
Add ARMv8M demo project for NXP LPC55S69.
[freertos] / FreeRTOS / Demo / CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso / NXP_Code / utilities / fsl_debug_console_conf.h
diff --git a/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/NXP_Code/utilities/fsl_debug_console_conf.h b/FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/NXP_Code/utilities/fsl_debug_console_conf.h
new file mode 100644 (file)
index 0000000..fa6cdae
--- /dev/null
@@ -0,0 +1,141 @@
+/*\r
+ * Copyright 2017 - 2018 NXP\r
+ * All rights reserved.\r
+ *\r
+ *\r
+ * SPDX-License-Identifier: BSD-3-Clause\r
+ */\r
+#ifndef _FSL_DEBUG_CONSOLE_CONF_H_\r
+#define _FSL_DEBUG_CONSOLE_CONF_H_\r
+\r
+/****************Debug console configuration********************/\r
+\r
+/*! @brief If Non-blocking mode is needed, please define it at project setting,\r
+* otherwise blocking mode is the default transfer mode.\r
+* Warning: If you want to use non-blocking transfer,please make sure the corresponding\r
+* IO interrupt is enable, otherwise there is no output.\r
+* And non-blocking is combine with buffer, no matter bare-metal or rtos.\r
+*/\r
+#ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING\r
+/*! @brief define the transmit buffer length which is used to store the multi task log, buffer is enabled automatically\r
+* when\r
+* non-blocking transfer is using,\r
+* This value will affect the RAM's ultilization, should be set per paltform's capability and software requirement.\r
+* If it is configured too small, log maybe missed , because the log will not be\r
+* buffered if the buffer is full, and the print will return immediately with -1.\r
+* And this value should be multiple of 4 to meet memory alignment.\r
+*\r
+*/\r
+#ifndef DEBUG_CONSOLE_TRANSMIT_BUFFER_LEN\r
+#define DEBUG_CONSOLE_TRANSMIT_BUFFER_LEN (512U)\r
+#endif /* DEBUG_CONSOLE_TRANSMIT_BUFFER_LEN */\r
+\r
+/*! @brief define the receive buffer length which is used to store the user input, buffer is enabled automatically when\r
+* non-blocking transfer is using,\r
+* This value will affect the RAM's ultilization, should be set per paltform's capability and software requirement.\r
+* If it is configured too small, log maybe missed, because buffer will be overwrited if buffer is too small.\r
+* And this value should be multiple of 4 to meet memory alignment.\r
+*\r
+*/\r
+#ifndef DEBUG_CONSOLE_RECEIVE_BUFFER_LEN\r
+#define DEBUG_CONSOLE_RECEIVE_BUFFER_LEN (512U)\r
+#endif /* DEBUG_CONSOLE_RECEIVE_BUFFER_LEN */\r
+\r
+#else\r
+#define DEBUG_CONSOLE_TRANSFER_BLOCKING\r
+#endif /* DEBUG_CONSOLE_TRANSFER_NON_BLOCKING */\r
+\r
+/*!@ brief Whether enable the RX function\r
+* If the macro is zero, the receive function of the debug console is disabled.\r
+*/\r
+#ifndef DEBUG_CONSOLE_RX_ENABLE\r
+#define DEBUG_CONSOLE_RX_ENABLE (1U)\r
+#endif /* DEBUG_CONSOLE_RX_ENABLE */\r
+\r
+/*!@ brief define the MAX log length debug console support , that is when you call printf("log", x);, the log\r
+* length can not bigger than this value.\r
+* This macro decide the local log buffer length, the buffer locate at stack, the stack maybe overflow if\r
+* the buffer is too big and current task stack size not big enough.\r
+*/\r
+#ifndef DEBUG_CONSOLE_PRINTF_MAX_LOG_LEN\r
+#define DEBUG_CONSOLE_PRINTF_MAX_LOG_LEN (128U)\r
+#endif /* DEBUG_CONSOLE_PRINTF_MAX_LOG_LEN */\r
+\r
+/*!@ brief define the buffer support buffer scanf log length, that is when you call scanf("log", &x);, the log\r
+* length can not bigger than this value.\r
+* As same as the DEBUG_CONSOLE_BUFFER_PRINTF_MAX_LOG_LEN.\r
+*/\r
+#ifndef DEBUG_CONSOLE_SCANF_MAX_LOG_LEN\r
+#define DEBUG_CONSOLE_SCANF_MAX_LOG_LEN (20U)\r
+#endif /* DEBUG_CONSOLE_SCANF_MAX_LOG_LEN */\r
+\r
+/*! @brief Debug console synchronization\r
+* User should not change these macro for synchronization mode, but add the\r
+* corresponding synchronization mechanism per different software environment.\r
+* Such as, if another RTOS is used,\r
+* add:\r
+*  #define DEBUG_CONSOLE_SYNCHRONIZATION_XXXX 3\r
+* in this configuration file and implement the synchronization in fsl.log.c.\r
+*/\r
+/*! @brief synchronization for baremetal software */\r
+#define DEBUG_CONSOLE_SYNCHRONIZATION_BM 0\r
+/*! @brief synchronization for freertos software */\r
+#define DEBUG_CONSOLE_SYNCHRONIZATION_FREERTOS 1\r
+\r
+/*! @brief RTOS synchronization mechanism disable\r
+* If not defined, default is enable, to avoid multitask log print mess.\r
+* If other RTOS is used, you can implement the RTOS's specific synchronization mechanism in fsl.log.c\r
+* If synchronization is disabled, log maybe messed on terminal.\r
+*/\r
+#ifndef DEBUG_CONSOLE_DISABLE_RTOS_SYNCHRONIZATION\r
+#ifdef DEBUG_CONSOLE_TRANSFER_NON_BLOCKING\r
+#ifdef FSL_RTOS_FREE_RTOS\r
+#define DEBUG_CONSOLE_SYNCHRONIZATION_MODE DEBUG_CONSOLE_SYNCHRONIZATION_FREERTOS\r
+#else\r
+#define DEBUG_CONSOLE_SYNCHRONIZATION_MODE DEBUG_CONSOLE_SYNCHRONIZATION_BM\r
+#endif /* FSL_RTOS_FREE_RTOS */\r
+#else\r
+#define DEBUG_CONSOLE_SYNCHRONIZATION_MODE DEBUG_CONSOLE_SYNCHRONIZATION_BM\r
+#endif /* DEBUG_CONSOLE_TRANSFER_NON_BLOCKING */\r
+#endif /* DEBUG_CONSOLE_DISABLE_RTOS_SYNCHRONIZATION */\r
+\r
+/*! @brief echo function support\r
+* If you want to use the echo function,please define DEBUG_CONSOLE_ENABLE_ECHO\r
+* at your project setting.\r
+*/\r
+#ifndef DEBUG_CONSOLE_ENABLE_ECHO\r
+#define DEBUG_CONSOLE_ENABLE_ECHO_FUNCTION 0\r
+#else\r
+#define DEBUG_CONSOLE_ENABLE_ECHO_FUNCTION 1\r
+#endif /* DEBUG_CONSOLE_ENABLE_ECHO */\r
+\r
+/*********************************************************************/\r
+\r
+/***************Debug console other configuration*********************/\r
+/*! @brief Definition to printf the float number. */\r
+#ifndef PRINTF_FLOAT_ENABLE\r
+#define PRINTF_FLOAT_ENABLE 0U\r
+#endif /* PRINTF_FLOAT_ENABLE */\r
+\r
+/*! @brief Definition to scanf the float number. */\r
+#ifndef SCANF_FLOAT_ENABLE\r
+#define SCANF_FLOAT_ENABLE 0U\r
+#endif /* SCANF_FLOAT_ENABLE */\r
+\r
+/*! @brief Definition to support advanced format specifier for printf. */\r
+#ifndef PRINTF_ADVANCED_ENABLE\r
+#define PRINTF_ADVANCED_ENABLE 0U\r
+#endif /* PRINTF_ADVANCED_ENABLE */\r
+\r
+/*! @brief Definition to support advanced format specifier for scanf. */\r
+#ifndef SCANF_ADVANCED_ENABLE\r
+#define SCANF_ADVANCED_ENABLE 0U\r
+#endif /* SCANF_ADVANCED_ENABLE */\r
+\r
+/*! @brief Definition to select virtual com(USB CDC) as the debug console. */\r
+#ifndef BOARD_USE_VIRTUALCOM\r
+#define BOARD_USE_VIRTUALCOM 0U\r
+#endif\r
+/*******************************************************************/\r
+\r
+#endif /* _FSL_DEBUG_CONSOLE_CONF_H_ */\r