aboutsummaryrefslogtreecommitdiff
path: root/mcu.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'mcu.cmake')
-rw-r--r--mcu.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/mcu.cmake b/mcu.cmake
new file mode 100644
index 0000000..e5408b4
--- /dev/null
+++ b/mcu.cmake
@@ -0,0 +1,9 @@
+if (NOT MCU_CHIP)
+ message(FATAL_ERROR "Missing required argument CHIP.")
+elseif (MCU_CHIP MATCHES nrf51822)
+ set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/nrf51.cmake")
+elseif (MCU_CHIP MATCHES D2000)
+ set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/intel-quark-d2000.toolchain.cmake")
+else ()
+ message(FATAL_ERROR "Unsupported MCU_CHIP setting: ${MCU_CHIP}")
+endif ()