DEMO: Pixhawk-4 GPS Module with Zephyr

Introduction

This tutorial describes how to operate the Pixhawk-4 GPS Module (Ublox M8N) with Zephyr on FMURT6 board.

Items Needed

Hardware Procedure

Zephyr Software Procedure

Initialize west workspace and checkout branch

west init -m git@github.com:NXPHoverGames/Zephyr.git zephyrproject
cd zephyrproject
west update
cd zephyr
git checkout pr-gps-fmurt6

Building and Flashing

west build -b mimxrt1062_fmurt6 samples/drivers/neo_m8 -p
west flash

Error Handling

  1. if you get the following error (or similar): "fatal error: command exited with status 1: /opt/segger/jlink_v788a/jlinkexe -nogui 1 -if swd -speed auto -device 'mimxrt1062xxx6a?bankaddr=0x60000000&loader=hyperflash' -commanderscript /tmp/tmpgcx4mnhnjlink/runner.jlink -nogui 1", then simply run west flash again. Or unplug the board, then re-plug it. And then flash again.

  2. if you get the following error: "fatal error: required program jlinkexe not found; install it or add its location to path", then download and install jlink from here, and add its folder to the path using the following command: set PATH=%PATH%;<path to Jlink.exe>

    • Note: this command only modifies the PATH variable for the current session.

Running and Demonstration

Key Notes

  • If any configuration API returns NACK (which can be seen from the debug logs), then it's recommended to run the application again.

  • The reception of GPS data from the Pixhawk-4 GPS Module depends on the location of operation. According to our testing, this module doesn't work indoors, but only outdoors, or rooms with at least one open window.

  • We may need to wait 3-5 minutes before our GPS module is able to receive data. As shown in 'Logs From Testing on GPS Module 2 (Success)', the module first senses the data on the 280th function call, but after that returns the correct data consistently. According to our observations, the 'GPS Fix' Indicator LED will start blinking when GPS signals are available.

Logs

Last updated