Skip to content

Commit 5d94b20

Browse files
Make changes required for MPU enhancements (FreeRTOS#1034)
1. Add macro configUSE_MPU_WRAPPERS_V1 to allow Demo compatibility with the old mpu wrapper . 2. Add Dummy xMPU_SETTINGS in portmacro.h file for Unit Tests . Signed-off-by: kar-rahul-aws <karahulx@amazon.com>
1 parent 301ed58 commit 5d94b20

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

FreeRTOS/Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC/FreeRTOSConfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ unsigned long ulGetRunTimeCounterValue( void ); /* Prototype of function that re
112112
#define configMAC_INTERRUPT_PRIORITY 5
113113

114114
#define configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY ( 1 )
115+
#define configUSE_MPU_WRAPPERS_V1 1
115116

116117
/* Prototype for the function used to print out. In this case it prints to the
117118
| 10 console before the network is connected then a UDP port after the network has

FreeRTOS/Test/CMock/config/portmacro.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,15 @@ typedef unsigned long UBaseType_t;
164164
volatile int fool_static2 = 0; \
165165
void vFunction( void * ( pvParameters ) )
166166

167+
/* We need to define it here because CMock does not recognize the
168+
* #if ( portUSING_MPU_WRAPPERS == 1 ) guard around xTaskGetMPUSettings
169+
* and then complains about the missing xMPU_SETTINGS type in the
170+
* generated mocks. */
171+
typedef struct MPU_SETTINGS
172+
{
173+
uint32_t ulDummy;
174+
} xMPU_SETTINGS;
175+
167176
/*-----------------------------------------------------------*/
168177

169178
/* *INDENT-OFF* */

0 commit comments

Comments
 (0)