HARMcksL: ARM HAL toolbox (yet STM32 oriented) 1.6
SMFSW collection of HAL hacks for STM32
Loading...
Searching...
No Matches
stack_utils.h File Reference

Stack utilities. More...

#include "sarmfsw.h"
Include dependency graph for stack_utils.h:
This graph shows which files directly or indirectly include this file:

Functions

uint32_t get_MSP (void)
 Get Main Stack Pointer value.
 
uint32_t get_SP (void)
 Get Current Stack Pointer value.
 
uint32_t * get_pSP (void)
 Get pointer to the current stack.
 
uint32_t * get_pMSP (void)
 Get pointer to the main stack.
 
uint32_t get_R0 (void)
 Get content of R0 register.
 
uint32_t get_R1 (void)
 Get content of R1 register.
 
uint32_t get_R2 (void)
 Get content of R2 register.
 
uint32_t get_R3 (void)
 Get content of R3 register.
 
uint32_t get_R4 (void)
 Get content of R4 register.
 
uint32_t get_R5 (void)
 Get content of R5 register.
 
uint32_t get_R6 (void)
 Get content of R6 register.
 
uint32_t get_R7 (void)
 Get content of R7 register.
 
uint32_t get_R8 (void)
 Get content of R8 register.
 
uint32_t get_R9 (void)
 Get content of R9 register.
 
uint32_t get_R10 (void)
 Get content of R10 register.
 
uint32_t get_R11 (void)
 Get content of R11 register.
 
uint32_t get_R12 (void)
 Get content of R12 register.
 
uint32_t get_LR (void)
 Get content of link register.
 
uint32_t get_PSR (void)
 Get content of xPSR.
 
void print_stack_address (void)
 Prints main stack address.
 
void print_global_regs (void)
 Print contents of ARM registers.
 
void stack_dump (void)
 prints contents of global registers & stack address
 

Detailed Description

Stack utilities.

Author
SMFSW

Function Documentation

◆ get_LR()

uint32_t get_LR ( void )
inline

Get content of link register.

Returns
Link register value

◆ get_MSP()

uint32_t get_MSP ( void )
inline

Get Main Stack Pointer value.

Returns
Main Stack Pointer value
Here is the caller graph for this function:

◆ get_pMSP()

uint32_t * get_pMSP ( void )
inline

Get pointer to the main stack.

Returns
Main stack pointer
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_pSP()

uint32_t * get_pSP ( void )
inline

Get pointer to the current stack.

Returns
Current stack pointer
Here is the call graph for this function:

◆ get_PSR()

uint32_t get_PSR ( void )
inline

Get content of xPSR.

Returns
Current program status register value

◆ get_R0()

uint32_t get_R0 ( void )
inline

Get content of R0 register.

Returns
R0 register value
Here is the caller graph for this function:

◆ get_R1()

uint32_t get_R1 ( void )
inline

Get content of R1 register.

Returns
R1 register value
Here is the caller graph for this function:

◆ get_R10()

uint32_t get_R10 ( void )
inline

Get content of R10 register.

Returns
R10 register value
Here is the caller graph for this function:

◆ get_R11()

uint32_t get_R11 ( void )
inline

Get content of R11 register.

Returns
R11 register value
Here is the caller graph for this function:

◆ get_R12()

uint32_t get_R12 ( void )
inline

Get content of R12 register.

Returns
R12 register value
Here is the caller graph for this function:

◆ get_R2()

uint32_t get_R2 ( void )
inline

Get content of R2 register.

Returns
R2 register value
Here is the caller graph for this function:

◆ get_R3()

uint32_t get_R3 ( void )
inline

Get content of R3 register.

Returns
R3 register value
Here is the caller graph for this function:

◆ get_R4()

uint32_t get_R4 ( void )
inline

Get content of R4 register.

Returns
R4 register value
Here is the caller graph for this function:

◆ get_R5()

uint32_t get_R5 ( void )
inline

Get content of R5 register.

Returns
R5 register value
Here is the caller graph for this function:

◆ get_R6()

uint32_t get_R6 ( void )
inline

Get content of R6 register.

Returns
R6 register value
Here is the caller graph for this function:

◆ get_R7()

uint32_t get_R7 ( void )
inline

Get content of R7 register.

Returns
R7 register value
Here is the caller graph for this function:

◆ get_R8()

uint32_t get_R8 ( void )
inline

Get content of R8 register.

Returns
R8 register value
Here is the caller graph for this function:

◆ get_R9()

uint32_t get_R9 ( void )
inline

Get content of R9 register.

Returns
R9 register value
Here is the caller graph for this function:

◆ get_SP()

uint32_t get_SP ( void )
inline

Get Current Stack Pointer value.

Returns
Current Stack Pointer value
Here is the caller graph for this function:

◆ print_global_regs()

void print_global_regs ( void )

Print contents of ARM registers.

Note
This function is for debug purposes while running only
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_stack_address()

void print_stack_address ( void )

Prints main stack address.

Note
This function is for debug purposes while running only
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stack_dump()

void stack_dump ( void )
inline

prints contents of global registers & stack address

Here is the call graph for this function: