diff --git a/firmware/config/stm32h7ems/chconf.h b/firmware/config/stm32h7ems/chconf.h index d09fe9ab5f..6912341719 100644 --- a/firmware/config/stm32h7ems/chconf.h +++ b/firmware/config/stm32h7ems/chconf.h @@ -535,7 +535,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_SYSTEM_STATE_CHECK) -#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#define CH_DBG_SYSTEM_STATE_CHECK TRUE #endif /** @@ -546,7 +546,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_CHECKS) -#define CH_DBG_ENABLE_CHECKS FALSE +#define CH_DBG_ENABLE_CHECKS TRUE #endif /** @@ -558,7 +558,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_ASSERTS) -#define CH_DBG_ENABLE_ASSERTS FALSE +#define CH_DBG_ENABLE_ASSERTS TRUE #endif /** diff --git a/firmware/config/stm32h7ems/efifeatures.h b/firmware/config/stm32h7ems/efifeatures.h index 7891f85599..421f930693 100644 --- a/firmware/config/stm32h7ems/efifeatures.h +++ b/firmware/config/stm32h7ems/efifeatures.h @@ -11,6 +11,33 @@ #undef EFI_INTERNAL_FLASH #define EFI_INTERNAL_FLASH FALSE +#undef EFI_FILE_LOGGING +#define EFI_FILE_LOGGING FALSE + +#undef EFI_MC33816 +#define EFI_MC33816 FALSE + +#undef EFI_CAN_SUPPORT +#define EFI_CAN_SUPPORT FALSE + +#undef EFI_CJ125 +#define EFI_CJ125 FALSE + +// todo: our "DMA-half" ChibiOS patch not implemented for USARTv2/STM32H7 +#undef TS_UART_DMA_MODE +#define TS_UART_DMA_MODE FALSE + +#undef PRIMARY_UART_DMA_MODE +#define PRIMARY_UART_DMA_MODE FALSE + +#undef TS_UART_DEVICE +//#define TS_UART_DEVICE (&UARTD3) + +#undef EFI_CONSOLE_UART_DEVICE + +#undef EFI_UART_GPS +#define EFI_UART_GPS FALSE + #undef BOARD_TLE6240_COUNT #undef BOARD_MC33972_COUNT #undef BOARD_TLE8888_COUNT diff --git a/firmware/config/stm32h7ems/mcuconf.h b/firmware/config/stm32h7ems/mcuconf.h index b09f5def5d..9176de5a2d 100644 --- a/firmware/config/stm32h7ems/mcuconf.h +++ b/firmware/config/stm32h7ems/mcuconf.h @@ -370,7 +370,7 @@ #define STM32_SERIAL_USE_USART3 FALSE #define STM32_SERIAL_USE_UART4 FALSE #define STM32_SERIAL_USE_UART5 FALSE -#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USE_USART6 TRUE #define STM32_SERIAL_USE_UART7 FALSE #define STM32_SERIAL_USE_UART8 FALSE #define STM32_SERIAL_USE_LPUART1 FALSE diff --git a/firmware/controllers/can/can.h b/firmware/controllers/can/can.h index 351dc00501..e8d22654e7 100644 --- a/firmware/controllers/can/can.h +++ b/firmware/controllers/can/can.h @@ -19,7 +19,10 @@ class Logging; class CanSensorBase; +#if EFI_CAN_SUPPORT void processCanRxMessage(const CANRxFrame& msg, Logging* logger, efitick_t nowNt); +#endif // EFI_CAN_SUPPORT + void registerCanSensor(CanSensorBase& sensor); // Indicate that an ack response was received from the wideband bootloader diff --git a/firmware/hw_layer/drivers/can/can_msg_tx.h b/firmware/hw_layer/drivers/can/can_msg_tx.h index d15aa3cdd4..ea907edfac 100644 --- a/firmware/hw_layer/drivers/can/can_msg_tx.h +++ b/firmware/hw_layer/drivers/can/can_msg_tx.h @@ -35,11 +35,12 @@ public: */ ~CanTxMessage(); +#if EFI_CAN_SUPPORT /** * Configures the device for all messages to transmit from. */ static void setDevice(CANDriver* device); - +#endif // EFI_CAN_SUPPORT /** * @brief Read & write the raw underlying 8-byte buffer. */ @@ -56,10 +57,14 @@ public: void setBit(size_t byteIdx, size_t bitIdx); protected: +#if EFI_CAN_SUPPORT CANTxFrame m_frame; +#endif // EFI_CAN_SUPPORT private: +#if EFI_CAN_SUPPORT static CANDriver* s_device; +#endif // EFI_CAN_SUPPORT }; /** @@ -68,11 +73,14 @@ private: template class CanTxTyped final : public CanTxMessage { +#if EFI_CAN_SUPPORT static_assert(sizeof(TData) == sizeof(CANTxFrame::data8)); +#endif // EFI_CAN_SUPPORT public: explicit CanTxTyped(uint32_t eid) : CanTxMessage(eid) { } +#if EFI_CAN_SUPPORT /** * Access members of the templated type. * @@ -87,6 +95,7 @@ public: TData& get() { return *reinterpret_cast(&m_frame.data8); } +#endif // EFI_CAN_SUPPORT }; template