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... | |
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*
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).