Skip to content

Commit

Permalink
basic it builds for cerb
Browse files Browse the repository at this point in the history
  • Loading branch information
jr1221 committed Aug 7, 2024
1 parent fdfdca7 commit e3e251e
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add_subdirectory(general)
add_subdirectory(middleware)
add_subdirectory(platforms)
21 changes: 21 additions & 0 deletions general/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
add_library(embedded_base_general
STATIC
#${CMAKE_CURRENT_LIST_DIR}/src/ads131m04.c
#${CMAKE_CURRENT_LIST_DIR}/src/lsm6dso.c
#${CMAKE_CURRENT_LIST_DIR}/src/LTC4015.c
#${CMAKE_CURRENT_LIST_DIR}/src/ltc68041.c
${CMAKE_CURRENT_LIST_DIR}/src/m24c32.c
${CMAKE_CURRENT_LIST_DIR}/src/max7314.c
#${CMAKE_CURRENT_LIST_DIR}/src/mcp23008.c
${CMAKE_CURRENT_LIST_DIR}/src/pca9539.c
${CMAKE_CURRENT_LIST_DIR}/src/pi4ioe.c
${CMAKE_CURRENT_LIST_DIR}/src/sht30.c
${CMAKE_CURRENT_LIST_DIR}/src/vl6180x_api.c
${CMAKE_CURRENT_LIST_DIR}/src/vl6180x_i2c.c
)

target_include_directories(embedded_base_general
PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
)
target_link_libraries(embedded_base_general PRIVATE stm32cubemx)
15 changes: 15 additions & 0 deletions middleware/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
add_library(embedded_base_middleware
STATIC
${CMAKE_CURRENT_LIST_DIR}/src/c_utils.c
#${CMAKE_CURRENT_LIST_DIR}/src/eepromdirectory.c
${CMAKE_CURRENT_LIST_DIR}/src/pid.c
${CMAKE_CURRENT_LIST_DIR}/src/ringbuffer.c
${CMAKE_CURRENT_LIST_DIR}/src/timer.c
)

target_include_directories(embedded_base_middleware
PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
)

target_link_libraries(embedded_base_middleware stm32cubemx)
7 changes: 7 additions & 0 deletions platforms/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if (STM32F405xx)
add_subdirectory(stm32f405)
elseif(STM32G431xx)
add_subdirectory(stm32g431)
else()
message("No STM definition found!")
endif()
12 changes: 12 additions & 0 deletions platforms/stm32f405/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

add_library(embedded_base_platform
STATIC
${CMAKE_CURRENT_LIST_DIR}/src/can.c
)

target_include_directories(embedded_base_platform
PUBLIC
${CMAKE_CURRENT_LIST_DIR}/include
)

target_link_libraries(embedded_base_platform PRIVATE embedded_base_middleware)

0 comments on commit e3e251e

Please sign in to comment.