Select one of the symbols to view example projects that use it.
 
Outline
#define _ESP_CPU_UTILS_H
esp_cpu_process_stack_pc(uint32_t)
Files
loading...
SourceVuESP-IDF Framework and ExamplesESP-IDFcomponents/xtensa/include/esp_cpu_utils.h
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 *//* ... */ #ifndef _ESP_CPU_UTILS_H #define _ESP_CPU_UTILS_H #ifdef __cplusplus extern "C" { #endif /** * @brief Fetch the PC value of the previous instruction * * @param pc PC value of the current backtrace frame * *//* ... */ static inline uint32_t esp_cpu_process_stack_pc(uint32_t pc) { if (pc & 0x80000000) { //Top two bits of a0 (return address) specify window increment. Overwrite to map to address space. pc = (pc & 0x3fffffff) | 0x40000000; }{...} //Minus 3 to get PC of previous instruction (i.e. instruction executed before return address) return pc - 3; }{ ... } #ifdef __cplusplus }{...} #endif /* ... */ #endif // _ESP_CPU_UTILS_H
Details
Show:
from
Types: Columns:
This file uses the notable symbols shown below. Click anywhere in the file to view more details.