Currently, I’m working with Jetson Nano 2Gb, and I facing the problem about assembly when I debug with gdb, I receive
92 __asm__ __volatile__("mrs %[res], daif": [res] "=r" (res)::);
(gdb)
Program received signal SIGILL, Illegal instruction.
INTERRUPTS_ENABLED () at Sx1278.cpp:92
And this is assembly code that causing that bug
__inline__ int INTERRUPTS_ENABLED(void) {
int res;
__asm__ __volatile__("mrs %[res], daif": [res] "=r" (res)::);
return ((res >> 7) & 1) == 0;
}
__inline__ void ENABLE_INTERRUPTS(void) {
if (!INTERRUPTS_ENABLED()) {
__asm__ __volatile__("msr daifset, #2");
}
}
__inline__ void DISABLE_INTERRUPTS(void) {
if (INTERRUPTS_ENABLED()) {
__asm__ __volatile__("msr daifclr, #2");
}
}
I have no experience with this problem.
I was wondering if anyone has encountered a similar error or could take a look and help me identify the cause? I would greatly appreciate any assistance.
I use this repo to control gpio pin https://github.com/Rubberazer/JETGPIO
I have tried many ways with many registers, and changed some toolchains but still can’t use it.
Dominic Ng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.