Problems starting muorb on Snapdragon flight

I am trying to get to start development on the Snapdragon flight board. I have compiled the latest Firmware master branch, and uploaded it to the Snapdragon. When trying to run the px4 executable with ./px4 mainapp.config on the Snapdragon, I get the error ERROR [muorb] ERROR: Getting Bulk data from fastRPC link.

Does anyone know what the problem could be?

Here is the full terminal output that I get when running the px4 executable:

root@linaro-developer:/home/linaro# ./px4 mainapp.config 
sh: 1: cannot create /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor: Directory nonexistent
commands file: mainapp.config

______  __   __    ___ 
| ___ \ \ \ / /   /   |
| |_/ /  \ V /   / /| |
|  __/   /   \  / /_| |
| |     / /^\ \ \___  |
\_|     \/   \/     |_/

px4 starting.

INFO  [sdlog2] [blackbox] /root/log/2016-11-09
INFO  [sdlog2] [blackbox] recording: 11_42_18.px4log
ERROR [muorb] ERROR: Getting Bulk data from fastRPC link
INFO  [dataman] Unkown restart, data manager file '/home/linaro/dataman' size is 47640 bytes
INFO  [mavlink] mode: Normal, data rate: 1000000 B/s on udp port 14556 remote port 14550
Sleeping for 1 s; (1000000 us).
pxh> INFO  [mavlink] using network interface wlan0, IP: 192.168.1.88
INFO  [mavlink] with broadcast IP: 192.168.1.255
pxh> 


Getting the same error. Stuck as well. Let’s try and figure it out.
This call is in the <PX4_Firmware>/src/modules/muorb/krait/px4muorb_KraitRpcWrapper.cpp file, line 343. Possibly, this is coming from the fastrpc_recv_thread function of the .../muorb/krait.uORBKraitFastRpcChannel.cpp file, line 232, on thread start (only place where receiveBulkData function is called in this file). I don’t think that this breaks the thread’s main loop, though, otherwise there would be another message of something like exiting thread. I don’t really know how to debug muorb without changing the PX4 code.

There is little indication from mini-dm (to my knowledge) that something is up QURT-side. Possibly the HAP:110:cannot find /oemconfig.so 0141 load.c is a clue. I have tried RPC calls on non-px4 programs, and they work fine. Although, I have never tried to set any pointers (read function parameters that are pointers) in shared memory, which I think is what is going on here for the Krait<->Hexagon uORB messaging.

If u figure out the problem or another solution, let me know. I’m also down to chat about potential methods of debugging.

Check to be sure that you have the latest aDSP static image. You can get a prerelease version of the aDSP static image from the Intrinsyc website: https://www.intrinsyc.com/fchsdkaddon/

Also, if you use the tool called mini-dm it will provide a more detailed (more aDSP specific) error log than the one from the PX4 console. If you post this log in the forum, I can help investigate the problem.

Hi jy,

I have followed some of the work that you have done with bug fixing on the Snapdragon. Y’all are awesome. Sorry to thread-steal, but I have a similar problem. I just upgraded aDSP static image through the FC Hexagon addon, and same error as before.

