mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-02 02:10:19 +08:00
fix(esp8266): fix backtrace does not trace ROM code
This commit is contained in:
@ -208,9 +208,13 @@
|
|||||||
#define RTC_USER_BASE (0x60001200)
|
#define RTC_USER_BASE (0x60001200)
|
||||||
#define RTC_USER_SIZE (0x200)
|
#define RTC_USER_SIZE (0x200)
|
||||||
|
|
||||||
|
#define ROM_BASE (0x40000000)
|
||||||
|
#define ROM_SIZE (0x10000)
|
||||||
|
|
||||||
#define IS_DRAM(a) ((size_t)(a) >= DRAM_BASE && (size_t)(a) < (DRAM_BASE + DRAM_SIZE))
|
#define IS_DRAM(a) ((size_t)(a) >= DRAM_BASE && (size_t)(a) < (DRAM_BASE + DRAM_SIZE))
|
||||||
#define IS_IRAM(a) ((size_t)(a) >= IRAM_BASE && (size_t)(a) < (IRAM_BASE + IRAM_SIZE))
|
#define IS_IRAM(a) ((size_t)(a) >= IRAM_BASE && (size_t)(a) < (IRAM_BASE + IRAM_SIZE))
|
||||||
#define IS_FLASH(a) ((size_t)(a) >= FLASH_BASE && (size_t)(a) < (FLASH_BASE + FLASH_SIZE))
|
#define IS_FLASH(a) ((size_t)(a) >= FLASH_BASE && (size_t)(a) < (FLASH_BASE + FLASH_SIZE))
|
||||||
#define IS_USR_RTC(a) ((size_t)(a) >= RTC_USER_BASE && (size_t)(a) < (RTC_USER_BASE + RTC_USER_SIZE))
|
#define IS_USR_RTC(a) ((size_t)(a) >= RTC_USER_BASE && (size_t)(a) < (RTC_USER_BASE + RTC_USER_SIZE))
|
||||||
|
#define IS_ROM(a) ((size_t)(a) >= ROM_BASE && (size_t)(a) < (ROM_BASE + ROM_SIZE))
|
||||||
|
|
||||||
#endif //_EAGLE_SOC_H_
|
#endif //_EAGLE_SOC_H_
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "esp8266/eagle_soc.h"
|
#include "esp8266/eagle_soc.h"
|
||||||
|
|
||||||
static inline uint32_t prev_text_size(const uint32_t pc)
|
static uint32_t prev_text_size(const uint32_t pc)
|
||||||
{
|
{
|
||||||
uint32_t size;
|
uint32_t size;
|
||||||
extern uint32_t _text_start, _text_end;
|
extern uint32_t _text_start, _text_end;
|
||||||
@ -24,6 +24,8 @@ static inline uint32_t prev_text_size(const uint32_t pc)
|
|||||||
size = pc - (uint32_t )&_text_start;
|
size = pc - (uint32_t )&_text_start;
|
||||||
} else if (IS_IRAM(pc)) {
|
} else if (IS_IRAM(pc)) {
|
||||||
size = pc - IRAM_BASE;
|
size = pc - IRAM_BASE;
|
||||||
|
} else if (IS_ROM(pc)) {
|
||||||
|
size = pc - ROM_BASE;
|
||||||
} else {
|
} else {
|
||||||
size = 0;
|
size = 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user