Does anyone know if yield() called from setup() OK? #9132
1plaintext
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I would have thought a call to yield() from any of the user code (nothing like interrupt handler or any sort of callback) would be pretty harmless.. but seemingly I am getting a lot of panic(). The only possibly "odd" thing is it is not called from loop() but rather from setup() (I wrote some code that write to EEPROM so I had thought it prudent to do some yields). Is that not allowed? I am still not very familiar with CONT, and in fact, I used optimistic_yield() instead, thinking that the "can_yield()" call would have protected me, but no so. Right before panic, I can see cont->pc_ret is not 0 and cont->pc_suspend is 0, but I can't figure out what's ETS_INTR_WITHINISR() though I am sure where it is called from, it is not coming from an interrupt handler.
So, is calling from setup() OK? Or am I missing something.
(gdb) stepi
0x40201978 in __yield () at AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/cores/esp8266/core_esp8266_main.cpp:191
191 panic();
(gdb) p *(cont_t *) 0x3fffefb0
$3 = {pc_ret = 0x40255258 <cont_run+52>, sp_ret = 0x3fffef4c, pc_suspend = 0x0, sp_suspend = 0x3ffffcb8, stack_end = 0xffffd0, unused1 = 0, unused2 = 0, stack_guard1 = 4277137406, stack = {4277137406, 4277137406, 0, 4277137406, 1073738080, 1073738032, 12, 4277137406, 1073738080, 1073738032, 8, 0, 1, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 1073677020, 1073738032, 1073644492, 64, 1075975873, 1073737977, 4277137406, 38, 4294902280, 1073737952, 63, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 0, 117, 0, 1075843432, 0, 1073737977, 1073737977, 1076269367, 1075888592, 25, 1073737952, 1075888592, 1073738080, 1073738032, 8, 4277137406, 4277137406, 4277137406, 4277137406, 1073677020, 1073738032, 8, 1073737952, 1075860040, 1819635523, 1869488228, 1768300660, 1948279918, 2053467497, 543518319, 4277075978, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 4277137406, 1073738080, 1073738032, 8, 4277137406, 4277137406, 4277137406, 1073675388, 0, 0, 427, 4277137406, 4277137406, 4277137406, 1073648292, 1073738080, 4277137406, 4277137406, 4277137406, 4277137406, 0, 1073675388, 1073675256, 1712, 1075898584, 1076294196, 1076294191, 1076294185, 1076294179, 1076294173, 1076294168, 1076294162, 1076294157, 1076294152, 1076294146, 1076294140, 1076294134, 1076294128, 1076294120, 1076294093, 1076294088, 1076294083, 1076294077, 1076294071, 1076294065, 1076294057, 1076294052, 1076294046, 1076294040, 1076294033, 1076294027, 1076294021, 1076294015, 1076294009, 1076294003, 1076293997, 1076293991, 1076293986, 1076293980, 1076293974, 1076293968, 1076293962, 1076293956, 1076293949, 1076293942, 1076293936, 1076293931, 1076293925, 1076293919, 1076293913, 1076293908, 1076293903, 1076293897, 1076293892, 1076293886, 1076293880, 1076293874, 1076293850, 1076293825, 1076293820, 1076293815, 1076293808, 1076293801, 1076293794, 1076293787, 1076293780, 1076293773, 1076293766, 1076293759, 1076293752, 1076293745, 1076293738, 1076293731, 1076293724, 1076293719, 1076293688, 1076293683, 1076293676, 1076293653, 1076293648, 1076293641, 1076293636, 1076293631, 1076293624, 1076293617, 1076293594, 1076293571, 1076293564, 1076293559, 1076293552, 1076293545, 1076293540, 1076293517, 1076293494, 1076293489, 1076293484, 1076293477...}, stack_guard2 = 4277137406, struct_start = 0x3fffefb0}
Beta Was this translation helpful? Give feedback.
All reactions