Understanding Access-Levels in ARM Cortex-M
This repository contains code to demonstrate access levels (Privileged and Unprivileged) in ARM Cortex-M processor core. The code is written in ARM Assembly for STM32F4 using the STM32F4-Discovery board.
For detailed explanation of the code, refer blog post - https://iotality.com/armcm-access-levels/
This README contains instructions to build and download the code to STM32F4 discovery board.
Prerequisites and Steps
Most of the steps for executing this code are same as the steps mentioned in README file for the SVC Demo project. Hence these steps are not repeated here. Here is an overview of the steps to execute this code.
- Clone this repository and open the project in Keil uVision IDE.
- Build and download the code without any change.
- Start debugging the code via Keil uVision IDE.
- Single step through the code follow along the blog post referred above. Watch the registers as you execute the code.
- After the proessor leads to a hard fault, stop debugging.
- Now build the code with USE_SVC variable to TRUE and repeat debugging step by step.
- This time the processor should not go to hard fault but instead the SysTick timer will be running blinking the green user LED on the Discovery Board at 500 msec interval.
For more details, refer the video below and read the blog post.