mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-29 04:20:20 +00:00
stm32-f4discovery-cc256x: create Ozone jdebug files
This commit is contained in:
parent
a14b9522a8
commit
9ae7ca4ece
@ -27,12 +27,12 @@ include("cmake/gcc-arm-none-eabi.cmake")
|
||||
# Enable compile command to ease indexing with e.g. clangd
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
|
||||
|
||||
# Enable CMake support for ASM and C languages
|
||||
enable_language(C ASM)
|
||||
|
||||
# Core project settings
|
||||
project(${CMAKE_PROJECT_NAME})
|
||||
|
||||
# Enable CMake support for ASM and C languages
|
||||
enable_language(C ASM)
|
||||
|
||||
# Add STM32CubeMX generated sources
|
||||
add_subdirectory(cmake/stm32cubemx)
|
||||
|
||||
@ -76,6 +76,15 @@ file(GLOB GATT_FILES "../../src/*/gatt-service/*.gatt")
|
||||
# workaround: add lwip sources only to lwip_examples
|
||||
set (LWIP_EXAMPLES pan_lwip_http_server)
|
||||
|
||||
# Create Ozone .jdebug files
|
||||
function(CreateOzoneProject exampleName)
|
||||
set(INPUT_FILE "ozone.jdebug")
|
||||
set(OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${exampleName}.jdebug)
|
||||
file(READ ${INPUT_FILE} FILE_CONTENTS)
|
||||
string(REPLACE "EXAMPLE" ${exampleName} MODIFIED_CONTENTS ${FILE_CONTENTS})
|
||||
file(WRITE ${OUTPUT_FILE} "${MODIFIED_CONTENTS}")
|
||||
endfunction()
|
||||
|
||||
# Create targets
|
||||
foreach(EXAMPLE_FILE ${EXAMPLES_C})
|
||||
# Extract the base name of the file (e.g., a2dp_sink_demo.c -> a2dp_sink_demo)
|
||||
@ -140,4 +149,8 @@ foreach(EXAMPLE_FILE ${EXAMPLES_C})
|
||||
port/port.c
|
||||
${SOURCES_EXAMPLE}
|
||||
)
|
||||
|
||||
# Create Ozone Project
|
||||
CreateOzoneProject(${EXAMPLE})
|
||||
|
||||
endforeach()
|
Loading…
x
Reference in New Issue
Block a user