`
commands file: mainapp.config
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/fastrpc_apps_user.c:136:failed to create tls key/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/listener_android.c:112:listener using ion heap: -1


| ___ \ \ \ / / / |
| |/ / \ V / / /| |
| __/ / \ / /
| |
| | / /^\ \ ___ |
_| / / |_/

px4 starting.

INFO [sdlog2] [blackbox] /root/log/sess003
INFO [sdlog2] [blackbox] recording: log001.px4log
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/listener_android.c:129:listener protocol failure -1
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/listener_android.c:133::error: -1: 0 == (nErr = __QAIC_HEADER(adsp_listener_next_invoke)( ctx, nErr, 0, 0, &ctx, &handle, &sc, bufs->inbufs, inBufsAllocated, bufs->inbufLenReqs, MAX_BUFS, bufs->outbufLenReqs, MAX_BUFS))
ERROR /media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/listener_android.c:192:listener thread exiting with code -1
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/fastrpc_apps_user.c:224::error: -1: 0 == (nErr = remotectl_open(name, (int*)ph, dlerrstr, sizeof(dlerrstr), &dlerr))
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/listener_android.c:194:listener thread failed to cleanly shutdown. This is ok durring process exit.
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/fastrpc_apps_user.c:224::error: -1: 0 == (nErr = remotectl_open(name, (int*)ph, dlerrstr, sizeof(dlerrstr), &dlerr))
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/fastrpc_apps_user.c:224::error: -1: 0 == (nErr = remotectl_open(name, (int*)ph, dlerrstr, sizeof(dlerrstr), &dlerr))
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/fastrpc_apps_user.c:224::error: -1: 0 == (nErr = remotectl_open(name, (int*)ph, dlerrstr, sizeof(dlerrstr), &dlerr))
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/fastrpc_apps_user.c:224::error: -1: 0 == (nErr = remotectl_open(name, (int*)ph, dlerrstr, sizeof(dlerrstr), &dlerr))
[muorb] ERROR: Getting Bulk data from fastRPC link
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/fastrpc_apps_user.c:224::error: -1: 0 == (nErr = remotectl_open(name, (int*)ph, dlerrstr, sizeof(dlerrstr), &dlerr))
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/fastrpc_apps_user.c:224::error: -1: 0 == (nErr = remotectl_open(name, (int*)ph, dlerrstr, sizeof(dlerrstr), &dlerr))
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/fastrpc_apps_user.c:224::error: -1: 0 == (nErr = remotectl_open(name, (int*)ph, dlerrstr, sizeof(dlerrstr), &dlerr))
/media/intrinsyc/BigDrive/Project/APQ8074Flight/LNX.LER.1.0-68037/APQ8074Flight/oe-core/build/tmp-eglibc/work/cortexa8hf-vfp-neon-linux-gnueabi/adsprpc/1.0-r0/adsprpc-1.0/src/fastrpc_apps_user.c:224::error: -1: 0 == (nErr = remotectl_open(name, (int*)ph, dlerrstr, sizeof(dlerrstr), &dlerr))
INFO [dataman] Unkown restart, data manager file ‘/home/linaro/dataman’ size is 47640 bytes
INFO [mavlink] mode: Normal, data rate: 1000000 B/s on udp port 14556 remote port 14550
Sleeping for 1 s; (1000000 us).
pxh>
`

