diff --git a/easy_embedded/app/cli/CMakeLists.txt b/easy_embedded/app/cli/CMakeLists.txt index fb99d52..3da1f7e 100644 --- a/easy_embedded/app/cli/CMakeLists.txt +++ b/easy_embedded/app/cli/CMakeLists.txt @@ -26,6 +26,8 @@ target_sources(ez_cli_lib target_compile_definitions(ez_cli_lib PUBLIC EZ_CLI_ENABLE=$ + PRIVATE + EZ_BUILD_WITH_CMAKE=$ ) diff --git a/easy_embedded/service/task_worker/threadx_port/ez_threadx_port.h b/easy_embedded/service/task_worker/threadx_port/ez_threadx_port.h index dd33869..b887e12 100644 --- a/easy_embedded/service/task_worker/threadx_port/ez_threadx_port.h +++ b/easy_embedded/service/task_worker/threadx_port/ez_threadx_port.h @@ -30,9 +30,8 @@ extern "C" { /***************************************************************************** * Includes *****************************************************************************/ -#include "ez_task_worker.h" - #if (EZ_THREADX_PORT_ENABLE == 1) +#include "ez_task_worker.h" /***************************************************************************** * Component Preprocessor Macros diff --git a/easy_embedded/utilities/hexdump/ez_hexdump.c b/easy_embedded/utilities/hexdump/ez_hexdump.c index 2aa316f..e8fdaa4 100755 --- a/easy_embedded/utilities/hexdump/ez_hexdump.c +++ b/easy_embedded/utilities/hexdump/ez_hexdump.c @@ -24,9 +24,9 @@ /****************************************************************************** * Includes *******************************************************************************/ -#if(EZ_HEXDUMP == 1U) - #include "ez_hexdump.h" + +#if(EZ_HEXDUMP == 1U) #include "ez_logging.h" #include "stdio.h" @@ -128,6 +128,5 @@ static void PrintAscii(char c) } } - -#endif /* CONFIG_HELPER_HEXDUMP */ +#endif /* (EZ_HEXDUMP == 1U) */ /* End of file*/ \ No newline at end of file diff --git a/easy_embedded/utilities/hexdump/ez_hexdump.h b/easy_embedded/utilities/hexdump/ez_hexdump.h index 95ac500..67effc4 100755 --- a/easy_embedded/utilities/hexdump/ez_hexdump.h +++ b/easy_embedded/utilities/hexdump/ez_hexdump.h @@ -30,6 +30,11 @@ extern "C" { /******************************************************************************* * Includes *******************************************************************************/ +#if (EZ_BUILD_WITH_CMAKE == 0U) +#include "ez_target_config.h" +#endif + +#if(EZ_HEXDUMP == 1U) #include "stdint.h" @@ -77,6 +82,8 @@ extern "C" { *****************************************************************************/ void ezHexdump(void *address, uint16_t size); +#endif /* CONFIG_HELPER_HEXDUMP */ + #ifdef __cplusplus } #endif diff --git a/easy_embedded/utilities/linked_list/ez_linked_list.c b/easy_embedded/utilities/linked_list/ez_linked_list.c index 39fb0ac..ff5610a 100755 --- a/easy_embedded/utilities/linked_list/ez_linked_list.c +++ b/easy_embedded/utilities/linked_list/ez_linked_list.c @@ -26,6 +26,8 @@ *****************************************************************************/ #include "ez_linked_list.h" +#if (EZ_LINKEDLIST == 1U) + /***************************************************************************** * Component Preprocessor Macros *****************************************************************************/ @@ -177,4 +179,5 @@ void ezmLL_ResetNode(Node * node) } #endif -/* End of file*/ \ No newline at end of file +#endif /* (EZ_LINKEDLIST == 1U) */ +/* End of file*/ diff --git a/easy_embedded/utilities/logging/ez_logging.h b/easy_embedded/utilities/logging/ez_logging.h index 30321a8..6a49723 100755 --- a/easy_embedded/utilities/logging/ez_logging.h +++ b/easy_embedded/utilities/logging/ez_logging.h @@ -34,8 +34,12 @@ extern "C" { /******************************************************************************* * Includes *******************************************************************************/ +#if (EZ_BUILD_WITH_CMAKE == 0U) +#include "ez_target_config.h" +#endif + #include -#include "../hexdump/ez_hexdump.h" +#include "ez_hexdump.h" /****************************************************************************** * Module Preprocessor Macros @@ -54,7 +58,7 @@ extern "C" { #define PRINT_FUNCTION_NAME 0U /**< logging shows function name */ /* Print data on stdout by default */ -#ifndef dbg_print(fmt, ...) +#ifndef dbg_print #define dbg_print(fmt, ...) printf(fmt, ##__VA_ARGS__) #endif