ERROR when Building OSDK 4.1 with Raspberry PI 4 with Own Application
CompletedDear DJI Team,
I am Trying to integrate my own Application with OSDK 4.1.I Build osdk 4.1 on raspberry pi and added my code with waypoint_v2 sample code ,then build successfully. But when i am running the code in Raspberry with DJI M300 RTK , each day i am getting different errors related to /sysdeps/ related error .
Yesterday i got error when i am calling sprintf() function , the error was
/sysdeps/arm/armv6/strlen.S: No such file or directory.(in GDB ),
then i removed calling sprintf.
Now i am getting error like below. gdb backtrace log is added below ....
Read App ID
User Configuration read successfully.
[New Thread 0xafd11f00 (LWP 10108)]
[New Thread 0xaf510f00 (LWP 10109)]
[New Thread 0xaed0ff00 (LWP 10111)]
[1096316.474]STATUS/1 @ getDroneVersion, L1702: ret = 0
[1096316.475]STATUS/1 @ parseDroneVersionInfo, L1122: Device Serial No. = 1ZNBJ8700C01KG
[1096316.475]STATUS/1 @ parseDroneVersionInfo, L1124: Firmware = 3.4.8.93
[1096316.475]STATUS/1 @ functionalSetUp, L279: Shake hand with drone successfully by getting drone version.
[New Thread 0xae1fef00 (LWP 10112)]
[New Thread 0xad9fdf00 (LWP 10113)]
[1096316.477]STATUS/1 @ legacyX5SEnableTask, L56: Legacy X5S Enable task created.
[1096317.476]STATUS/1 @ sendHeartbeatToFCTask, L1576: OSDK send heart beat to fc task created.
[1096317.677]STATUS/1 @ Control, L40: The control class is going to be deprecated.It will be better to use the FlightController class instead!
[1096317.677]STATUS/1 @ FileMgrImpl, L253: register download file callback handler successfully.
[New Thread 0xacffef00 (LWP 10119)]
[New Thread 0xac5fef00 (LWP 10120)]
[New Thread 0xabbfef00 (LWP 10121)]
[1096317.698]STATUS/1 @ Firewall, L45: Firewall is initializing ...
[1096317.698]STATUS/1 @ Firewall, L65: osdk policy file updating(1) ......
[1096318.698]STATUS/1 @ Firewall, L73: osdk policy file updating(2) ......
[1096318.701]STATUS/1 @ RequestUploadPolicyFileHandle, L217: request upload policy file type:0
[1096318.701]STATUS/1 @ RequestUploadPolicyFileHandle, L234: Upload policy file info md5 checksum and version
[1096318.703]STATUS/1 @ RequestUploadPolicyFileHandle, L217: request upload policy file type:1
[1096318.703]STATUS/1 @ RequestUploadPolicyFileHandle, L254: request upload policy file data: 0 0 200
[1096318.705]STATUS/1 @ RequestUploadPolicyFileHandle, L217: request upload policy file type:1
[1096318.705]STATUS/1 @ RequestUploadPolicyFileHandle, L254: request upload policy file data: 1 200 175
[1096318.707]STATUS/1 @ RequestUploadPolicyFileHandle, L217: request upload policy file type:2
[1096318.707]STATUS/1 @ RequestUploadPolicyFileHandle, L282: request upload policy file success
[New Thread 0xab1fef00 (LWP 10122)]
[1096319.699]STATUS/1 @ firewallTask, L112: firewall task created ...
[1096319.735]STATUS/1 @ getDroneVersion, L1702: ret = 0
[1096319.735]STATUS/1 @ parseDroneVersionInfo, L1122: Device Serial No. = 1ZNBJ8700C01KG
[1096319.735]STATUS/1 @ parseDroneVersionInfo, L1124: Firmware = 3.4.8.93
[New Thread 0xaa9fdf00 (LWP 10123)]
[1096319.783]STATUS/1 @ AdvancedSensing, L110: Start bulk channel for M300's liveview!
[New Thread 0xaa1fcf00 (LWP 10124)]
[1096319.784]STATUS/1 @ AdvancedSensing, L117: Create task for M300's liveview!
[1096319.790]STATUS/1 @ AdvancedSensing, L125: Start bulk channel for M300's perception
[New Thread 0xa99fbf00 (LWP 10125)]
[1096319.791]STATUS/1 @ AdvancedSensing, L132: Create task for M300's advanced sensing!
[1096319.791]STATUS/1 @ AdvancedSensing, L135: Advanced Sensing init for the M300 drone
[1096319.791]STATUS/1 @ LiveViewImpl, L89: Finding if liveview stream is available now.
[1096320.591]STATUS/1 @ init, L254: Start advanced sensing initalization
[1096320.591]STATUS/1 @ activate, L1329: version 0x304085D
[1096320.613]STATUS/1 @ activate, L1367: Activation successful
2021-11-21 11:14:21 [APP] DRONE_INIT: Succus
Thread 6 "dt-mqtt-handler" received signal SIG32, Real-time event 32.
[Switching to Thread 0xae1fef00 (LWP 10112)]
__GI___nanosleep (remaining=0x0, requested_time=0xae1fe89c)
at ../sysdeps/unix/sysv/linux/nanosleep.c:28
28 ../sysdeps/unix/sysv/linux/nanosleep.c: No such file or directory.
(gdb) bt
#0 0xb55106c0 in __GI___nanosleep (remaining=0x0, requested_time=0xae1fe89c)
at ../sysdeps/unix/sysv/linux/nanosleep.c:28
#1 0xb55106c0 in __GI___nanosleep (requested_time=0xae1fe89c,
requested_time@entry=0xae1fe894, remaining=remaining@entry=0x0)
at ../sysdeps/unix/sysv/linux/nanosleep.c:25
#2 0xb5541fb0 in usleep (useconds=<optimized out>)
at ../sysdeps/posix/usleep.c:32
#3 0x0007dd0c in OsdkLinux_TaskSleepMs ()
#4 0x0018db3c in OsdkOsal_TaskSleepMs ()
#5 0x000ac894 in DJI::OSDK::Vehicle::sendHeartbeatToFCTask(void*) ()
#6 0xb6f3f494 in start_thread (arg=0xae1fef00) at pthread_create.c:486
#7 0xb5548568 in () at ../sysdeps/unix/sysv/linux/arm/clone.S:73
(gdb)
How to fix this ?
-
Are you develop OSDK application with ARMv6 platform ? the OSDK anly support ARMv7、ARMv8, There may be compatibility problems. ![](https://djisdksupport.zendesk.com/attachments/token/SMcYjof1zjwmJSIGq7LV2Vynd/?name=inline-1168120899.png) ![](https://djisdksupport.zendesk.com/attachments/token/IPNkwSMvmoUv3RGjozdIrAwYF/?name=inline-993386072.png) -
Dear DJI Team ,
The issue realted to strlen() function i fixed by changing all strlen() function in my own code.
But now i am getting error in nanosleep() function which is in osdk source code . Can you provide solution to fix this ?
I am getting this error even for flight-sampe code also. Application runnign, butting getting segmentation fault. The gdb backtrace log for flight-sample application is attached .
Please help ....
pi@raspberrypi:~/Onboard-SDK/build/bin $ gdb djiosdk-flightcontrol-sample
GNU gdb (Raspbian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from djiosdk-flightcontrol-sample...done.
(gdb) r UserConfig.txt
Starting program: /home/pi/Onboard-SDK/build/bin/djiosdk-flightcontrol-sample UserConfig.txt
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Read App ID
User Configuration read successfully.[New Thread 0xb083af00 (LWP 2481)]
[New Thread 0xb0039f00 (LWP 2482)]
[New Thread 0xaf838f00 (LWP 2483)]
[1265885.026]STATUS/1 @ getDroneVersion, L1702: ret = 0
[1265885.027]STATUS/1 @ parseDroneVersionInfo, L1122: Device Serial No. = 1ZNBJ8700C01KG
[1265885.027]STATUS/1 @ parseDroneVersionInfo, L1124: Firmware = 3.4.8.93
[1265885.027]STATUS/1 @ functionalSetUp, L279: Shake hand with drone successfully by getting drone version.
[New Thread 0xaecfef00 (LWP 2484)]
[New Thread 0xae4fdf00 (LWP 2485)]
[1265885.028]STATUS/1 @ legacyX5SEnableTask, L56: Legacy X5S Enable task created.
[1265886.027]STATUS/1 @ sendHeartbeatToFCTask, L1576: OSDK send heart beat to fc task created.
[1265886.228]STATUS/1 @ Control, L40: The control class is going to be deprecated.It will be better to use the FlightController class instead!
[1265886.228]STATUS/1 @ FileMgrImpl, L253: register download file callback handler successfully.
[New Thread 0xadafef00 (LWP 2491)]
[New Thread 0xad0fef00 (LWP 2492)]
[New Thread 0xac6fef00 (LWP 2493)]
[1265886.251]STATUS/1 @ Firewall, L45: Firewall is initializing ...
[1265886.251]STATUS/1 @ Firewall, L65: osdk policy file updating(1) ......
[1265887.252]STATUS/1 @ Firewall, L73: osdk policy file updating(2) ......
[1265887.254]STATUS/1 @ RequestUploadPolicyFileHandle, L217: request upload policy file type:0
[1265887.255]STATUS/1 @ RequestUploadPolicyFileHandle, L234: Upload policy file info md5 checksum and version
[1265887.257]STATUS/1 @ RequestUploadPolicyFileHandle, L217: request upload policy file type:1
[1265887.257]STATUS/1 @ RequestUploadPolicyFileHandle, L254: request upload policy file data: 0 0 200
[1265887.259]STATUS/1 @ RequestUploadPolicyFileHandle, L217: request upload policy file type:1
[1265887.259]STATUS/1 @ RequestUploadPolicyFileHandle, L254: request upload policy file data: 1 200 175
[1265887.261]STATUS/1 @ RequestUploadPolicyFileHandle, L217: request upload policy file type:2
[1265887.261]STATUS/1 @ RequestUploadPolicyFileHandle, L282: request upload policy file success
[New Thread 0xabcfef00 (LWP 2495)]
[1265888.253]STATUS/1 @ firewallTask, L112: firewall task created ...
[1265888.274]STATUS/1 @ getDroneVersion, L1702: ret = 0
[1265888.274]STATUS/1 @ parseDroneVersionInfo, L1122: Device Serial No. = 1ZNBJ8700C01KG
[1265888.274]STATUS/1 @ parseDroneVersionInfo, L1124: Firmware = 3.4.8.93
[New Thread 0xab4fdf00 (LWP 2496)]
[1265888.310]ERRORLOG/1 @ AdvancedSensing, L108: Failed to initialize USB Bulk Linker channel for liveview!
[1265888.310]ERRORLOG/1 @ AdvancedSensing, L115: Failed to create task for liveview!
[1265888.314]ERRORLOG/1 @ AdvancedSensing, L123: Failed to initialize USB Bulk Linker channel for perception!
[1265888.314]ERRORLOG/1 @ AdvancedSensing, L130: Failed to create task for advanced sensing!
[1265888.314]STATUS/1 @ AdvancedSensing, L135: Advanced Sensing init for the M300 drone
[1265888.314]STATUS/1 @ LiveViewImpl, L89: Finding if liveview stream is available now.
[1265889.115]STATUS/1 @ init, L254: Start advanced sensing initalization
[1265889.115]STATUS/1 @ activate, L1329: version 0x304085D[1265889.147]STATUS/1 @ activate, L1367: Activation successful
| Available commands: |
| [a] Monitored Takeoff + Landing |
| [b] Monitored Takeoff + Position Control + Landing |
| [c] Monitored Takeoff + Position Control + Force Landing Avoid Ground |
| [d] Monitored Takeoff + Velocity Control + Landing |
[1265890.186]STATUS/1 @ ObtainJoystickCtrlAuthorityCB, L45: ObtainJoystickCtrlAuthoritySuccess
a
[1265892.555]STATUS/1 @ verify, L244: Verify subscription successful.
[1265892.587]STATUS/1 @ startPackage, L345: Start package 0 result: 0.
[1265892.587]STATUS/1 @ startPackage, L347: Package 0 info: freq=10, nTopics=2.Motors spinning...
Ascending...
Successful takeoff!
[1265897.528]STATUS/1 @ removePackage, L457: Remove package 0 successful.
[1265897.548]STATUS/1 @ verify, L244: Verify subscription successful.
[1265897.556]STATUS/1 @ startPackage, L345: Start package 0 result: 0.
[1265897.556]STATUS/1 @ startPackage, L347: Package 0 info: freq=10, nTopics=2.[1265897.556]STATUS/1 @ monitoredLanding, L97: Start landing action
[1265897.689]STATUS/1 @ checkActionStarted, L488: DISPLAYMODE: 12 ...
[1265904.689]STATUS/1 @ monitoredLanding, L117: Successful landing!
[1265904.710]STATUS/1 @ removePackage, L457: Remove package 0 successful.
[1265904.751]STATUS/1 @ ReleaseJoystickCtrlAuthorityCB, L53: ReleaseJoystickCtrlAuthoritySuccessThread 5 "djiosdk-flightc" received signal SIG32, Real-time event 32.
[Switching to Thread 0xaecfef00 (LWP 2484)]
__GI___nanosleep (remaining=0x0, requested_time=0xaecfe89c)
at ../sysdeps/unix/sysv/linux/nanosleep.c:28
28 ../sysdeps/unix/sysv/linux/nanosleep.c: No such file or directory.the backtrace
-
The stacktrace info seems that the params error, suggest to check the code: sendHeartbeatToFCTask ![](https://djisdksupport.zendesk.com/attachments/token/0bFNHxW7IgnnkU4OFI3NzNXiy/?name=inline2146109610.png) ![](https://djisdksupport.zendesk.com/attachments/token/4nQrpGqV0JeUzrUCD8hn1cONh/?name=inline29596782.png)
Please sign in to leave a comment.
Comments
4 comments