mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 13:44:32 +02:00
Merge branch 'bugfix/detect_ocd_when_panic' into 'master'
Fix OpenOCD detection code In the current master, detection of an attached OCD is broken. This fixes it. I also snuck in two unrelated checks in intr_alloc which return from a function that is asserted earlier in the code. This makes the code behave better when they are called erroneously in a production build. See merge request !377
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
#include "soc/cpu.h"
|
#include "soc/cpu.h"
|
||||||
#include "soc/soc.h"
|
#include "soc/soc.h"
|
||||||
#include "soc/rtc_cntl_reg.h"
|
#include "soc/rtc_cntl_reg.h"
|
||||||
|
#include "sdkconfig.h"
|
||||||
|
|
||||||
void IRAM_ATTR esp_cpu_stall(int cpu_id)
|
void IRAM_ATTR esp_cpu_stall(int cpu_id)
|
||||||
{
|
{
|
||||||
|
@@ -691,7 +691,7 @@ void esp_intr_noniram_disable()
|
|||||||
int oldint;
|
int oldint;
|
||||||
int cpu=xPortGetCoreID();
|
int cpu=xPortGetCoreID();
|
||||||
int intmask=~non_iram_int_mask[cpu];
|
int intmask=~non_iram_int_mask[cpu];
|
||||||
assert(non_iram_int_disabled_flag[cpu]==false);
|
if (non_iram_int_disabled_flag[cpu]) abort();
|
||||||
non_iram_int_disabled_flag[cpu]=true;
|
non_iram_int_disabled_flag[cpu]=true;
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"movi %0,0\n"
|
"movi %0,0\n"
|
||||||
@@ -709,7 +709,7 @@ void esp_intr_noniram_enable()
|
|||||||
{
|
{
|
||||||
int cpu=xPortGetCoreID();
|
int cpu=xPortGetCoreID();
|
||||||
int intmask=non_iram_int_disabled[cpu];
|
int intmask=non_iram_int_disabled[cpu];
|
||||||
assert(non_iram_int_disabled_flag[cpu]==true);
|
if (!non_iram_int_disabled_flag[cpu]) abort();
|
||||||
non_iram_int_disabled_flag[cpu]=false;
|
non_iram_int_disabled_flag[cpu]=false;
|
||||||
asm volatile (
|
asm volatile (
|
||||||
"movi a3,0\n"
|
"movi a3,0\n"
|
||||||
|
Reference in New Issue
Block a user