i am having a bus fault somewhere in my code, i am trying to use addr2line to identify the source code line that it heppens at, for some reason it shows as if the adress is not valid.
what am i missing?
i am having a bus fault somewhere in my code, i am trying to use addr2line to identify the source code line that it heppens at, for some reason it shows as if the adress is not valid.
what am i missing?
Hi Shlomo
Your command do look correct. Just to be sure you are selecting the correct folder
1. Select your build config and open a terminal here
2. run arm-zephyr-eabi-addr2line.exe -e .\zephyr\zephyr.elf <your address>
Which version of NCS and toolchain are you using?
Regards
Runar
at the all it was that i had to use the r4 register and not r5.
do you know why sometime it's r5 and sometimes it's r4?
Not sure if I understood the question. I think which register is used the assembly is very assembler specific implementation for the Cortex-M33 core.
Where did you notice that sometimes it is using r5 and sometimes r4 for the same thing?
Not sure if I understood the question. I think which register is used the assembly is very assembler specific implementation for the Cortex-M33 core.
Where did you notice that sometimes it is using r5 and sometimes r4 for the same thing?
in the nordic intermediate course there is a chapter about addr2line, in the example they give there, in order to find which adress in the source code triggered the error you had to use the adrress in r5.
but thats ok i had another fatal error and found the source code line with r2.
I guess you just need to look at all of them.
shlomots said:but thats ok i had another fatal error and found the source code line with r2.
I guess you just need to look at all of them.
Yes, all the registers have info that we need to look. Most of the fault handlers are designed to decode the values of these registers but sometimes we we need to look into these registers.