Skip to content

Commit

Permalink
it builds with stm style lib (no cerb_lib_
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Aug 7, 2024
1 parent 765e0b9 commit bbbd815
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 28 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set(CMAKE_C_EXTENSIONS ON)

# Define the build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release") # ***
set(CMAKE_BUILD_TYPE "Release")
endif()

# Set the project name
Expand All @@ -37,11 +37,11 @@ message("Build type: " ${CMAKE_BUILD_TYPE})
# Create an executable object type
add_executable(${CMAKE_PROJECT_NAME})

# set the version for cmake based checking
set(STM32F405xx "ON")

# Add STM32CubeMX generated sources
add_subdirectory(cmake/stm32cubemx)
add_subdirectory(Core)
add_subdirectory(Drivers/Embedded-Base)


Expand All @@ -68,6 +68,5 @@ target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE
# Add linked libraries
target_link_libraries(${CMAKE_PROJECT_NAME}
stm32cubemx
cerb_lib
# Add user defined libraries
)
22 changes: 0 additions & 22 deletions Core/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion Drivers/Embedded-Base
Submodule Embedded-Base updated 62 files
+1 −1 CMakeLists.txt
+11 −0 drivers/CMakeLists.txt
+14 −0 drivers/ads131m04/CMakeLists.txt
+99 −0 drivers/ads131m04/ads131m04.c
+18 −0 drivers/ads131m04/ads131m04.h
+12 −0 drivers/lsm6dso/CMakeLists.txt
+172 −0 drivers/lsm6dso/lsm6dso.c
+119 −0 drivers/lsm6dso/lsm6dso.h
+12 −0 drivers/ltc4015/CMakeLists.txt
+65 −0 drivers/ltc4015/LTC4015.c
+104 −0 drivers/ltc4015/LTC4015.h
+12 −0 drivers/ltc68041/CMakeLists.txt
+1,323 −0 drivers/ltc68041/ltc68041.c
+221 −0 drivers/ltc68041/ltc68041.h
+12 −0 drivers/m24c32/CMakeLists.txt
+63 −0 drivers/m24c32/m24c32.c
+19 −0 drivers/m24c32/m24c32.h
+12 −0 drivers/max7314/CMakeLists.txt
+155 −0 drivers/max7314/max7314.c
+63 −0 drivers/max7314/max7314.h
+12 −0 drivers/mcp23008/CMakeLists.txt
+35 −0 drivers/mcp23008/mcp23008.c
+19 −0 drivers/mcp23008/mcp23008.h
+12 −0 drivers/pca9539/CMakeLists.txt
+71 −0 drivers/pca9539/pca9539.c
+61 −0 drivers/pca9539/pca9539.h
+12 −0 drivers/pi4ioe/CMakeLists.txt
+71 −0 drivers/pi4ioe/pi4ioe.c
+52 −0 drivers/pi4ioe/pi4ioe.h
+16 −0 drivers/port_header/stm32xx_hal.h
+12 −0 drivers/sht30/CMakeLists.txt
+115 −0 drivers/sht30/sht30.c
+71 −0 drivers/sht30/sht30.h
+13 −0 drivers/vl6180x/CMakeLists.txt
+2,769 −0 drivers/vl6180x/vl6180x_api.c
+1,019 −0 drivers/vl6180x/vl6180x_api.h
+119 −0 drivers/vl6180x/vl6180x_cfg.h
+773 −0 drivers/vl6180x/vl6180x_def.h
+261 −0 drivers/vl6180x/vl6180x_i2c.c
+166 −0 drivers/vl6180x/vl6180x_i2c.h
+312 −0 drivers/vl6180x/vl6180x_platform.h
+104 −0 drivers/vl6180x/vl6180x_types.h
+6 −15 middleware/CMakeLists.txt
+9 −0 middleware/c_utils/CMakeLists.txt
+21 −0 middleware/c_utils/c_utils.c
+21 −0 middleware/c_utils/c_utils.h
+11 −0 middleware/eepromdirectory/CMakeLists.txt
+115 −0 middleware/eepromdirectory/eepromdirectory.c
+63 −0 middleware/eepromdirectory/eepromdirectory.h
+11 −0 middleware/i2c_utility/CMakeLists.txt
+158 −0 middleware/i2c_utility/i2c_utility.c
+50 −0 middleware/i2c_utility/i2c_utility.h
+11 −0 middleware/pid/CMakeLists.txt
+67 −0 middleware/pid/pid.c
+52 −0 middleware/pid/pid.h
+9 −0 middleware/ringbuffer/CMakeLists.txt
+89 −0 middleware/ringbuffer/ringbuffer.c
+24 −0 middleware/ringbuffer/ringbuffer.h
+11 −0 middleware/timer/CMakeLists.txt
+34 −0 middleware/timer/timer.c
+45 −0 middleware/timer/timer.h
+2 −3 platforms/stm32f405/CMakeLists.txt
22 changes: 20 additions & 2 deletions cmake/stm32cubemx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,33 @@ target_sources(stm32cubemx INTERFACE
../../Core/Src/sysmem.c
../../Core/Src/syscalls.c
../../startup_stm32f405xx.s

# NER
../../Core/Src/bms.c
../../Core/Src/can_handler.c
../../Core/Src/dti.c
../../Core/Src/fault.c
../../Core/Src/monitor.c
../../Core/Src/mpu.c
../../Core/Src/nero.c
../../Core/Src/pdu.c
../../Core/Src/serial_monitor.c
../../Core/Src/state_machine.c
../../Core/Src/steeringio.c
../../Core/Src/torque.c
)

target_link_directories(stm32cubemx INTERFACE
)

target_link_libraries(stm32cubemx INTERFACE
embedded_base_general
embedded_base_platform
embedded_base_middleware
middleware_ringbuffer
middleware_timer
middleware_c_utils
driver_sht30
driver_lsm6dso
driver_pca9539
)

# Validate that STM32CubeMX code is compatible with C standard
Expand Down

0 comments on commit bbbd815

Please sign in to comment.