https://toitlang.org/ logo
ble hci uart init error! panic :(
# help
a
It seems im abusing my BLE?
Copy code
ble hci uart init error!
E (295585) BLE_INIT: controller init failed

Guru Meditation Error: Core  0 panic'ed (Load access fault). Exception was unhandled.

Core  0 register dump:
MEPC    : 0x4080ba84  RA      : 0x4201cdba  SP      : 0x50002f90  GP      : 0x40824824
TP      : 0x50002fe0  T0      : 0x00000000  T1      : 0x4080bb6a  T2      : 0x00000000
S0/FP   : 0x4085ada4  S1      : 0x4082e000  A0      : 0x4085ada4  A1      : 0x00000054
A2      : 0xffffffa7  A3      : 0x00000001  A4      : 0x00000000  A5      : 0x00000000
A6      : 0x00000000  A7      : 0x00000000  S2      : 0x4082e000  S3      : 0x4082e000
S4      : 0x00000000  S5      : 0x00000000  S6      : 0x00000000  S7      : 0x00000000
S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000
T3      : 0x00000000  T4      : 0x00000000  T5      : 0x00000000  T6      : 0x00000000
MSTATUS : 0x00001881  MTVEC   : 0x40800001  MCAUSE  : 0x00000005  MTVAL   : 0x000000a8
MHARTID : 0x00000000
f
I tried to clean up the BLE driver a few months back, but some bugs still remain 🙁 If you have a repo, I can look at it. Otherwise, it's very difficult to fix those...
a
I seem to be finding it very easy to break it xD
Copy code
ble ll env init error code:-17
E (182610) BLE_INIT: controller init failed

Guru Meditation Error: Core  0 panic'ed (Load access fault). Exception was unhandled.
f
Must be some timing thing. It wasn't that unstable for me
That said: the error sounds weird. I wonder what's going on
a
Looking at the changelog i see some ble stuff in v2.0.0-alpha.189 and in v2.0.0-alpha.187 ? Any guesses which one might relate (if at all) I'll keep looking at other things too
f
Toit panics when it can't properly initialize BLE (since that should never happen). The question is now: what happened before for this to happen?
I don't remember anything that should influence the stability recently.
a
naturally I reproduced it 3 times in a row quickly without enough logging to see whats going on Turned the logging on and now its not crashing 😉
only time will tell, but I'll see what I can figure out