ERROR [platforms__posix__px4_layer] krait update param failed

I am using a snapdragon Flight board for development and I have been trying to build PX4 binaries into it. I installed the toolchain by following the instructions in http://dev.px4.io/starting-installing-linux.html, and updated the ADSP by following the instructions present in http://dev.px4.io/advanced-snapdragon.html. Everything ran perfectly without any error.

After that, i tested the HelloWorld code present in ATLFlightDocs/HelloWorld.md at master · ATLFlight/ATLFlightDocs · GitHub. I also got the output in mini-dm. I performed the DSPAL test present in ATLFlightDocs/DSPAL.md at master · ATLFlight/ATLFlightDocs · GitHub.
The test failed but i was able to rectify it by installing the latest FCAddon package provided by intrynsyc. (check out https://developer.qualcomm.com/forum/qdn-forums/hardware/snapdragon-flight/33478 if u have faced this error).

Then, I built the PX4 s/w into the board by following the instructions in http://dev.px4.io/starting-building.html.

But when i run
./px4 mainapp.config
from the /home/linaro/ folder, I am getting the following error:


ERROR


root@linaro-developer:/home/linaro# ./px4 mainapp.config 
sh: 1: cannot create /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor: Directory nonexistent
data path: .
commands file: mainapp.config
ERROR [platforms__posix__px4_layer] krait update param 12 failed
ERROR [platforms__posix__px4_layer] krait update param 297 failed
ERROR [platforms__posix__px4_layer] krait update param 333 failed
ERROR [platforms__posix__px4_layer] krait update param 334 failed
ERROR [platforms__posix__px4_layer] krait update param 335 failed
ERROR [platforms__posix__px4_layer] krait update param 336 failed
ERROR [platforms__posix__px4_layer] krait update param 338 failed
ERROR [platforms__posix__px4_layer] krait update param 339 failed
ERROR [platforms__posix__px4_layer] krait update param 340 failed
ERROR [platforms__posix__px4_layer] krait update param 341 failed
ERROR [platforms__posix__px4_layer] krait update param 343 failed
ERROR [platforms__posix__px4_layer] krait update param 344 failed
ERROR [platforms__posix__px4_layer] krait update param 345 failed
ERROR [platforms__posix__px4_layer] krait update param 392 failed
ERROR [platforms__posix__px4_layer] krait update param 469 failed
ERROR [platforms__posix__px4_layer] krait update param 508 failed
ERROR [platforms__posix__px4_layer] krait update param 509 failed
ERROR [platforms__posix__px4_layer] krait update param 510 failed
ERROR [platforms__posix__px4_layer] krait update param 513 failed
ERROR [platforms__posix__px4_layer] krait update param 515 failed
ERROR [platforms__posix__px4_layer] krait update param 516 failed
ERROR [platforms__posix__px4_layer] krait update param 518 failed
ERROR [platforms__posix__px4_layer] krait update param 520 failed
ERROR [platforms__posix__px4_layer] krait update param 523 failed
ERROR [platforms__posix__px4_layer] krait update param 525 failed
ERROR [platforms__posix__px4_layer] krait update param 526 failed
ERROR [platforms__posix__px4_layer] krait update param 528 failed
ERROR [platforms__posix__px4_layer] krait update param 530 failed
ERROR [platforms__posix__px4_layer] krait update param 533 failed
ERROR [platforms__posix__px4_layer] krait update param 534 failed
ERROR [platforms__posix__px4_layer] krait update param 535 failed
ERROR [platforms__posix__px4_layer] krait update param 602 failed
ERROR [platforms__posix__px4_layer] krait update param 603 failed
ERROR [platforms__posix__px4_layer] krait update param 604 failed
ERROR [platforms__posix__px4_layer] krait update param 605 failed
ERROR [platforms__posix__px4_layer] krait update param 623 failed
ERROR [platforms__posix__px4_layer] krait update param 626 failed
ERROR [platforms__posix__px4_layer] krait update param 659 failed
ERROR [platforms__posix__px4_layer] krait update param 661 failed
ERROR [platforms__posix__px4_layer] krait update param 668 failed
ERROR [platforms__posix__px4_layer] krait update param 676 failed
ERROR [platforms__posix__px4_layer] krait update param 757 failed

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

px4 starting.

ERROR [muorb] Initialize Error calling the uorb fastrpc initalize method..
ERROR [muorb] ERROR: FastRpcWrapper Not Initialized
INFO  [mavlink] mode: Normal, data rate: 2880 B/s on udp port 14556 remote port 14550
pxh> INFO  [mavlink] using network interface wlan0, IP: 192.168.1.1
INFO  [mavlink] with broadcast IP: 192.168.1.255

pxh> 

Please help. Thanks.

Did you build your code with make eagle_default_<something>, or posix_eagle_<something>? (Followed by make <orig_make_target> upload)

You should build to the former make targets, as to build and upload code for both the Krait-side and the Hexagon-side processors at the same time.

I ran “make eagle_default” followed by “make eagle_default upload” to load the software into the board.

Anyway, I managed to get rid of the krait update error by using an older commit. I did the following basically:

cd src/Firmware
git checkout d57e9f13d7b1c7a0639808baf7f5b47d16369df6
git submodule update --init --recursive

make eagle_default
make eagle_default update

So yes, that fixed the krait error. But my mini-dm output is still not convincing. Here’s what my mini-dm spits out now:

[08500/00] 29:22.105 HAP:61:In dspal_entry 0222 main.cpp
[08500/00] 29:22.126 HAP:61:attempting to open the ADSP command file: /dev/fs/px4.config 0186 main.cpp
[08500/00] 29:22.127 HAP:61:reading commands from /dev/fs/px4.config 0193 main.cpp
[08500/02] 29:22.131 HAP:61:Sleeping for 1, 1000000 0118 apps.h
[08500/00] 29:23.132 configuring UART for 4-wire mode, DAL id: 0x2001001 0852 DalUart.c
[08500/02] 29:23.138 HAP:61:Batch transfer failed: 0x110000c8 0524 i2c.c
[08500/00] 29:23.138 HAP:61:1033719 error: read register reports a read of -1 bytes, but attempted to set 1 bytes 0133 I2CDevObj.cpp
[08500/00] 29:23.138 HAP:61:1033761 error: unable to communicate with the hmc5883 mag sensor 0086 HMC5883.cpp
[08500/00] 29:23.138 HAP:61:1033794 error: mag sensor initialization failed, sensor read thread not started 0155 HMC5883.cpp
[08500/03] 29:23.138 HAP:61:HMC5883 start fail: -5 0165 df_hmc5883_wrapper.cpp
[08500/03] 29:23.138 HAP:61:DfHmc9250Wrapper start failed 0347 df_hmc5883_wrapper.cpp
[08500/00] 29:23.240 HAP:61:1136193 Reset MPU9250 0089 MPU9250.cpp
[08500/00] 29:24.341 HAP:61:2237171 I2C transfer to mag timed out 0464 MPU9250_mag.cpp
[08500/00] 29:24.341 HAP:61:2237212 MPU9250 soft reset failed. 0082 MPU9250_mag.cpp
[08500/00] 29:24.341 HAP:61:2237408 mag initialization failed 1 tries 0202 MPU9250_mag.cpp
[08500/00] 29:24.406 HAP:60:2301728 IMU temperature initialized to: 54.191135 0516 MPU9250.cpp
[08500/00] 29:24.408 HAP:61:2303720 additional sensor configuration succeeded 0187 BMP280.cpp
[08500/03] 29:24.410 HAP:61:start 0204 df_trone_wrapper.cpp
[08500/02] 29:24.411 HAP:61:I2C_Write failed: 285212872 num_bytes_written 0 0414 i2c.c
[08500/00] 29:24.411 HAP:61:2306663 Error: i2c write failed. Reported -1 bytes written 0216 I2CDevObj.cpp
[08500/00] 29:24.411 HAP:61:2306700 Nonzero result when writing to TRONE_WHO_AM_I_REG 0x1 0110 TROne.cpp
[08500/00] 29:24.411 HAP:61:2306735 probing not successful 0071 TROne.cpp
[08500/03] 29:24.411 HAP:61:TROne start fail: -1 0134 df_trone_wrapper.cpp
[08500/03] 29:24.411 HAP:61:DfTROneWrapper start failed 0215 df_trone_wrapper.cpp
[08500/02] 29:24.418 HAP:28712:Batch transfer failed: 0x110000c8 0524 i2c.c
[08500/00] 29:24.418 HAP:28712:2314126 error: read register reports a read of -1 bytes, but attempted to set 1 bytes 0133 I2CDevObj.cpp
[08500/00] 29:24.418 HAP:28712:2314170 error: unable to communicate with the hmc5883 mag sensor 0086 HMC5883.cpp
[08500/00] 29:24.418 HAP:28712:2314205 error: mag sensor initialization failed, sensor read thread not started 0155 HMC5883.cpp
[08500/03] 29:24.418 HAP:28712:HMC5883 start fail: -5 0165 df_hmc5883_wrapper.cpp
[08500/02] 29:24.420 HAP:28712:Batch transfer failed: 0x110000c8 0524 i2c.c
[08500/00] 29:24.420 HAP:28712:2315875 error: read register reports a read of -1 bytes, but attempted to set 1 bytes 0133 I2CDevObj.cpp
[08500/00] 29:24.420 HAP:28712:2315917 error: unable to communicate with the hmc5883 mag sensor 0086 HMC5883.cpp
[08500/00] 29:24.420 HAP:28712:2315949 error: mag sensor initialization failed, sensor read thread not started 0155 HMC5883.cpp
[08500/03] 29:24.420 HAP:28712:HMC5883 start fail: -5 0165 df_hmc5883_wrapper.cpp
[08500/02] 29:24.421 HAP:12327:LED: getHandle fail 0269 commander_helper.cpp
[08500/02] 29:24.421 HAP:12327:LED init failed 1298 commander.cpp
[08500/02] 29:24.421 HAP:12327:Buzzer: px4_open fail 0132 commander_helper.cpp
[08500/02] 29:24.421 HAP:12327:Buzzer init failed 1302 commander.cpp
[08500/02] 29:24.423 HAP:12327:Preflight checks always pass on Snapdragon. 0392 PreflightCheck.cpp
[08500/00] 29:24.488 configuring UART for 4-wire mode, DAL id: 0x2001005 0852 DalUart.c
[08500/00] 29:24.488 HAP:34:Trying to initialize mixer from config file /dev/fs/quad_x.main.mix 0145 pwm_out_rc_in.cpp
[08500/00] 29:24.490 HAP:34:Successfully initialized mixer from config file 0157 pwm_out_rc_in.cpp
[08500/02] 29:24.490 HAP:28712:Batch transfer failed: 0x110000c8 0524 i2c.c
[08500/00] 29:24.490 HAP:28712:2385605 error: read register reports a read of -1 bytes, but attempted to set 1 bytes 0133 I2CDevObj.cpp
[08500/00] 29:24.490 HAP:28712:2385649 error: unable to communicate with the hmc5883 mag sensor 0086 HMC5883.cpp
[08500/00] 29:24.490 HAP:28712:2385683 error: mag sensor initialization failed, sensor read thread not started 0155 HMC5883.cpp
[08500/03] 29:24.490 HAP:28712:HMC5883 start fail: -5 0165 df_hmc5883_wrapper.cpp
[08500/00] 29:26.061 HAP:37:EKF using pressure height - commencing alignment 0409 ekf.cpp
[08500/00] 29:30.801 HAP:37:EKF alignment complete 0064 control.cpp

Some people were having problems with old firmware on the Hexagon-side. It seems like your Hexagon proc is having trouble connecting to sensors, so that might be your issue as well. Try uploading new firmware to the hexagon. I believe there is a tutorial on the dev.px4.io website to do this.

I am using the latest version of Hexagon. :confused:

And I followed all the instructions mentioned in dev.px4.io

:confused:

Sorry about this issue, currently Snapdragon is broken, see: https://github.com/PX4/Firmware/issues/5756

You can go back to this commit and it should work:

@JulianOes : Yes I know, I have been following that discussion. Thanks a lot to you and Carlo for the fix.

And btw, that’s my partner in that thread, Venu Annamraju… :stuck_out_tongue: