Mistake on this page?
Report an issue in GitHub or email us
Functions
MPU hal tests

The MPU test validates proper implementation of the MPU hal. More...

Functions

void mpu_init_test (void)
 Test that mbed_mpu_init can be called multiple times. More...
 
void mpu_free_test (void)
 Test that mbed_mpu_free disables the MPU. More...
 
void mpu_fault_test_data (void)
 Test that MPU protection works for global data. More...
 
void mpu_fault_test_bss (void)
 Test that MPU protection works for zero initialized data. More...
 
void mpu_fault_test_stack (void)
 Test that MPU protection works for the stack. More...
 
void mpu_fault_test_heap (void)
 Test that MPU protection works for the heap. More...
 

Detailed Description

The MPU test validates proper implementation of the MPU hal.

To run the MPU hal tests use the command:

mbed test -t <toolchain> -m <target> -n tests-mbed_hal-mpu*

Function Documentation

void mpu_fault_test_bss ( void  )

Test that MPU protection works for zero initialized data.

Given board provides MPU. When RAM execution is disabled with a call to mbed_mpu_enable_ram_xn. Then execution from global uninitialized data results in a fault.

void mpu_fault_test_data ( void  )

Test that MPU protection works for global data.

Given board provides MPU. When RAM execution is disabled with a call to mbed_mpu_enable_ram_xn. Then execution from global initialized data results in a fault.

void mpu_fault_test_heap ( void  )

Test that MPU protection works for the heap.

Given board provides MPU. When RAM execution is disabled with a call to mbed_mpu_enable_ram_xn. Then execution from heap memory results in a fault.

void mpu_fault_test_stack ( void  )

Test that MPU protection works for the stack.

Given board provides MPU. When RAM execution is disabled with a call to mbed_mpu_enable_ram_xn. Then execution from stack memory results in a fault.

void mpu_free_test ( void  )

Test that mbed_mpu_free disables the MPU.

Given board provides MPU. When mbed_mpu_free is called. Then execution from RAM is allowed.

void mpu_init_test ( void  )

Test that mbed_mpu_init can be called multiple times.

Given board provides MPU. When mbed_mpu_init is called multiple times. Then mbed_mpu_init are successfully performed (no exception is generated).

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.