Skip to content

Commit

Permalink
Dont rely on hardcoded relative path to the "STM_SDK"
Browse files Browse the repository at this point in the history
  • Loading branch information
erlingrj committed Oct 29, 2024
1 parent 22b871d commit 68bd26a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion low_level_platform/api/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Rp2040")
target_link_libraries(lf-low-level-platform-api INTERFACE pico_multicore)
target_link_libraries(lf-low-level-platform-api INTERFACE pico_sync)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Stm32")
set(STM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../STM_sdk)
if(DEFINED ENV{STM_SDK_DIR})
message(STATUS "STM_SDK_DIR is set to $ENV{STM_SDK_DIR}")
else()
message(FATAL_ERROR "The STM_SDK_DIR environment variable must be set to point to the directory generated by CUBEMX for you project.")
endif()
set(STM_SDK_DIR $ENV{STM_SDK_DIR})
set(MCU_FAMILY STM32F4xx)
set(MCU_MODEL STM32F446xx)
set(CPU_PARAMETERS -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=softfp)
Expand Down

0 comments on commit 68bd26a

Please sign in to comment.