Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Require CMake minimum 3.27 version for utility function availablility
  • Loading branch information
steffen.yount committed Sep 22, 2025
commit 8bafd7813c63fff67c28802982ae8b9b2f429fd2
9 changes: 9 additions & 0 deletions src/rp2_common/pico_platform_sections/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ endif()
# TARGET that match either an optionally specified list of source files or all the target's "SOURCES" found
# within in the target's "SOURCE_DIR".
#
# This utility function is only available in builds using CMake 3.27 and later.
#
# Examples:
# pico_sections_time_critical(MyTarget)
#
Expand All @@ -22,6 +24,8 @@ endif()
# \param\ TARGET The build target
# \param\ SOURCES Optional, source files of the object files to be modified. If not specified, uses the build
# target's "SOURCES" list.
#
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.27)
function(pico_sections_time_critical TARGET)
add_custom_command(
TARGET ${TARGET}
Expand All @@ -33,6 +37,7 @@ function(pico_sections_time_critical TARGET)
COMMAND_EXPAND_LISTS
)
endfunction()
endif()

# pico_sections_not_in_flash(TARGET [SOURCES])
# \brief\ Prefix target's object file sections with ".time_critical_ram"
Expand All @@ -41,6 +46,8 @@ endfunction()
# TARGET that match either an optionally specified list of source files or all the target's "SOURCES" found
# within in the target's "SOURCE_DIR".
#
# This utility function is only available in builds using CMake 3.27 and later.
#
# Examples:
# pico_sections_not_in_flash(MyTarget)
#
Expand All @@ -52,6 +59,7 @@ endfunction()
# \param\ TARGET The build target
# \param\ SOURCES Optional, source files of the object files to be modified. If not specified, uses the build
# target's "SOURCES" list.
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.27)
function(pico_sections_not_in_flash TARGET)
add_custom_command(
TARGET ${TARGET}
Expand All @@ -63,3 +71,4 @@ function(pico_sections_not_in_flash TARGET)
COMMAND_EXPAND_LISTS
)
endfunction()
endif()