Back to our #BL602 Stack Trace ... Yep the Correct Stack Trace is indeed lurking behind our (unhelpful) Exception Stack Trace ... How shall we show the Correct Stack Trace beyond the Emptiness? 🤔
https://gist.github.com/lupyuen/5ddbcdd1054c775521291c3d114f6cee
Answer: "radio_events" contains Undefined Fields ... Because it was allocated on the Stack! Lesson Learnt: ALWAYS Init Stack Variables! 🙏
https://github.com/apache/mynewt-core/blob/master/apps/loraping/src/main.c#L215-L233
Quiz: What's wrong with this C code? 🤔 ... I'm soooo upset I missed this simple bug 🙄
https://github.com/apache/mynewt-core/blob/master/apps/loraping/src/main.c#L215-L233
Below the #BL602 Exception Handler Stack ... Is another Stack! ... Does this Stack contain the Stack Trace that we need? 🤔
https://gist.github.com/lupyuen/5ddbcdd1054c775521291c3d114f6cee
Here are the #BL602 Stacks for the Foreground RTOS Task, Background Task and Exception Handler ... Let's see what's wrong with the Exception Stack
Let's dump the #BL602 Stack with this function ... And figure out why our Exception Stack Trace doesn't look right
#BL602 shows Stack Trace when CONFIG_ENABLE_FP=1 ... But the addresses don't make sense ... They belong to the code that's dumping the Stack Trace 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/lorarecv/customer_app/sdk_app_lora/proj_config.mk#L40-L42
Can #BL602 show the Stack Trace for this #RISCV Exception? ... Let's find out 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/lorarecv/customer_app/sdk_app_lora/sdk_app_lora/demo.c
Let's disable #LoRa Channel Activity Detection for now ... #BL602 receives first LoRa Packet ... But not the second packet 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/lorarecv/customer_app/sdk_app_lora/sdk_app_lora/demo.c
Enabled #BL602 GPIO Interrupt Handler for #LoRa SX1276 ... And BL602 hits a #RISCV Exception ... At an invalid Program Address 🤔
https://github.com/lupyuen/bl_iot_sdk/blob/lorarecv/customer_app/sdk_app_lora/sdk_app_lora/demo.c
Reconnected #PineCone #BL602 @PINE64 ... To #LoRa SX1276 pins DIO0 to DIO3 ... For testing our GPIO interrupt handler
https://github.com/lupyuen/bl_iot_sdk/blob/lorarecv/customer_app/sdk_app_lora/sdk_app_lora/sx1276.h
IoT Techie and Educator / Apache NuttX PMC