Skip to content

Commit

Permalink
Make changes required for MPU enhancements (FreeRTOS#1034)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kar-rahul-aws authored Jul 13, 2023
1 parent 301ed58 commit 5d94b20
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions FreeRTOS/Demo/CORTEX_MPU_M3_MPS2_QEMU_GCC/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ unsigned long ulGetRunTimeCounterValue( void ); /* Prototype of function that re
#define configMAC_INTERRUPT_PRIORITY 5

#define configENFORCE_SYSTEM_CALLS_FROM_KERNEL_ONLY ( 1 )
#define configUSE_MPU_WRAPPERS_V1 1

/* Prototype for the function used to print out. In this case it prints to the
| 10 console before the network is connected then a UDP port after the network has
Expand Down
9 changes: 9 additions & 0 deletions FreeRTOS/Test/CMock/config/portmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ typedef unsigned long UBaseType_t;
volatile int fool_static2 = 0; \
void vFunction( void * ( pvParameters ) )

/* We need to define it here because CMock does not recognize the
* #if ( portUSING_MPU_WRAPPERS == 1 ) guard around xTaskGetMPUSettings
* and then complains about the missing xMPU_SETTINGS type in the
* generated mocks. */
typedef struct MPU_SETTINGS
{
uint32_t ulDummy;
} xMPU_SETTINGS;

/*-----------------------------------------------------------*/

/* *INDENT-OFF* */
Expand Down

0 comments on commit 5d94b20

Please sign in to comment.