You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IS there a secret on how to map the fault address: 0x2000bade
to where it actually faulted in the sketch code?
If I look within the map file generated by the Arduino build: There are no symbols anywhere near this:
for example searching for 2000 will fail.
If it faulted within the code built as part of build.sh I can typically find the nearest symbol within the map file:
.../ArduinoCore-zephy/build/zephyr/zephyr.map.
In this case the closest symbols within that file shows:
My main question is: Is there an easy way to map the fault address, back to the location contained within the map file for the sketch.
Maybe something like: subtract the address X from the zephyr map from the fault address and that should give you address...
Thanks
The text was updated successfully, but these errors were encountered:
@KurtE yep, unfortunately mapping addresses in sketches is complicated by the fact that the sketch load address can potentially change every boot, so the map file is useless without the actual positions of each section in memory.
As you discovered, the only info you can get is "it's somewhere in the LLEXT heap". Very helpful! 👎
Zephyr very recently accepted a PR that makes the detailed mapping information available in the LLEXT debug log; this can be used to set up gdb and have a proper interactive debugging session. You can read how to use this here, I will merge this functionality in this repo ASAP.
Next steps are to make this information available to sketches (so that they can easily print the same table on Serial), and make a command-line decoder that allows to easily convert those addresses given the compiled sketch file and that map information.
Suppose the code on a Nano BLE 33 Sense V2 faults and fault shows up in Terminal window, like:
IS there a secret on how to map the fault address: 0x2000bade
to where it actually faulted in the sketch code?
If I look within the map file generated by the Arduino build: There are no symbols anywhere near this:
for example searching for 2000 will fail.
If it faulted within the code built as part of build.sh I can typically find the nearest symbol within the map file:
.../ArduinoCore-zephy/build/zephyr/zephyr.map.
In this case the closest symbols within that file shows:
So it looks like: the address is somewhere within llext: .noinit."WEST_TOPDIR/zephyr/subsys/llext/llext_mem.c".kheap_buf_llext_heap
However, suppose the fault is in the sketch code (either in INO or library). For example if it is in the library readTemerature
The map file shows:
My main question is: Is there an easy way to map the fault address, back to the location contained within the map file for the sketch.
Maybe something like: subtract the address X from the zephyr map from the fault address and that should give you address...
Thanks
The text was updated successfully, but these errors were encountered: