diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fdaa39a..1931cfc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,8 @@ # SPDX-License-Identifier: Apache-2.0 +if (CONFIG_ARDUINO_API) add_subdirectory(cores) add_subdirectory(variants) add_subdirectory(libraries) +endif() + diff --git a/Kconfig b/Kconfig index 592146ab..61c43ecf 100644 --- a/Kconfig +++ b/Kconfig @@ -1,36 +1,22 @@ # -# Copyright (c) 2020 Toita, Hiroshi +# Copyright (c) 2022 Dhruva Gole # # SPDX-License-Identifier: Apache-2.0 # config ARDUINO_API bool "ARDUINO_API" - depends on CPLUSPLUS + imply CPLUSPLUS + imply GPIO + imply CPLUSPLUS + imply I2C + imply NEWLIB_LIBC_FLOAT_PRINTF + imply CBPRINTF_FP_SUPPORT + imply RING_BUFFER default n if ARDUINO_API -config ARDUINO_MAIN_LOOP - bool "ARDUINO_MAIN_LOOP" - default n - -config ARDUINO_GPIO - bool "ARDUINO_API" - depends on GPIO - default y - -config ARDUINO_QUERY_PIN_CONFIG - bool - depends on ARDUINO_GPIO - default n - -config ARDUINO_UART - bool "ARDUINO_API" - depends on SERIAL - depends on UART_INTERRUPT_DRIVEN - default y - config QEMU_ICOUNT bool "QEMU icount mode" default n diff --git a/module.conf b/module.conf deleted file mode 100644 index fef1844c..00000000 --- a/module.conf +++ /dev/null @@ -1,8 +0,0 @@ -CONFIG_GPIO=y -CONFIG_CPLUSPLUS=y -CONFIG_ARDUINO_API=y -CONFIG_I2C=y -CONFIG_NEWLIB_LIBC=y -CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y -CONFIG_CBPRINTF_FP_SUPPORT=y -CONFIG_RING_BUFFER=y \ No newline at end of file diff --git a/samples/blinky_arduino/CMakeLists.txt b/samples/blinky_arduino/CMakeLists.txt index e58c3b58..58cf0b3b 100644 --- a/samples/blinky_arduino/CMakeLists.txt +++ b/samples/blinky_arduino/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.20.0) -set(CONF_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/module.conf) set(DTC_OVERLAY_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/variants/${BOARD}/${BOARD}.overlay) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/samples/button_press_led/CMakeLists.txt b/samples/button_press_led/CMakeLists.txt index e58c3b58..58cf0b3b 100644 --- a/samples/button_press_led/CMakeLists.txt +++ b/samples/button_press_led/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.20.0) -set(CONF_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/module.conf) set(DTC_OVERLAY_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/variants/${BOARD}/${BOARD}.overlay) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/samples/hello_arduino/CMakeLists.txt b/samples/hello_arduino/CMakeLists.txt index bc8ef8af..72fb0743 100644 --- a/samples/hello_arduino/CMakeLists.txt +++ b/samples/hello_arduino/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.20.0) -set(CONF_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/module.conf) set(DTC_OVERLAY_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/variants/${BOARD}/${BOARD}.overlay) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) diff --git a/samples/i2cdemo/CMakeLists.txt b/samples/i2cdemo/CMakeLists.txt index 408bdd6c..664bc247 100644 --- a/samples/i2cdemo/CMakeLists.txt +++ b/samples/i2cdemo/CMakeLists.txt @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.20.0) -set(CONF_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/module.conf) set(DTC_OVERLAY_FILE $ENV{ZEPHYR_BASE}/../modules/lib/Arduino-Zephyr-API/variants/${BOARD}/${BOARD}.overlay) find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})