The folder contains multiple code examples, showcasing key features of the modules and services available on the XPLR-HPG-1 and XPLR-HPG-2 kits. They can be used as quick-start guides to help you kick-off your next u-blox powered project.
Working with any of the examples provided requires editing a single line in CMakeLists.txt to select a project to build.
Individual build instructions are provided under all example folders.
In general, building any of the provided projects, involves the following steps:
- Clone the XPLR-HPG repository and update included submodules.
- Navigate to
XPLR-HPG-SW
folder andOpen with Code
(or open the ```VS code `` app and open the folder from the app menu). - Open the CMakeLists.txt located in the root of the workspace.
- Select the example you wish to build by activating the corresponding
set(ENV{XPLR_HPG_PROJECT} <example_name>)
command. - Run
MenuConfig
using either the "cog" symbol present in the Status bar or by opening the command palette (Ctrl+Shift+P
) and typingESP-IDF:SDK Configuration editor (menuconfig)
. - Check / Edit the current configuration according to your needs.
- Click
Save
and thenBuild, Flash and Monitor
the project to the MCU using the "flame" icon.
NOTE: Remember, only one project(<example_name>)
and its corresponding include path "$ENV{XPLR_HPG_SW_PATH}/examples/<module>/<example>"
can be active at a time!
Several examples offer the option to be configured via a json file in the SD card.
When the board boots and the main application starts a check is performed for the presence of the xplr_config.json file in the SD card.
If the check fails for any reason (SD not present, file not found, etc) the board keeps the values of the Kconfig configuration.
Otherwise, the configuration options are parsed and applied, overriding the Kconfig values.
NOTES:
- If the xplr_config.json exists in the SD card and a fail occurs during the parsing of the configuration options then the application reaches an error state (does not fall back to Kconfig values). So it advised to have the xplr_config.json file in the SD card only if the configuration via the SD is the preferred method of configuration (and not the Kconfig via the menuconfig).
- The configuration options are applied in the beginning of the application and there is no update during the runtime (if for example an SD is inserted containing a xplr_config.json file with different configuration). So if an update to configuration options is needed a system reboot is necessary.
- No configuration options are saved between different boots of the board. If the board is set up via the SD, the SD is then removed and a reboot event occurs, all configuration options are lost and the board must be reconfigured (either via Kconfig or via the SD card).
The examples/applications that support this functionality are:
- Short Range :
- Positioning :
- Cellular :