516016efb9
Wait for every navigation-ready tracking channel in a GPS epoch, remove unlocked channels without a timeout, and keep late joins for the next epoch. Reset PLIC ownership during warm initialization and extend Linux synthetic, integrity, and fake-MMIO regression coverage.
92 lines
2.8 KiB
Makefile
92 lines
2.8 KiB
Makefile
TARGET := gps_system
|
|
|
|
# Keep the standalone app build observable on the board. The board and parent
|
|
# software Makefiles already pass these values, but a direct `make` in this
|
|
# directory previously compiled every GPS_LOG call out and produced a silent
|
|
# UART image.
|
|
GPS_DEBUG ?= 1
|
|
GPS_DEBUG_LEVEL ?= 4
|
|
|
|
# The current Genesys2 Rocket/fabric domain that clocks the UART is 50 MHz.
|
|
# Keep the requested 115200 baud physical rather than producing 57600 baud
|
|
# with the common 100 MHz fallback divider.
|
|
BSP_UART_CLOCK_HZ ?= 50000000
|
|
|
|
# Select one sensor backend, or keep the default read-only WHO_AM_I probe.
|
|
# Accepted values: auto, tdk, st (stm is an alias for st).
|
|
IMU_SENSOR ?= auto
|
|
ifeq ($(IMU_SENSOR),auto)
|
|
IMU_DRIVER_SRCS := src/drivers/imu/tdk_icm42688.c src/drivers/imu/st_lsm6dsox.c
|
|
IMU_BACKEND_CFLAG := -DIMU_SENSOR_BUILD_AUTO=1
|
|
else ifeq ($(IMU_SENSOR),tdk)
|
|
IMU_DRIVER_SRCS := src/drivers/imu/tdk_icm42688.c
|
|
IMU_BACKEND_CFLAG := -DIMU_SENSOR_BUILD_TDK=1
|
|
else ifeq ($(IMU_SENSOR),st)
|
|
IMU_DRIVER_SRCS := src/drivers/imu/st_lsm6dsox.c
|
|
IMU_BACKEND_CFLAG := -DIMU_SENSOR_BUILD_ST=1
|
|
else ifeq ($(IMU_SENSOR),stm)
|
|
IMU_DRIVER_SRCS := src/drivers/imu/st_lsm6dsox.c
|
|
IMU_BACKEND_CFLAG := -DIMU_SENSOR_BUILD_ST=1
|
|
else
|
|
$(error IMU_SENSOR must be auto, tdk, st or stm)
|
|
endif
|
|
|
|
# A non-zero value is a sensor-independent target. The common layer accepts
|
|
# only a hardware ODR within 5%; thus 200 selects 200 Hz on TDK and the real
|
|
# 208 Hz setting on LSM6DSOX. Zero keeps the backend default.
|
|
ifdef TDK_IMU_ODR_HZ
|
|
IMU_ODR_HZ ?= $(TDK_IMU_ODR_HZ)
|
|
else
|
|
IMU_ODR_HZ ?= 50
|
|
endif
|
|
IMU_ACCEL_FS_G ?= 0
|
|
IMU_GYRO_FS_DPS ?= 0
|
|
GPS_ESKF_ENABLE ?= 1
|
|
|
|
APP_SRCS := \
|
|
gps_system.c \
|
|
src/gps/gps_receiver.c \
|
|
src/imu/imu_calibration.c \
|
|
src/imu/imu_sensor.c \
|
|
src/adapters/imu_fusion_profile.c \
|
|
src/adapters/gps_system_uart.c \
|
|
$(IMU_DRIVER_SRCS) \
|
|
src/fusion/eskf.c \
|
|
src/fusion/fusion_motion.c \
|
|
src/fusion/fusion_rest_detector.c \
|
|
src/fusion/fusion_engine.c \
|
|
src/fusion/fusion_gps_adapter.c \
|
|
src/fusion/navigation_fusion.c \
|
|
src/adapters/gps_fusion_publisher.c \
|
|
src/gps/gps_ip.c \
|
|
src/gps/gps_interrupt_handlers.c \
|
|
src/gps/gps_time_anchor.c \
|
|
src/gps/gps_nav_epoch.c \
|
|
src/gps/gps_pps.c \
|
|
src/gps/linked_list.c \
|
|
src/gps/NavEquations.c \
|
|
src/gps/matrixLib.c
|
|
|
|
BSP_SRCS := init.c uart.c plic.c irq.c spi_flash.c pmod_spi.c
|
|
|
|
GPS_NAV_SOLVE_TIMER_TICKS ?= 10
|
|
|
|
include ../common/app.mk
|
|
|
|
CFLAGS += -Iheader
|
|
CFLAGS += $(IMU_BACKEND_CFLAG) \
|
|
-DIMU_ODR_HZ=$(IMU_ODR_HZ) \
|
|
-DIMU_ACCEL_FS_G=$(IMU_ACCEL_FS_G) \
|
|
-DIMU_GYRO_FS_DPS=$(IMU_GYRO_FS_DPS) \
|
|
-DGPS_ESKF_ENABLE=$(GPS_ESKF_ENABLE) \
|
|
-DGPS_NAV_SOLVE_TIMER_TICKS=$(GPS_NAV_SOLVE_TIMER_TICKS)
|
|
LDLIBS += -lm
|
|
|
|
ifeq ($(GPS_DEBUG),1)
|
|
CFLAGS += -DDEBUG -DGPS_DEBUG_LEVEL=$(GPS_DEBUG_LEVEL)
|
|
endif
|
|
|
|
ifeq ($(GPS_NAV_DIAGNOSTICS),1)
|
|
CFLAGS += -DGPS_NAV_JUMP_DIAGNOSTICS=1
|
|
endif
|