Thanks for responding. Is this proprietary code the Qualcom Hexagon SDK?
I'm already building the DSP code with QuRT, but it's unclear how to do the system calls in order to interact with the devices.
For example, i've tried this to blink a LED:
int fd;
fd = open("/sys/class/gpio/gpio1182/value", O_WRONLY);
if (fd == -1) {
FARF(ALWAYS,"Unable to open /sys/class/gpio/gpio1182/value");
qurt_thread_exit(QURT_EOK);
}
// Toggle LED 50 ms on, 50ms off, 100 times (10 seconds)
for (int i = 0; i < 100; i++) {
if (write(fd, "1", 1) != 1) {
FARF(ALWAYS,"Error writing to /sys/class/gpio/gpio1182/value");
qurt_thread_exit(QURT_EOK);
}
qurt_timer_sleep(50000);
if (write(fd, "0", 1) != 1) {
FARF(ALWAYS,"Error writing to /sys/class/gpio/gpio1182/value");
qurt_thread_exit(QURT_EOK);
}
qurt_timer_sleep(50000);
}
close(fd);
It builds and runs but nothing happens.
as for the SPI, the hexagon system libraries don't contain headers for <sys/ioctrl.h>. I noticed in the PX4, the headers are defined in the DSPAL, and the implementation is in dspal_imp.c (https://gitlab.com/voxl-public/flight-core-px4/px4-firmware-ci/-/blob/v1.4.20-modalai-rb5-flight-beta/platforms/qurt/src/px4/common/dspal_impl.c), but are just stubs?