1Title: Test to verify the behavior of HardFault (ARM Only) 2 3Description: 4 5This test verifies the Cortex-M HardFault escalation. Only for 6ARM Cortex-M targets. 7 8--------------------------------------------------------------------------- 9 10Building and Running Project: 11 12This project outputs to the console. It can be built and executed on QEMU as 13follows: 14 15 make run 16 17--------------------------------------------------------------------------- 18 19Troubleshooting: 20 21Problems caused by out-dated project information can be addressed by 22issuing one of the following commands then rebuilding the project: 23 24 make clean # discard results of previous builds 25 # but keep existing configuration info 26or 27 make pristine # discard results of previous builds 28 # and restore pre-defined configuration info 29 30--------------------------------------------------------------------------- 31 32Sample Output: 33 34*** Booting Zephyr OS build zephyr-v2.6.0-482-g9daa69b212cd *** 35Running test suite arm_hardfault_validation 36=================================================================== 37START - test_arm_hardfault 38E: r0/a1: 0x00000004 r1/a2: 0x00000000 r2/a3: 0x00000004 39E: r3/a4: 0x20000000 r12/ip: 0x00000000 r14/lr: 0x000029fb 40E: xpsr: 0x41000000 41E: Faulting instruction address (r15/pc): 0x0000079e 42E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0 43E: Current thread: 0x20000070 (test_arm_hardfault) 44Caught system error -- reason 4 45ASSERTION FAIL [0] @ ../src/arm_hardfault.c:42 46 Assert occurring inside kernel panic 47E: ***** HARD FAULT ***** 48E: Fault escalation (see below) 49E: ARCH_EXCEPT with reason 4 50 51E: r0/a1: 0x00000004 r1/a2: 0x0000002a r2/a3: 0x00000001 52E: r3/a4: 0x000016f9 r12/ip: 0xa0000000 r14/lr: 0x0000075f 53E: xpsr: 0x4100000b 54E: Faulting instruction address (r15/pc): 0x00005d1e 55E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0 56E: Fault during interrupt handling 57 58E: Current thread: 0x20000070 (test_arm_hardfault) 59Caught system error -- reason 4 60 PASS - test_arm_hardfault in 0.79 seconds 61=================================================================== 62Test suite arm_hardfault_validation succeeded 63=================================================================== 64PROJECT EXECUTION SUCCESSFUL 65