]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso/NXP_Code/utilities/fsl_debug_console_conf.h
commit 9f316c246baafa15c542a5aea81a94f26e3d6507
[freertos] / FreeRTOS / Demo / CORTEX_MPU_M33F_NXP_LPC55S69_MCUXpresso / NXP_Code / utilities / fsl_debug_console_conf.h
index fa6cdae824b08f761dc553f4ce94be67dbc4538d..4c36a7dd85812ffc330f9cbdb0326d542d3480ec 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * Copyright 2017 - 2018 NXP\r
+ * Copyright 2017 - 2019 NXP\r
  * All rights reserved.\r
  *\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
+ * 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
+ * Below shows how to configure in your project if you want to use non-blocking mode.\r
+ * For IAR, right click project and select "Options", define it in "C/C++ Compiler->Preprocessor->Defined symbols".\r
+ * For KEIL, click "Options for Target…", define it in "C/C++->Preprocessor Symbols->Define".\r
+ * For ARMGCC, open CmakeLists.txt and add the following lines,\r
+ * "SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING")" for debug target.\r
+ * "SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DDEBUG_CONSOLE_TRANSFER_NON_BLOCKING")" for release target.\r
+ * For MCUxpresso, right click project and select "Properties", define it in "C/C++ Build->Settings->MCU C\r
+ * Complier->Preprocessor".\r
+ *\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
+ * 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
+ * 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
+#define DEBUG_CONSOLE_RECEIVE_BUFFER_LEN (1024U)\r
 #endif /* DEBUG_CONSOLE_RECEIVE_BUFFER_LEN */\r
 \r
+/*!@ brief Whether enable the reliable TX function\r
+ * If the macro is zero, the reliable TX function of the debug console is disabled.\r
+ * When the macro is zero, the string of PRINTF will be thrown away after the transmit buffer is full.\r
+ */\r
+#ifndef DEBUG_CONSOLE_TX_RELIABLE_ENABLE\r
+#define DEBUG_CONSOLE_TX_RELIABLE_ENABLE (1U)\r
+#endif /* DEBUG_CONSOLE_RX_ENABLE */\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
+ * 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
+ * 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
+ * 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
+ * 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
+ * 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
 #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
+ * 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