diff --git a/app/rev2/Makefile b/app/rev2/Makefile index fc105fea..c0b96861 100644 --- a/app/rev2/Makefile +++ b/app/rev2/Makefile @@ -85,7 +85,8 @@ $(MOD_DIR)/error_sdr/error_sdr.c \ $(MOD_DIR)/math_sdr/math_sdr.c \ $(DRIVER_DIR)/flash/flash.c \ $(DRIVER_DIR)/ignition/ignition.c \ -$(DRIVER_DIR)/imu/imu.c \ +$(DRIVER_DIR)/imu/imu_dflt.c \ +$(DRIVER_DIR)/imu/imu_legacy.c \ $(DRIVER_DIR)/led/led.c \ $(DRIVER_DIR)/lora/lora.c \ $(MOD_DIR)/sensor/sensor.c \ diff --git a/app/rev3/Makefile b/app/rev3/Makefile index 7bff3b26..4baa6c40 100644 --- a/app/rev3/Makefile +++ b/app/rev3/Makefile @@ -46,6 +46,10 @@ main.c \ $(INIT_DIR)/config/Src/stm32h7xx_it.c \ $(INIT_DIR)/config/Src/stm32h7xx_hal_msp.c \ $(MOD_DIR)/error_sdr/error_sdr.c \ +$(MOD_DIR)/debug_sdr/debug_sdr.c \ +$(DRIVER_DIR)/imu/imu_dflt.c \ +$(DRIVER_DIR)/imu/imu_lsm.c \ +$(DRIVER_DIR)/timer/timer.c \ $(DRIVER_DIR)/led/led.c \ $(DRIVER_DIR)/lora/lora.c \ $(DRIVER_DIR)/usb/USB_DEVICE/App/usb_device.c \ @@ -98,6 +102,7 @@ $(LIB_DIR)/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c \ $(LIB_DIR)/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c \ $(LIB_DIR)/Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ioreq.c \ $(LIB_DIR)/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c \ +$(LIB_DIR)/lsm6dsv320x-pid/lsm6dsv320x_reg.c \ $(INIT_DIR)/config/Src/sysmem.c \ $(INIT_DIR)/config/Src/syscalls.c @@ -165,7 +170,9 @@ AS_INCLUDES = C_INCLUDES = \ -I. \ -I$(MOD_DIR)/error_sdr \ +-I$(MOD_DIR)/debug_sdr \ -I$(MOD_DIR)/math_sdr \ +-I$(DRIVER_DIR)/imu \ -I$(DRIVER_DIR)/led \ -I$(DRIVER_DIR)/lora \ -I$(DRIVER_DIR)/flash \ @@ -174,6 +181,7 @@ C_INCLUDES = \ -I$(DRIVER_DIR)/usb/USB_DEVICE/Target \ -I$(DRIVER_DIR)/gps \ -I$(DRIVER_DIR)/buzzer \ +-I$(DRIVER_DIR)/timer \ -I$(INIT_DIR)/config/Inc \ -I$(LIB_DIR) \ -I$(LIB_DIR)/Drivers/STM32H7xx_HAL_Driver/Inc \ @@ -181,7 +189,8 @@ C_INCLUDES = \ -I$(LIB_DIR)/Middlewares/ST/STM32_USB_Device_Library/Core/Inc \ -I$(LIB_DIR)/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc \ -I$(LIB_DIR)/Drivers/CMSIS/Device/ST/STM32H7xx/Include \ --I$(LIB_DIR)/Drivers/CMSIS/Include +-I$(LIB_DIR)/Drivers/CMSIS/Include \ +-I$(LIB_DIR)/lsm6dsv320x-pid/ # compile gcc flags diff --git a/app/rev3/STM32H733XG_FLASH.ld b/app/rev3/STM32H733XG_FLASH.ld index df7c2e4c..75abca9d 100644 --- a/app/rev3/STM32H733XG_FLASH.ld +++ b/app/rev3/STM32H733XG_FLASH.ld @@ -205,6 +205,18 @@ SECTIONS libm.a ( * ) libgcc.a ( * ) } + + /* + * DMA-safe buffers in D2 SRAM (0x30000000). DTCM is unreachable by DMA1/DMA2. + * 32-byte alignment prevents L1 D-Cache coherency corruption. + * Usage: __ALIGNED(32) __attribute__((section(".dma_buffer"))) + */ + .dma_buffer (NOLOAD) : + { + . = ALIGN(32); + *(.dma_buffer) + . = ALIGN(32); + } >RAM_D2 } diff --git a/driver b/driver index 42a63d0f..2a5de224 160000 --- a/driver +++ b/driver @@ -1 +1 @@ -Subproject commit 42a63d0fda862aa673b210b20bf40402efcf655b +Subproject commit 2a5de224c17f6e842f6eb95313b7453b883ce7f0 diff --git a/lib b/lib index 329661c2..2a0e5f11 160000 --- a/lib +++ b/lib @@ -1 +1 @@ -Subproject commit 329661c209c264c96f162741d5776e7433ee4fa9 +Subproject commit 2a0e5f11d4e86a5d74690f9fdaf198f03b9af8d9 diff --git a/test/app/rev2/main/Makefile b/test/app/rev2/main/Makefile index 8121a0ce..42ea4b20 100644 --- a/test/app/rev2/main/Makefile +++ b/test/app/rev2/main/Makefile @@ -110,7 +110,7 @@ C_DEFS = \ -DSTM32H750xx \ -DFLIGHT_COMPUTER \ -DUNIT_TEST \ --DA0002_REV1 +-DA0002_REV2 CFLAGS = $(C_INCLUDES) $(C_DEFS) $(OPT) -Wall -g