mini-dm log
Running mini-dm version: 3.0 Device found with Product ID 0x9025. Continuing... mini-dm is waiting for a DMSS connection... DMSS is connected. Running mini-dm... [08500/03] 33:50.466 HAP:63:HAP_debug_v2 weak ref not found, return _rtld_sym_zero@_rtld_objmain 0294 symbol.c [08500/03] 33:50.466 HAP:63:HAP_debug_v2 weak ref not found, return _rtld_sym_zero@_rtld_objmain 0294 symbol.c [08500/03] 33:50.467 HAP:63:HAP_debug_v2 weak ref not found, return _rtld_sym_zero@_rtld_objmain 0294 symbol.c [08500/03] 33:50.467 HAP:63:HAP_debug_v2 weak ref not found, return _rtld_sym_zero@_rtld_objmain 0294 symbol.c [08500/00] 33:50.480 HAP:61:In dspal_entry 0220 main.cpp [08500/00] 33:50.597 HAP:61:attempting to open the ADSP command file: /dev/fs/px4.config 0184 main.cpp [08500/00] 33:50.597 HAP:61:reading commands from /dev/fs/px4.config 0191 main.cpp [08500/00] 33:51.618 configuring UART for 2-wire mode, DAL id: 0x2001001 0859 DalUart.c [08500/00] 33:51.738 HAP:61:1257259 Reset MPU9250 0089 MPU9250.cpp [08500/00] 33:51.801 HAP:60:1320294 IMU temperature initialized to: 55.831024 0516 MPU9250.cpp [08500/00] 33:51.803 HAP:61:1322201 additional sensor configuration succeeded 0187 BMP280.cpp [08500/02] 33:51.815 HAP:12329:LED: getHandle fail 0269 commander_helper.cpp [08500/02] 33:51.815 HAP:12329:LED init failed 1341 commander.cpp [08500/02] 33:51.815 HAP:12329:Buzzer: px4_open fail 0132 commander_helper.cpp [08500/02] 33:51.815 HAP:12329:Buzzer init failed 1345 commander.cpp [08500/02] 33:51.817 HAP:12329:Preflight checks always pass on Snapdragon. 0392 PreflightCheck.cpp [08500/02] 33:52.738 mmpm_register: MMPM client for USM ADSP core 12 0117 UltrasoundStreamMgr_Mmpm.cpp [08500/02] 33:52.740 ADSP License DB: License validation function with id 164678 stored. 0280 adsp_license_db.cpp [08500/02] 33:52.740 AvsCoreSvc: StartSvcHandler Enter 0518 AdspCoreSvc.cpp [08500/02] 33:52.740 AdspCoreSvc: Started successfully 0534 AdspCoreSvc.cpp [08500/02] 33:52.742 loading BLSP configuration 0217 blsp_config.c [08500/02] 33:52.972 HAP:110:cannot find /oemconfig.so 0141 load.c [08500/03] 33:52.972 HAP:111::error: -1: 0 == dynconfig_init(&conf, "security") 0696 sigverify.c [08500/02] 33:52.972 opened /usr/share/data/adsp/blsp.config 0237 blsp_config.c [08500/02] 33:52.973 HAP:79:cannot find /voiceproc_tx.so 0141 load.c [08500/02] 33:52.973 read 76 bytes 0248 blsp_config.c [08500/02] 33:52.973 found tty- next char 1 0087 blsp_config.c [08500/02] 33:52.973 uart_dev_id 1 0098 blsp_config.c [08500/02] 33:52.973 found bam- next char 9 0129 blsp_config.c [08500/02] 33:52.973 bam_id 9 0137 blsp_config.c [08500/02] 33:52.973 set tty-1 = BAM-9 0161 blsp_config.c [08500/02] 33:52.973 2-wire UART enabled for tty-1 0186 blsp_config.c [08500/02] 33:52.973 found tty- next char 2 0087 blsp_config.c [08500/02] 33:52.973 uart_dev_id 2 0098 blsp_config.c [08500/02] 33:52.973 found bam- next char 8 0129 blsp_config.c [08500/02] 33:52.973 bam_id 8 0137 blsp_config.c [08500/02] 33:52.973 set tty-2 = BAM-8 0161 blsp_config.c [08500/02] 33:52.973 2-wire UART enabled for tty-2 0186 blsp_config.c [08500/02] 33:52.973 found tty- next char 3 0087 blsp_config.c [08500/02] 33:52.973 uart_dev_id 3 0098 blsp_config.c [08500/02] 33:52.973 found bam- next char 6 0129 blsp_config.c [08500/02] 33:52.973 bam_id 6 0137 blsp_config.c [08500/02] 33:52.973 set tty-3 = BAM-6 0161 blsp_config.c [08500/02] 33:52.973 2-wire UART enabled for tty-3 0186 blsp_config.c [08500/02] 33:52.973 found tty- next char 4 0087 blsp_config.c [08500/02] 33:52.973 uart_dev_id 4 0098 blsp_config.c [08500/02] 33:52.973 found bam- next char 2 0129 blsp_config.c [08500/02] 33:52.973 bam_id 2 0137 blsp_config.c [08500/02] 33:52.975 set tty-4 = BAM-2 0161 blsp_config.c [08500/02] 33:52.975 2-wire UART enabled for tty-4 0186 blsp_config.c [08500/02] 33:52.975 UART tty-1: BAM-9, 2-wire: 1 0198 blsp_config.c [08500/02] 33:52.975 UART tty-2: BAM-8, 2-wire: 1 0198 blsp_config.c [08500/02] 33:52.975 UART tty-3: BAM-6, 2-wire: 1 0198 blsp_config.c [08500/02] 33:52.975 UART tty-4: BAM-2, 2-wire: 0 0198 blsp_config.c [08500/02] 33:52.975 UART tty-5: BAM: [not found] 0203 blsp_config.c [08500/02] 33:52.975 UART tty-6: BAM: [not found] 0203 blsp_config.c [08500/02] 33:52.975 HAP:79:cannot find /voiceproc_rx.so 0141 load.c [08500/02] 33:52.975 BLSP configuration loaded 0268 main.c