Merge pull request #815 from pimoroni/toolchain_env

Fix out of box failure when ARM toolchain is not in path
pull/822/head
Philip Howard 2023-08-14 12:27:44 +01:00 zatwierdzone przez GitHub
commit a7efef0049
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -10,6 +10,8 @@ set(CMAKE_CXX_STANDARD 17)
# Initialize the SDK # Initialize the SDK
pico_sdk_init() pico_sdk_init()
pico_find_compiler(PICO_COMPILER_LD ${PICO_GCC_TRIPLE}-ld)
function(add_resource target file) function(add_resource target file)
get_filename_component(NAME ${ARGV1} NAME_WE) get_filename_component(NAME ${ARGV1} NAME_WE)
set(FILENAME ${ARGV1}) set(FILENAME ${ARGV1})
@ -21,7 +23,7 @@ function(add_resource target file)
${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME} ${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
COMMAND arm-none-eabi-ld -r -b binary -o ${NAME}.o ${FILENAME} COMMAND ${PICO_COMPILER_LD} -r -b binary -o ${NAME}.o ${FILENAME}
DEPENDS ${FILENAME} DEPENDS ${FILENAME}
) )