From 5e7d6f88b5478f246d5ad8d378667fc1cefe04dd Mon Sep 17 00:00:00 2001 From: Alfred Gedeon Date: Fri, 7 May 2021 17:17:56 -0700 Subject: [PATCH 1/5] Test: Mask unit test warning --- FreeRTOS/Test/CMock/event_groups/Makefile | 5 +++-- FreeRTOS/Test/CMock/testdir.mk | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/FreeRTOS/Test/CMock/event_groups/Makefile b/FreeRTOS/Test/CMock/event_groups/Makefile index d220ed760ca..55e690b55c1 100644 --- a/FreeRTOS/Test/CMock/event_groups/Makefile +++ b/FreeRTOS/Test/CMock/event_groups/Makefile @@ -32,10 +32,11 @@ MOCK_FILES_FP += $(PROJECT_DIR)/list_macros.h # List any addiitonal flags needed by the preprocessor -CPPFLAGS += -DportUSING_MPU_WRAPPERS=0 +CPPFLAGS += -DportUSING_MPU_WRAPPERS=0 # List any addiitonal flags needed by the compiler -CFLAGS += -include list_macros.h +CFLAGS += -include list_macros.h +CFLAGS += -Wno-incompatible-pointer-types # Try not to edit beyond this line unless necessary. diff --git a/FreeRTOS/Test/CMock/testdir.mk b/FreeRTOS/Test/CMock/testdir.mk index 5ebc8fdcbed..139cae80ab9 100644 --- a/FreeRTOS/Test/CMock/testdir.mk +++ b/FreeRTOS/Test/CMock/testdir.mk @@ -131,7 +131,7 @@ $(PROJ_DIR)/%.i : $(KERNEL_DIR)/%.c # compile the project objects with coverage instrumented $(PROJ_DIR)/%.o : $(PROJ_DIR)/%.i - $(CC) -c $< $(CPPFLAGS) $(INCLUDE_DIR) $(GCC_COV_OPTS) -o $@ + $(CC) -c $< $(CPPFLAGS) $(CFLAGS) $(INCLUDE_DIR) $(GCC_COV_OPTS) -o $@ # Build mock objects $(SCRATCH_DIR)/mock_%.o : $(MOCKS_DIR)/mock_%.c From aac1ab7172ca641bb912d140a1e689c07df9feb2 Mon Sep 17 00:00:00 2001 From: Alfred Gedeon Date: Thu, 13 May 2021 17:30:53 -0700 Subject: [PATCH 2/5] Fix Unit Test Bug --- .../Test/CMock/queue/generic/queue_create_dynamic_utest.c | 1 + .../Test/CMock/queue/generic/queue_delete_dynamic_utest.c | 1 + FreeRTOS/Test/CMock/queue/generic/queue_delete_static_utest.c | 1 + .../CMock/queue/generic/queue_receive_nonblocking_utest.c | 1 + FreeRTOS/Test/CMock/queue/generic/queue_reset_utest.c | 1 + .../Test/CMock/queue/generic/queue_send_nonblocking_utest.c | 1 + FreeRTOS/Test/CMock/queue/generic/queue_status_utest.c | 1 + FreeRTOS/Test/CMock/queue/queue_utest_common.h | 2 +- FreeRTOS/Test/CMock/queue/semaphore/mutex_utest.c | 1 + FreeRTOS/Test/CMock/queue/semaphore/recursive_mutex_utest.c | 1 + FreeRTOS/Test/CMock/queue/semaphore/semaphore_common_utest.c | 1 + FreeRTOS/Test/CMock/queue/tracing/queue_registry_utest.c | 4 +++- FreeRTOS/Test/CMock/testdir.mk | 2 +- 13 files changed, 15 insertions(+), 3 deletions(-) diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_create_dynamic_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_create_dynamic_utest.c index e6cd54f011e..84e3c06aeda 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_create_dynamic_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_create_dynamic_utest.c @@ -38,6 +38,7 @@ #include "queue.h" /* ============================ GLOBAL VARIABLES =========================== */ +extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_delete_dynamic_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_delete_dynamic_utest.c index 3b40d91fcb1..c78e1dee481 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_delete_dynamic_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_delete_dynamic_utest.c @@ -40,6 +40,7 @@ #include "mock_fake_port.h" /* ============================ GLOBAL VARIABLES =========================== */ +extern bool xMaskAssertAndAbort; /* =========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_delete_static_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_delete_static_utest.c index d87dc0189eb..550e2379845 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_delete_static_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_delete_static_utest.c @@ -40,6 +40,7 @@ #include "mock_fake_port.h" /* ============================ GLOBAL VARIABLES =========================== */ +extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_receive_nonblocking_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_receive_nonblocking_utest.c index 5dcff09c945..5fb812cbf2f 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_receive_nonblocking_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_receive_nonblocking_utest.c @@ -41,6 +41,7 @@ /* ============================ GLOBAL VARIABLES =========================== */ +extern bool xMaskAssertAndAbort; /* Used to share a QueueHandle_t between a test case and it's callbacks */ static QueueHandle_t xQueueHandleStatic = NULL; static BaseType_t xStubExpectedReturnValue = pdFALSE; diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_reset_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_reset_utest.c index 397bb87aa17..df14261f1ea 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_reset_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_reset_utest.c @@ -40,6 +40,7 @@ #include "mock_fake_port.h" /* ============================ GLOBAL VARIABLES =========================== */ +extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_send_nonblocking_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_send_nonblocking_utest.c index 5b33affde44..e4fe3d4c16d 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_send_nonblocking_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_send_nonblocking_utest.c @@ -41,6 +41,7 @@ /* =============================== CONSTANTS =============================== */ /* ============================ GLOBAL VARIABLES =========================== */ +extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_status_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_status_utest.c index f4dd98d3a09..3e5a425430c 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_status_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_status_utest.c @@ -38,6 +38,7 @@ #include "queue.h" /* ============================ GLOBAL VARIABLES =========================== */ +extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/queue_utest_common.h b/FreeRTOS/Test/CMock/queue/queue_utest_common.h index 511879e605e..4a9ce4d9e6e 100644 --- a/FreeRTOS/Test/CMock/queue/queue_utest_common.h +++ b/FreeRTOS/Test/CMock/queue/queue_utest_common.h @@ -69,7 +69,7 @@ #define NUM_CALLS_TO_INTERCEPT TICKS_TO_WAIT / 2 /* ============================ GLOBAL VARIABLES =========================== */ -bool xMaskAssertAndAbort; +//bool xMaskAssertAndAbort; /* ================================= MACROS ================================ */ diff --git a/FreeRTOS/Test/CMock/queue/semaphore/mutex_utest.c b/FreeRTOS/Test/CMock/queue/semaphore/mutex_utest.c index b62be0396ba..77d5eb3d7ff 100644 --- a/FreeRTOS/Test/CMock/queue/semaphore/mutex_utest.c +++ b/FreeRTOS/Test/CMock/queue/semaphore/mutex_utest.c @@ -35,6 +35,7 @@ /* ============================ GLOBAL VARIABLES =========================== */ static SemaphoreHandle_t xSemaphoreHandleStatic = NULL; +extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/semaphore/recursive_mutex_utest.c b/FreeRTOS/Test/CMock/queue/semaphore/recursive_mutex_utest.c index b3c0438f5ac..ffc109535d5 100644 --- a/FreeRTOS/Test/CMock/queue/semaphore/recursive_mutex_utest.c +++ b/FreeRTOS/Test/CMock/queue/semaphore/recursive_mutex_utest.c @@ -34,6 +34,7 @@ #include "mock_fake_port.h" /* ============================ GLOBAL VARIABLES =========================== */ +extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/semaphore/semaphore_common_utest.c b/FreeRTOS/Test/CMock/queue/semaphore/semaphore_common_utest.c index c4f69a06e5b..bb91a9748aa 100644 --- a/FreeRTOS/Test/CMock/queue/semaphore/semaphore_common_utest.c +++ b/FreeRTOS/Test/CMock/queue/semaphore/semaphore_common_utest.c @@ -34,6 +34,7 @@ /* ============================ GLOBAL VARIABLES =========================== */ +extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/tracing/queue_registry_utest.c b/FreeRTOS/Test/CMock/queue/tracing/queue_registry_utest.c index daed68ca814..c47cc62ef0b 100644 --- a/FreeRTOS/Test/CMock/queue/tracing/queue_registry_utest.c +++ b/FreeRTOS/Test/CMock/queue/tracing/queue_registry_utest.c @@ -53,6 +53,8 @@ typedef xQueueRegistryItem QueueRegistryItem_t; /* Access the xQueueRegistry to clear between test cases */ extern PRIVILEGED_DATA QueueRegistryItem_t xQueueRegistry[ configQUEUE_REGISTRY_SIZE ]; +extern bool xMaskAssertAndAbort; + /* ========================== CALLBACK FUNCTIONS =========================== */ /* ============================= Unity Fixtures ============================= */ @@ -175,7 +177,7 @@ void test_vQueueAddToRegistry_twice( void ) const char * pcFakeString1 = ( char * ) ( BaseType_t ) getNextMonotonicTestValue(); const char * pcFakeString2 = ( char * ) ( BaseType_t ) getNextMonotonicTestValue(); - /* Add an item to the registry **/ + /* Add an item to the registry */ vQueueAddToRegistry( xFakeHandle, pcFakeString1 ); TEST_ASSERT_TRUE( helper_find_in_queue_registry( xFakeHandle, pcFakeString1 ) ); diff --git a/FreeRTOS/Test/CMock/testdir.mk b/FreeRTOS/Test/CMock/testdir.mk index 139cae80ab9..5ebc8fdcbed 100644 --- a/FreeRTOS/Test/CMock/testdir.mk +++ b/FreeRTOS/Test/CMock/testdir.mk @@ -131,7 +131,7 @@ $(PROJ_DIR)/%.i : $(KERNEL_DIR)/%.c # compile the project objects with coverage instrumented $(PROJ_DIR)/%.o : $(PROJ_DIR)/%.i - $(CC) -c $< $(CPPFLAGS) $(CFLAGS) $(INCLUDE_DIR) $(GCC_COV_OPTS) -o $@ + $(CC) -c $< $(CPPFLAGS) $(INCLUDE_DIR) $(GCC_COV_OPTS) -o $@ # Build mock objects $(SCRATCH_DIR)/mock_%.o : $(MOCKS_DIR)/mock_%.c From df0cde375f96d7d9ece7fade5168d3c7ae39421c Mon Sep 17 00:00:00 2001 From: Alfred Gedeon Date: Wed, 26 May 2021 17:42:18 -0700 Subject: [PATCH 3/5] Unit Test: Add setters and getters for xMaskAssertAndAbort --- .../CMock/queue/generic/queue_create_dynamic_utest.c | 1 - .../CMock/queue/generic/queue_delete_dynamic_utest.c | 1 - .../CMock/queue/generic/queue_delete_static_utest.c | 1 - .../queue/generic/queue_receive_nonblocking_utest.c | 1 - FreeRTOS/Test/CMock/queue/generic/queue_reset_utest.c | 1 - .../queue/generic/queue_send_nonblocking_utest.c | 1 - .../Test/CMock/queue/generic/queue_status_utest.c | 1 - FreeRTOS/Test/CMock/queue/queue_utest_common.c | 11 ++++++++++- FreeRTOS/Test/CMock/queue/queue_utest_common.h | 6 ++++-- FreeRTOS/Test/CMock/queue/semaphore/mutex_utest.c | 1 - .../CMock/queue/semaphore/recursive_mutex_utest.c | 1 - .../CMock/queue/semaphore/semaphore_common_utest.c | 1 - .../Test/CMock/queue/tracing/queue_registry_utest.c | 2 -- 13 files changed, 14 insertions(+), 15 deletions(-) diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_create_dynamic_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_create_dynamic_utest.c index 84e3c06aeda..e6cd54f011e 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_create_dynamic_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_create_dynamic_utest.c @@ -38,7 +38,6 @@ #include "queue.h" /* ============================ GLOBAL VARIABLES =========================== */ -extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_delete_dynamic_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_delete_dynamic_utest.c index c78e1dee481..3b40d91fcb1 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_delete_dynamic_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_delete_dynamic_utest.c @@ -40,7 +40,6 @@ #include "mock_fake_port.h" /* ============================ GLOBAL VARIABLES =========================== */ -extern bool xMaskAssertAndAbort; /* =========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_delete_static_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_delete_static_utest.c index d803048c584..c6612314647 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_delete_static_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_delete_static_utest.c @@ -40,7 +40,6 @@ #include "mock_fake_port.h" /* ============================ GLOBAL VARIABLES =========================== */ -extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_receive_nonblocking_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_receive_nonblocking_utest.c index 7ad8192538d..94bc7b5db47 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_receive_nonblocking_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_receive_nonblocking_utest.c @@ -41,7 +41,6 @@ /* ============================ GLOBAL VARIABLES =========================== */ -extern bool xMaskAssertAndAbort; /* Used to share a QueueHandle_t between a test case and it's callbacks */ static QueueHandle_t xQueueHandleStatic = NULL; static BaseType_t xStubExpectedReturnValue = pdFALSE; diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_reset_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_reset_utest.c index df14261f1ea..397bb87aa17 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_reset_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_reset_utest.c @@ -40,7 +40,6 @@ #include "mock_fake_port.h" /* ============================ GLOBAL VARIABLES =========================== */ -extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_send_nonblocking_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_send_nonblocking_utest.c index 9b878c8f45f..0a694201bbe 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_send_nonblocking_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_send_nonblocking_utest.c @@ -41,7 +41,6 @@ /* =============================== CONSTANTS =============================== */ /* ============================ GLOBAL VARIABLES =========================== */ -extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/generic/queue_status_utest.c b/FreeRTOS/Test/CMock/queue/generic/queue_status_utest.c index 3e5a425430c..f4dd98d3a09 100644 --- a/FreeRTOS/Test/CMock/queue/generic/queue_status_utest.c +++ b/FreeRTOS/Test/CMock/queue/generic/queue_status_utest.c @@ -38,7 +38,6 @@ #include "queue.h" /* ============================ GLOBAL VARIABLES =========================== */ -extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/queue_utest_common.c b/FreeRTOS/Test/CMock/queue/queue_utest_common.c index e6a1371d749..eed1b000b25 100644 --- a/FreeRTOS/Test/CMock/queue/queue_utest_common.c +++ b/FreeRTOS/Test/CMock/queue/queue_utest_common.c @@ -54,7 +54,16 @@ static size_t uxLastMallocSize = 0; static void * pLastFreedAddress = 0; static uint32_t ulNumMallocCalls = 0; -/* ========================== CALLBACK FUNCTIONS =========================== */ +/* =========================== HELPER FUNCTIONS =========================== */ +void setxMaskAssertAndAbort( bool mask ) +{ + xMaskAssertAndAbort = mask; +} +bool getxMaskAssertAndAbort( ) +{ + return xMaskAssertAndAbort; +} +/* ========================== CALLBACK FUNCTIONS ========================== */ void * pvPortMalloc( size_t xSize ) { diff --git a/FreeRTOS/Test/CMock/queue/queue_utest_common.h b/FreeRTOS/Test/CMock/queue/queue_utest_common.h index 508cada9cb4..bca0e16b71a 100644 --- a/FreeRTOS/Test/CMock/queue/queue_utest_common.h +++ b/FreeRTOS/Test/CMock/queue/queue_utest_common.h @@ -68,8 +68,10 @@ #define TICKS_TO_WAIT 10 #define NUM_CALLS_TO_INTERCEPT TICKS_TO_WAIT / 2 +/* =========================== FUNCTION PROTOTYPES ======================== */ +void setxMaskAssertAndAbort( bool mask ); +bool getxMaskAssertAndAbort( ); /* ============================ GLOBAL VARIABLES =========================== */ -//bool xMaskAssertAndAbort; /* ================================= MACROS ================================ */ @@ -82,7 +84,7 @@ #define EXPECT_ASSERT_BREAK( call ) \ do \ { \ - xMaskAssertAndAbort = true; \ + setxMaskAssertAndAbort( true ); \ CEXCEPTION_T e = CEXCEPTION_NONE; \ Try \ { \ diff --git a/FreeRTOS/Test/CMock/queue/semaphore/mutex_utest.c b/FreeRTOS/Test/CMock/queue/semaphore/mutex_utest.c index e88a3a30995..fa411ea33ee 100644 --- a/FreeRTOS/Test/CMock/queue/semaphore/mutex_utest.c +++ b/FreeRTOS/Test/CMock/queue/semaphore/mutex_utest.c @@ -35,7 +35,6 @@ /* ============================ GLOBAL VARIABLES =========================== */ static SemaphoreHandle_t xSemaphoreHandleStatic = NULL; -extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/semaphore/recursive_mutex_utest.c b/FreeRTOS/Test/CMock/queue/semaphore/recursive_mutex_utest.c index ffc109535d5..b3c0438f5ac 100644 --- a/FreeRTOS/Test/CMock/queue/semaphore/recursive_mutex_utest.c +++ b/FreeRTOS/Test/CMock/queue/semaphore/recursive_mutex_utest.c @@ -34,7 +34,6 @@ #include "mock_fake_port.h" /* ============================ GLOBAL VARIABLES =========================== */ -extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/semaphore/semaphore_common_utest.c b/FreeRTOS/Test/CMock/queue/semaphore/semaphore_common_utest.c index bb91a9748aa..c4f69a06e5b 100644 --- a/FreeRTOS/Test/CMock/queue/semaphore/semaphore_common_utest.c +++ b/FreeRTOS/Test/CMock/queue/semaphore/semaphore_common_utest.c @@ -34,7 +34,6 @@ /* ============================ GLOBAL VARIABLES =========================== */ -extern bool xMaskAssertAndAbort; /* ========================== CALLBACK FUNCTIONS =========================== */ diff --git a/FreeRTOS/Test/CMock/queue/tracing/queue_registry_utest.c b/FreeRTOS/Test/CMock/queue/tracing/queue_registry_utest.c index 901dbff6810..8569e5b98d3 100644 --- a/FreeRTOS/Test/CMock/queue/tracing/queue_registry_utest.c +++ b/FreeRTOS/Test/CMock/queue/tracing/queue_registry_utest.c @@ -53,8 +53,6 @@ typedef xQueueRegistryItem QueueRegistryItem_t; /* Access the xQueueRegistry to clear between test cases */ extern PRIVILEGED_DATA QueueRegistryItem_t xQueueRegistry[ configQUEUE_REGISTRY_SIZE ]; -extern bool xMaskAssertAndAbort; - /* ========================== CALLBACK FUNCTIONS =========================== */ /* ============================= Unity Fixtures ============================= */ From 228c650148bf6c3f3d1636f247889e52d858c0c1 Mon Sep 17 00:00:00 2001 From: Alfred Gedeon Date: Wed, 26 May 2021 19:05:07 -0700 Subject: [PATCH 4/5] Fix Warning --- FreeRTOS/Test/CMock/testdir.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FreeRTOS/Test/CMock/testdir.mk b/FreeRTOS/Test/CMock/testdir.mk index 5ebc8fdcbed..139cae80ab9 100644 --- a/FreeRTOS/Test/CMock/testdir.mk +++ b/FreeRTOS/Test/CMock/testdir.mk @@ -131,7 +131,7 @@ $(PROJ_DIR)/%.i : $(KERNEL_DIR)/%.c # compile the project objects with coverage instrumented $(PROJ_DIR)/%.o : $(PROJ_DIR)/%.i - $(CC) -c $< $(CPPFLAGS) $(INCLUDE_DIR) $(GCC_COV_OPTS) -o $@ + $(CC) -c $< $(CPPFLAGS) $(CFLAGS) $(INCLUDE_DIR) $(GCC_COV_OPTS) -o $@ # Build mock objects $(SCRATCH_DIR)/mock_%.o : $(MOCKS_DIR)/mock_%.c From 3badb29a47eac3e48f18aeba7664b45b016e517b Mon Sep 17 00:00:00 2001 From: alfred gedeon <28123637+alfred2g@users.noreply.github.com> Date: Thu, 27 May 2021 15:14:09 -0700 Subject: [PATCH 5/5] Update Makefile --- FreeRTOS/Test/CMock/event_groups/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FreeRTOS/Test/CMock/event_groups/Makefile b/FreeRTOS/Test/CMock/event_groups/Makefile index 55e690b55c1..da0c1886dd7 100644 --- a/FreeRTOS/Test/CMock/event_groups/Makefile +++ b/FreeRTOS/Test/CMock/event_groups/Makefile @@ -32,7 +32,7 @@ MOCK_FILES_FP += $(PROJECT_DIR)/list_macros.h # List any addiitonal flags needed by the preprocessor -CPPFLAGS += -DportUSING_MPU_WRAPPERS=0 +CPPFLAGS += -DportUSING_MPU_WRAPPERS=0 # List any addiitonal flags needed by the compiler CFLAGS += -include list_macros.h