Skip to content

Kconfig: Update to use imply and rid module.conf #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# SPDX-License-Identifier: Apache-2.0

if (CONFIG_ARDUINO_API)
add_subdirectory(cores)
add_subdirectory(variants)
add_subdirectory(libraries)
endif()

30 changes: 8 additions & 22 deletions Kconfig
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 0 additions & 8 deletions module.conf

This file was deleted.

1 change: 0 additions & 1 deletion samples/blinky_arduino/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
1 change: 0 additions & 1 deletion samples/button_press_led/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
1 change: 0 additions & 1 deletion samples/hello_arduino/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
1 change: 0 additions & 1 deletion samples/i2cdemo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down