Skip to content

theamirocohen/mbed-os-example-uvisor-debug-fault

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debug box with uVisor example

This is a simple example to show how to use uVisor APIs to build a box that implements debug box functionality.

  • Create and run secure boxes.
  • Try accessing a not allowed address and enter debug box

Supported devices:

Target Toolchain Baud rate
K64F GCC_ARM 9600
DISCO_F429ZI GCC_ARM 9600
EFM32GG_STK3700 GCC_ARM 9600

Latest release: mbed-os-5.5.x. Tested with mbed-cli v1.2.0.

Quickstart

For a release build, please enter:

$ mbed compile -m K64F -t GCC_ARM -c

You will find the resulting binary in BUILD/K64F/GCC_ARM/mbed-os-example-uvisor-debug-fault.bin. You can drag and drop it onto your board USB drive.

$ screen /dev/tty.usbmodem1422 9600

You will see an output similar to the following one:

***** uVisor debug box example *****
Failed with an error code: 0x00000001

Exception stack frame:
SP[07]: 0x21000000 | xPSR
SP[06]: 0x00008f70 | PC
SP[05]: 0x00008f6b | LR
SP[04]: 0x0000672d | R12
SP[03]: 0xffffffff | R3
SP[02]: 0x0000000d | R2
SP[01]: 0x00000000 | R1
SP[00]: 0x1fff06c2 | R0

Registers after fault:
LR:      0xfffffffd
IPSR:    0x00000005
CONTROL: 0x00000001

Fault registers:
CFSR:  0x00000400
HFSR:  0x00000000
DFSR:  0x00000008
AFSR:  0x00000000
MMFAR: Invalid
BFAR:  Invalid

Debug

When a debugger is connected, you can observe debug output from uVisor. Please note that these messages are sent through semihosting, which halts the program execution if a debugger is not connected. For more information please read the Debugging uVisor on mbed OS guide. To build a debug version of this example, please enter:

$ mbed compile -m K64F -t GCC_ARM --profile mbed-os/tools/profiles/debug.json -c

Known issues

  • Use of exporters for multiple IDEs is not supported at the moment.

About

uVisor example with a debug box - demonstrate handling faults during boot sequence

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 57.1%
  • C++ 42.9%