Merge branch 'bugfix/esp32_core_dump_sanity_checks' into 'master'

esp32: Core dump sanity checks

Adds sanity checks when doing core dump to flash

- CRC for core dump flash partition config
- Tasks with corrupted TCBs are skipped
- Assertions to check that nothing is written beyond core dump flash partition

Ref TW11879

See merge request !686
This commit is contained in:
Ivan Grokhotkov
2017-04-27 10:43:58 +08:00
3 changed files with 159 additions and 68 deletions

View File

@@ -67,6 +67,13 @@ void esp_clear_watchpoint(int no);
*/
void esp_panic_wdt_stop(void);
/**
* @brief Checks stack pointer
*/
static inline bool esp_stack_ptr_is_sane(uint32_t sp)
{
return !(sp < 0x3ffae010UL || sp > 0x3ffffff0UL || ((sp & 0xf) != 0));
}
#endif
#ifdef __cplusplus