From cb8e597a19f4b3e83199c3f646c90ac6a9808760 Mon Sep 17 00:00:00 2001 From: Matt M Date: Mon, 2 Oct 2023 21:30:40 -0400 Subject: [PATCH] Fix things, maybe --- .gitignore | 5 +- common/system/CMakeLists.txt | 2 +- desktop_projects/desktop_sim/.cproject | 2 +- stm32_projects/device_drivers/CMakeLists.txt | 53 ++++++++++---------- stm32_projects/device_drivers/mag_iis2mdc.h | 4 +- 5 files changed, 34 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index dc327107..efd35a42 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,7 @@ git_info.h # Platformio stuff .pio/ cmake-build* -CMakeListsPrivate.txt \ No newline at end of file +CMakeListsPrivate.txt +build_stm32/ +build/* +build_desktop/* diff --git a/common/system/CMakeLists.txt b/common/system/CMakeLists.txt index 2e3c9003..47b38794 100644 --- a/common/system/CMakeLists.txt +++ b/common/system/CMakeLists.txt @@ -53,5 +53,5 @@ set(SYSTEM_INCLUDE_DIRS if (PROJECT_BUILD_TYPE MATCHES "stm32") message("Adding CMSIS DSP") set(CMSIS_DSP_INC ${CMAKE_CURRENT_SOURCE_DIR}/cmsis CACHE INTERNAL "") - set(STM_HARDWARE_MANAGER ${CMAKE_CURRENT_SOURCE_DIR}/hardware_manager.c CACHE INTERNAL "") + set(STM_HARDWARE_MANAGER ${CMAKE_CURRENT_SOURCE_DIR}/hardware_manager.cpp CACHE INTERNAL "") endif () diff --git a/desktop_projects/desktop_sim/.cproject b/desktop_projects/desktop_sim/.cproject index c93596e9..52c67a6c 100644 --- a/desktop_projects/desktop_sim/.cproject +++ b/desktop_projects/desktop_sim/.cproject @@ -46,7 +46,7 @@ - + diff --git a/stm32_projects/device_drivers/CMakeLists.txt b/stm32_projects/device_drivers/CMakeLists.txt index 5312f74a..10a76fc1 100644 --- a/stm32_projects/device_drivers/CMakeLists.txt +++ b/stm32_projects/device_drivers/CMakeLists.txt @@ -1,32 +1,31 @@ set(STM32_DEVICE_DRIVERS_SRCS - ${CMAKE_CURRENT_SOURCE_DIR}/accel_h3lis331dl.c - ${CMAKE_CURRENT_SOURCE_DIR}/adc_device.c - ${CMAKE_CURRENT_SOURCE_DIR}/adc_mcp3564.c - ${CMAKE_CURRENT_SOURCE_DIR}/barometer_ms5607.c - ${CMAKE_CURRENT_SOURCE_DIR}/ble_chip_nrf.c - ${CMAKE_CURRENT_SOURCE_DIR}/ble_client_std.c - ${CMAKE_CURRENT_SOURCE_DIR}/buzzer_pwm.c - ${CMAKE_CURRENT_SOURCE_DIR}/dc_motor_pwm.c - ${CMAKE_CURRENT_SOURCE_DIR}/flash_mb85rsx.c - ${CMAKE_CURRENT_SOURCE_DIR}/flash_s25flx.c - ${CMAKE_CURRENT_SOURCE_DIR}/gps.c - ${CMAKE_CURRENT_SOURCE_DIR}/hal_callbacks.c - ${CMAKE_CURRENT_SOURCE_DIR}/imu_icm20600.c - ${CMAKE_CURRENT_SOURCE_DIR}/imu_iis2mdc.c - ${CMAKE_CURRENT_SOURCE_DIR}/imu_lsm9ds1.c - ${CMAKE_CURRENT_SOURCE_DIR}/internal_flash.c - ${CMAKE_CURRENT_SOURCE_DIR}/led.c - ${CMAKE_CURRENT_SOURCE_DIR}/line_cutter_ble.c - ${CMAKE_CURRENT_SOURCE_DIR}/mag_iis2mdc.c + ${CMAKE_CURRENT_SOURCE_DIR}/accel_h3lis331dl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/adc_device.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/adc_mcp3564.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/barometer_ms5607.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ble_chip_nrf.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ble_client_std.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/buzzer_pwm.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dc_motor_pwm.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/flash_mb85rsx.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/flash_s25flx.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gps.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/hal_callbacks.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imu_icm20600.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imu_iis2mdc.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/imu_lsm9ds1.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/internal_flash.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/led.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/line_cutter_ble.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mag_iis2mdc.cpp ${CMAKE_CURRENT_SOURCE_DIR}/minmea.c - ${CMAKE_CURRENT_SOURCE_DIR}/pyro_digital.c - ${CMAKE_CURRENT_SOURCE_DIR}/radioconfig - ${CMAKE_CURRENT_SOURCE_DIR}/servo_pwm.c - ${CMAKE_CURRENT_SOURCE_DIR}/spi_driver.c - ${CMAKE_CURRENT_SOURCE_DIR}/temp_max31855.c - ${CMAKE_CURRENT_SOURCE_DIR}/ti_radio.c - ${CMAKE_CURRENT_SOURCE_DIR}/usb_std.c - ${CMAKE_CURRENT_SOURCE_DIR}/vbat_ina226.c + ${CMAKE_CURRENT_SOURCE_DIR}/pyro_digital.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/servo_pwm.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/spi_driver.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/temp_max31855.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/ti_radio.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usb_std.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/vbat_ina226.cpp CACHE INTERNAL "") set(STM32_DEVICE_DRIVERS_INCLUDE_DIRS diff --git a/stm32_projects/device_drivers/mag_iis2mdc.h b/stm32_projects/device_drivers/mag_iis2mdc.h index dcd9c88b..176ed048 100644 --- a/stm32_projects/device_drivers/mag_iis2mdc.h +++ b/stm32_projects/device_drivers/mag_iis2mdc.h @@ -28,10 +28,10 @@ typedef struct IIS2MDCCtrl_s { bool iis2mdc_init(ImuIIS2MDCCtrl_s *sensor, uint8_t address7bit); void iis2mdc_getData(ImuIIS2MDCCtrl_s *sensor); +#endif // HAL_I2C_MODULE_ENABLED + #ifdef __cplusplus } #endif -#endif // HAL_I2C_MODULE_ENABLED - #endif // STM32_PROJECTS_DEVICE_DRIVERS_MAG_IIS2MDC_H_