Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/rev2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
11 changes: 10 additions & 1 deletion app/rev3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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 \
Expand All @@ -174,14 +181,16 @@ 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 \
-I$(LIB_DIR)/Drivers/STM32H7xx_HAL_Driver/Inc/Legacy \
-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
Expand Down
12 changes: 12 additions & 0 deletions app/rev3/STM32H733XG_FLASH.ld

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to confirm that there's no startup script modifications required to get data to be properly placed in this region. This might also be something we'll want to modify through the .ioc for parity. I'm happy enough with this to accept for now, but it'll need follow-on when we get to integration.

Ref: SunDevilRocketry/Ground-Station-Firmware#7

@MasterUser43 MasterUser43 Jun 30, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure the NOLOAD saves any need for modification. Only worst concern would be .ioc & MPU cache config for RAM_D2.

Original file line number Diff line number Diff line change
Expand Up @@ -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

}

Expand Down
2 changes: 1 addition & 1 deletion driver
Submodule driver updated 6 files
+52 −499 imu/imu.h
+204 −0 imu/imu_dflt.c
+298 −389 imu/imu_legacy.c
+548 −0 imu/imu_legacy.h
+1,720 −0 imu/imu_lsm.c
+493 −0 imu/imu_lsm.h
2 changes: 1 addition & 1 deletion lib
2 changes: 1 addition & 1 deletion test/app/rev2/main/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ C_DEFS = \
-DSTM32H750xx \
-DFLIGHT_COMPUTER \
-DUNIT_TEST \
-DA0002_REV1
-DA0002_REV2

CFLAGS = $(C_INCLUDES) $(C_DEFS) $(OPT) -Wall -g

Expand Down
Loading