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 think this code have a problem in __inline__ int INTERRUPTS_ENABLE(void);
function. But I don’t have any idea to fix it.
I have no experience with this problem.
I use this repo to control gpio pin
https://github.com/Rubberazer/JETGPIO
Some information about my project:
I need to communicate between module Sx1278 (LoRa) and Jetson Nano board.
This is my github for Jetson Nano and module LoRa Ra-02:
github
It’s include Makefile. I just modify some function based on this repo
To running this program, I only use makefile, that generate executable file. I thought it’s caused by toolchain, but I can’t fix it.
Some information: When I use OS raspbian 32 bit it run normally. But when I use OS 64 bit, it’s facing that problem, and my module run on Aarch64 architecture. Jetson Nano don’t just have os version 64 bit.
Has anyone experienced a similar problem when using the JETGPIO
library on a 64-bit Jetson Nano or another Aarch64 system? Any suggestions on how to diagnose and fix this issue would be immensely helpful.
Dominic Ng is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.