Skip to content

Commit dc38b5a

Browse files
committed
manifest: Make ArduinoCore-API a downloadable blob
Make the license-incompatible headers and implementations a downloadable blob using `west blobs fetch`. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
1 parent 568d8d0 commit dc38b5a

File tree

5 files changed

+658
-1
lines changed

5 files changed

+658
-1
lines changed

CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,18 @@ if (CONFIG_ARDUINO_API)
1010
add_subdirectory(cores)
1111
add_subdirectory(libraries)
1212
zephyr_include_directories(${variant_dir})
13+
zephyr_include_directories(${CMAKE_CURRENT_SOURCE_DIR}/zephyr/blobs/ArduinoCore-API)
14+
15+
if (CONFIG_CPU_CORTEX_M0PLUS)
16+
set(prebuilt_path ${CMAKE_CURRENT_SOURCE_DIR}/zephyr/blobs/ArduinoCore-API/lib/libarduinocore_api_cortex-m0plus.a)
17+
elseif (CONFIG_CPU_CORTEX_M33)
18+
set(prebuilt_path ${CMAKE_CURRENT_SOURCE_DIR}/zephyr/blobs/ArduinoCore-API/lib/libarduinocore_api_cortex-m33.a)
19+
elseif(CONFIG_CPU_CORTEX_M4)
20+
set(prebuilt_path ${CMAKE_CURRENT_SOURCE_DIR}/zephyr/blobs/ArduinoCore-API/lib/libarduinocore_api_cortex-m33.a)
21+
endif()
22+
23+
add_library(libarduinocore_api STATIC IMPORTED GLOBAL)
24+
set_target_properties(libarduinocore_api PROPERTIES IMPORTED_LOCATION ${prebuilt_path})
25+
zephyr_link_libraries(libarduinocore_api)
26+
1327
endif()

0 commit comments

Comments
 (0)