Open AlexanderBVKtex opened 2 weeks ago
Please confirm that CONFIG_STRICT_DEVMEM is enabled. as mentioned here https://github.com/HefnySco/OBAL/wiki/06---Build-and-Install.
I made a fast test on RPI-Zero W2 with 2021-05-07-raspios-buster-armhf-lite.zip and every thing seems to be working fine.
The code crashes here.
int clock_gettime(clockid_t clockid, struct timespec *ts)
{
//! @todo the value of clockid is ignored here.
//! A fallback mechanism is employed against the caller's choice of clock.
uint64_t utc_usec;
if (!AP::rtc().get_utc_usec(utc_usec)) {
utc_usec = AP_HAL::micros64();
}
ts->tv_sec = utc_usec / 1000000ULL;
ts->tv_nsec = (utc_usec % 1000000ULL) * 1000UL;
return 0;
}
Program received signal SIGSEGV, Segmentation fault. 0x0023844c in Linux::Scheduler::from ( scheduler=<error reading variable: Cannot access memory at address 0x7e7ffffc>) at ../../libraries/AP_HAL_Linux/Scheduler.h:24 24 ../../libraries/AP_HAL_Linux/Scheduler.h: No such file or directory. (gdb) stack Undefined command: "stack". Try "help". (gdb) backtrace
scheduler=<error reading variable: Cannot access memory at address 0x7e7ffffc>) at ../../libraries/AP_HAL_Linux/Scheduler.h:24
at ../../libraries/AP_HAL_Linux/system.cpp:62
at ../../libraries/AP_DDS/AP_DDS_Client.cpp:1169
at ../../libraries/AP_HAL_Linux/system.cpp:69
at ../../libraries/AP_DDS/AP_DDS_Client.cpp:1169
at ../../libraries/AP_HAL_Linux/system.cpp:69
at ../../libraries/AP_DDS/AP_DDS_Client.cpp:1169
at ../../libraries/AP_HAL_Linux/system.cpp:69
at ../../libraries/AP_DDS/AP_DDS_Client.cpp:1169
at ../../libraries/AP_HAL_Linux/system.cpp:69
at ../../libraries/AP_DDS/AP_DDS_Client.cpp:1169
--Type
const Linux::Scheduler* scheduler = Linux::Scheduler::from(hal.scheduler);
Bug report
Issue details After running my compiled executable for OBAL, the following error appears: SIGSEGV, Segmentation fault. (Everything is done according to OBAL's instructions.) When debugged, it gives the following output:
Version Ardupilot 4.5.4; No problems on Ardupilot 4.3.3
Platform [?] All [ ] AntennaTracker [X] Copter [ ] Plane [ ] Rover [ ] Submarine Only checked for copter, probably applies to all types.
System Ubuntu 22.04 arm64 Compiled with clang++ 14.0.0