• Snapdragon Advanced
    • Connect to Snapdragon
      • Over FTDI
      • Over ADB (Android Debug Bridge)
    • Upgrade Snapdragon
      • Upgrading/replacing the Linux image
      • Updating the ADSP firmware
        • Prevent bricking
        • Push the latest ADSP firmware files
    • Serial ports
      • Use serial ports
    • Wifi-settings
      • Access point mode
      • Station mode
    • Troubleshooting
      • adb does not work
      • USB permissions
      • Board doesn’t start / is boot-looping / is bricked
      • No space left on device
      • Undefined PLT symbol
        • _FDtest
        • Something else
      • krait update param XXX failed on startup
      • ADSP restarts
      • Do I have a P1 or P2 board?

    Snapdragon Advanced

    官网英文原文地址:http://dev.px4.io/advanced-snapdragon.html

    Connect to Snapdragon

    Over FTDI

    Connect the small debug header shipped with the Snapdragon and the FTDI cable.

    On Linux, open a console using:

    1. screen /dev/ttyUSB0 115200

    Change USB0 to whatever it happens to be. Check /dev/ or /dev/serial/by-id.

    Over ADB (Android Debug Bridge)

    Connect the Snapdragon over USB2.0 and power it up using the power module.
    When the Snapdragon is running the, the LED will be slowly blinking (breathing) in blue.

    Make sure the board can be found using adb:

    1. adb devices

    If you cannot see the device, it is most likely a USB device permission issue. Follow the instructions

    To get a shell, do:

    1. adb shell

    Upgrade Snapdragon

    For this step the Flight_BSP zip file from Intrynsic is required. It can be obtained after registering using the board serial.

    Upgrading/replacing the Linux image

    Flashing the Linux image will erase everything on the Snapdragon. Back up your work before you perform this step!

    Make sure the board can be found using adb:

    1. adb devices

    Then, reboot it into the fastboot bootloader:

    1. adb reboot bootloader

    Make sure the board can be found using fastboot:

    1. fastboot devices

    Download the latest BSP from Intrinsyc:

    1. unzip Flight_3.1.1_BSP_apq8074-00003.zip
    2. cd BSP/binaries/Flight_BSP_4.0
    3. ./fastboot-all.sh

    It is normal that the partitions recovery, update, and factory will fail.

    Updating the ADSP firmware

    Part of the PX4 stack is running on the ADSP (the DSP side of the Snapdragon 8074). The underlying operating system QURT needs to be updated separately.

    If anything goes wrong during the ADSP firmware update, your Snapdragon can get bricked! Follow the steps below carefully which should prevent bricking in most cases.

    First of all, if you’re not already on BSP 3.1.1, upgrade the Linux image!

    Prevent bricking

    To prevent the system from hanging on boot because of anything wrong with the ADSP firmware, do the following changes before updating:

    Edit the file directly on the Snapdragon over screen or adb shell:

    1. vim /usr/local/qr-linux/q6-admin.sh

    Or load the file locally and edit it there with the editor of your choice:

    To do this, load the file locally:

    1. adb pull /usr/local/qr-linux/q6-admin.sh

    Edit it:

    1. gedit q6-admin.sh

    And push it back:

    1. adb push q6-admin.sh /usr/local/qr-linux/q6-admin.sh
    2. adb shell chmod +x /usr/local/qr-linux/q6-admin.sh

    Comment out the while loops causing boot to hang:

    1. # Wait for adsp.mdt to show up
    2. #while [ ! -s /lib/firmware/adsp.mdt ]; do
    3. # sleep 0.1
    4. #done

    and:

    1. # Don't leave until ADSP is up
    2. #while [ "`cat /sys/kernel/debug/msm_subsys/adsp`" != "2" ]; do
    3. # sleep 0.1
    4. #done

    Push the latest ADSP firmware files

    Download the file Flight_3.1.1a_qcom_flight_controller_hexagon_sdk_add_on.zip from Intrinsyc.

    And copy them on to the Snapdragon:

    1. unzip Flight_3.1.1a_qcom_flight_controller_hexagon_sdk_add_on.zip
    2. cd images/8074-eagle/normal/adsp_proc/obj/qdsp6v5_ReleaseG/LA/system/etc/firmware
    3. adb push . /lib/firmware

    Then do a graceful reboot, so that the firmware gets applied:

    1. adb reboot

    Serial ports

    Use serial ports

    Not all POSIX calls are currently supported on QURT. Therefore, some custom ioctl are needed.

    The APIs to set up and use the UART are described in dspal.

    Wifi-settings

    These are notes for advanced developers.

    Connect to the Linux shell (see console instructions).

    Access point mode

    If you want the Snapdragon to be a wifi access point (AP mode), edit the file: /etc/hostapd.conf and set:

    1. ssid=EnterYourSSID
    2. wpa_passphrase=EnterYourPassphrase

    Then configure AP mode:

    1. /usr/local/qr-linux/wificonfig.sh -s softap
    2. reboot

    Station mode

    If you want the Snapdragon to connect to your existing wifi, edit the file: /etc/wpa_supplicant/wpa_supplicant.conf and add your network settings:

    1. network={
    2. ssid="my existing network ssid"
    3. psk="my existing password"
    4. }

    Then configure station mode:

    1. /usr/local/qr-linux/wificonfig.sh -s station
    2. reboot

    Troubleshooting

    adb does not work

    • Check permissions
    • Make sure you are using a working Micro-USB cable.
    • Try a USB 2.0 port.
    • Try front and back ports of your computer.

    USB permissions

    1) Create a new permissions file

    1. sudo -i gedit /etc/udev/rules.d/51-android.rules

    paste this content, which enables most known devices for ADB access:

    1. SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
    2. SUBSYSTEM=="usb", ATTRS{idVendor}=="0e79", MODE="0666", GROUP="plugdev"
    3. SUBSYSTEM=="usb", ATTRS{idVendor}=="0502", MODE="0666", GROUP="plugdev"
    4. SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", MODE="0666", GROUP="plugdev"
    5. SUBSYSTEM=="usb", ATTRS{idVendor}=="413c", MODE="0666", GROUP="plugdev"
    6. SUBSYSTEM=="usb", ATTRS{idVendor}=="0489", MODE="0666", GROUP="plugdev"
    7. SUBSYSTEM=="usb", ATTRS{idVendor}=="091e", MODE="0666", GROUP="plugdev"
    8. SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
    9. SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"
    10. SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", MODE="0666", GROUP="plugdev"
    11. SUBSYSTEM=="usb", ATTRS{idVendor}=="24e3", MODE="0666", GROUP="plugdev"
    12. SUBSYSTEM=="usb", ATTRS{idVendor}=="2116", MODE="0666", GROUP="plugdev"
    13. SUBSYSTEM=="usb", ATTRS{idVendor}=="0482", MODE="0666", GROUP="plugdev"
    14. SUBSYSTEM=="usb", ATTRS{idVendor}=="17ef", MODE="0666", GROUP="plugdev"
    15. SUBSYSTEM=="usb", ATTRS{idVendor}=="1004", MODE="0666", GROUP="plugdev"
    16. SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666", GROUP="plugdev"
    17. SUBSYSTEM=="usb", ATTRS{idVendor}=="0409", MODE="0666", GROUP="plugdev"
    18. SUBSYSTEM=="usb", ATTRS{idVendor}=="2080", MODE="0666", GROUP="plugdev"
    19. SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", MODE="0666", GROUP="plugdev"
    20. SUBSYSTEM=="usb", ATTRS{idVendor}=="2257", MODE="0666", GROUP="plugdev"
    21. SUBSYSTEM=="usb", ATTRS{idVendor}=="10a9", MODE="0666", GROUP="plugdev"
    22. SUBSYSTEM=="usb", ATTRS{idVendor}=="1d4d", MODE="0666", GROUP="plugdev"
    23. SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", MODE="0666", GROUP="plugdev"
    24. SUBSYSTEM=="usb", ATTRS{idVendor}=="04da", MODE="0666", GROUP="plugdev"
    25. SUBSYSTEM=="usb", ATTRS{idVendor}=="05c6", MODE="0666", GROUP="plugdev"
    26. SUBSYSTEM=="usb", ATTRS{idVendor}=="1f53", MODE="0666", GROUP="plugdev"
    27. SUBSYSTEM=="usb", ATTRS{idVendor}=="04e8", MODE="0666", GROUP="plugdev"
    28. SUBSYSTEM=="usb", ATTRS{idVendor}=="04dd", MODE="0666", GROUP="plugdev"
    29. SUBSYSTEM=="usb", ATTRS{idVendor}=="0fce", MODE="0666", GROUP="plugdev"
    30. SUBSYSTEM=="usb", ATTRS{idVendor}=="0930", MODE="0666", GROUP="plugdev"
    31. SUBSYSTEM=="usb", ATTRS{idVendor}=="19d2", MODE="0666", GROUP="plugdev"

    Set up the right permissions for the file:

    1. sudo chmod a+r /etc/udev/rules.d/51-android.rules

    Restart the deamon

    1. sudo udevadm control --reload-rules
    2. sudo service udev restart
    3. sudo udevadm trigger

    If it still doesn’t work, check this answer on StackOverflow.

    Board doesn’t start / is boot-looping / is bricked

    If you can still connect to the board using the serial console and get to a prompt such as:

    1. root@linaro-developer:~#

    You can get into fastboot (bootloader) mode by entering:

    1. reboot2fastboot

    If the serial console is not possible, you can try to connect the Micro USB cable, and enter:

    1. adb wait-for-device && adb reboot bootloader

    Then power cycle the board. If you’re lucky, adb manages to connect briefly and can send the board into fastboot.

    To check if it’s in fastboot mode, use:

    1. fastboot devices

    Once you managed to get into fastboot mode, you can try above teps to update the Android/Linux image.

    If you happen to have a P2 board, you should be able to reset the Snapdragon to the recovery image by starting up the Snapdragon while shorting the two pins next to where J3 is written (The two rectangular pins in-between the corner hole and the MicroSD card slot almost at the edge of the board.

    If everything fails, you probably need to request help from intrinsyc.

    No space left on device

    Sometimes make eagle_default upload fails to upload:

    1. failed to copy 'px4' to '/home/linaro/px4': No space left on device

    This can happen if ramdumps fill up the disk. To clean up, do:

    1. rm -rf /var/log/ramdump/*

    Also, the logs might have filled the space. To delete them, do:

    1. rm -rf /root/log/*

    Undefined PLT symbol

    _FDtest

    If you see the following output on mini-dm when trying to start the px4 program, it means that you need to update the ADSP firmware:

    1. [08500/03] 05:10.960 HAP:45:undefined PLT symbol _FDtest (689) /libpx4muorb_skel.so 0303 symbol.c

    Something else

    If you have changed the source, presumably added functions and you see undefined PLT symbol ... it means that the linking has failed.

    • Do the declaration and definition of your function match one to one?
    • Is your code actually getting compiled?
      Is the module listed in the cmake config?
    • Is the (added) file included in the CMakeLists.txt?
    • Try adding it to the POSIX build and running the compilation. The POSIX linker will inform you about linking errors at compile/linking time.

    krait update param XXX failed on startup

    1. ERROR [platforms__posix__px4_layer] krait update param 297 failed
    2. ERROR [platforms__posix__px4_layer] krait update param 646 failed
    3. px4 starting.
    4. ERROR [muorb] Initialize Error calling the uorb fastrpc initalize method..
    5. ERROR [muorb] ERROR: FastRpcWrapper Not Initialized

    If you get errors like the above when starting px4, try

    • upgrading the Linux image
    • and updating the ADSP firmware. Also try to do this from a native Linux installation instead of a virtual machine. There have been reports where it didn’t seem to work when done in a virtual machine.
    • then rebuild the px4 software, by first completely deleting your existing Firmware repo and then recloning it as described here
    • and finally rebuild and re-run it
    • make sure the executable bit of /usr/local/qr-linux/q6-admin.sh is set:
      adb shell chmod +x /usr/local/qr-linux/q6-admin.sh

    ADSP restarts

    If the mini-dm console suddently shows a whole lot of INIT output, the ADSP side has crashed. The reasons for it are not obvious, e.g. it can be some segmentation fault, null pointer exception, etc..

    The mini-dm console output typically looks like this:

    1. [08500/02] 20:32.332 Process Sensor launched with ID=1 0130 main.c
    2. [08500/02] 20:32.337 mmpm_register: MMPM client for USM ADSP core 12 0117 UltrasoundStreamMgr_Mmpm.cpp
    3. [08500/02] 20:32.338 ADSP License DB: License validation function with id 164678 stored. 0280 adsp_license_db.cpp
    4. [08500/02] 20:32.338 AvsCoreSvc: StartSvcHandler Enter 0518 AdspCoreSvc.cpp
    5. [08500/02] 20:32.338 AdspCoreSvc: Started successfully 0534 AdspCoreSvc.cpp
    6. [08500/02] 20:32.342 DSPS INIT 0191 sns_init_dsps.c
    7. [08500/02] 20:32.342 INIT DONE 0224 sns_init_dsps.c
    8. [08500/02] 20:32.342 Sensors Init : waiting(1) 0160 sns_init_dsps.c
    9. [08500/02] 20:32.342 INIT DONE 0224 sns_init_dsps.c
    10. [08500/02] 20:32.342 THRD CREATE: Thread=0x39 Name(Hex)= 53, 4e, 53, 5f, 53, 4d, 47, 52 0186 qurt_elite_thread.cpp
    11. [08500/02] 20:32.343 THRD CREATE: Thread=0x38 Name(Hex)= 53, 4e, 53, 5f, 53, 41, 4d, 0 0186 qurt_elite_thread.cpp
    12. [08500/02] 20:32.343 THRD CREATE: Thread=0x37 Name(Hex)= 53, 4e, 53, 5f, 53, 43, 4d, 0 0186 qurt_elite_thread.cpp
    13. [08500/02] 20:32.343 THRD CREATE: Thread=0x35 Name(Hex)= 53, 4e, 53, 5f, 50, 4d, 0, 0 0186 qurt_elite_thread.cpp
    14. [08500/02] 20:32.343 THRD CREATE: Thread=0x34 Name(Hex)= 53, 4e, 53, 5f, 53, 53, 4d, 0 0186 qurt_elite_thread.cpp
    15. [08500/02] 20:32.343 THRD CREATE: Thread=0x33 Name(Hex)= 53, 4e, 53, 5f, 44, 45, 42, 55 0186 qurt_elite_thread.cpp
    16. [08500/02] 20:32.343 Sensors Init : ///////////init once completed/////////// 0169 sns_init_dsps.c
    17. [08500/02] 20:32.342 loading BLSP configuration 0189 blsp_config.c
    18. [08500/02] 20:32.343 Sensors DIAG F3 Trace Buffer Initialized 0260 sns_init_dsps.c
    19. [08500/02] 20:32.345 INIT DONE 0224 sns_init_dsps.c
    20. [00053/03] 20:32.345 Unsupported algorithm service id 0 0953 sns_scm_ext.c
    21. [08500/02] 20:32.346 INIT DONE 0224 sns_init_dsps.c
    22. [08500/02] 20:32.347 INIT DONE 0224 sns_init_dsps.c
    23. [08500/02] 20:32.347 INIT DONE 0224 sns_init_dsps.c
    24. [08500/02] 20:32.546 HAP:159:unable to open the specified file path 0167 file.c
    25. [08500/04] 20:32.546 failed to open /usr/share/data/adsp/blsp.config 0204 blsp_config.c
    26. [08500/04] 20:32.546 QDSP6 Main.c: blsp_config_load() failed 0261 main.c
    27. [08500/02] 20:32.546 Loaded default UART-BAM mapping 0035 blsp_config.c
    28. [08500/02] 20:32.546 UART tty-1: BAM-9 0043 blsp_config.c
    29. [08500/02] 20:32.546 UART tty-2: BAM-6 0043 blsp_config.c
    30. [08500/02] 20:32.546 UART tty-3: BAM-8 0043 blsp_config.c
    31. [08500/02] 20:32.546 UART tty-4: BAM-2 0043 blsp_config.c
    32. [08500/02] 20:32.546 UART tty-5: BAM N/A 0048 blsp_config.c
    33. [08500/02] 20:32.546 UART tty-6: BAM N/A 0048 blsp_config.c
    34. [08500/02] 20:32.547 HAP:111:cannot find /oemconfig.so 0141 load.c
    35. [08500/03] 20:32.547 HAP:4211::error: -1: 0 == dynconfig_init(&conf, "security") 0696 sigverify.c
    36. [08500/02] 20:32.548 HAP:76:cannot find /voiceproc_tx.so 0141 load.c
    37. [08500/02] 20:32.550 HAP:76:cannot find /voiceproc_rx.so 0141 load.c

    Do I have a P1 or P2 board?

    The silkscreen on the Snapdragon reads something like:

    1. 1DN14-25-
    2. H9550-P1
    3. REV A
    4. QUALCOMM

    If you see H9550, it means you have a P2 board!

    Please ignore that it says -P1.

    Presumably P1 boards don’t have a factory partition/image and therefore can’t be restored to factory state.