From 96af00339870f69eb911d8ff5220e7411ed6e394 Mon Sep 17 00:00:00 2001 From: Wang_Weigen Date: Fri, 18 Jun 2021 17:37:03 +0800 Subject: [PATCH] add kconfig for application framework --- APP_Framework/Applications/Kconfig | 83 ++----------------- APP_Framework/Applications/Makefile | 48 +++-------- APP_Framework/Applications/app_test/Kconfig | 30 +++---- .../{ => app_test}/sd_card_mount.c | 0 .../{ => app_test}/spi_sd_card_mount.c | 0 .../Applications/connection_app/Kconfig | 14 ++++ .../Applications/connection_app/Makefile | 0 .../adhoc_lora_demo/Makefile | 0 .../adhoc_lora_demo/client.c | 0 .../adhoc_lora_demo/gateway.c | 0 .../bluetooth_demo/Makefile | 0 .../bluetooth_demo/bluetooth_receive_demo.c | 0 .../bluetooth_demo/bluetooth_send_demo.c | 0 .../ethernet_demo/Makefile | 0 .../ethernet_demo/ethernet_demo.c | 0 .../nbiot_demo/Makefile | 0 .../nbiot_demo/nbiot_demo.c | 0 .../wifi_demo/Makefile | 0 .../wifi_demo/wifi_demo.c | 0 .../zigbee_demo/Makefile | 0 .../zigbee_demo/zigbee_receive_demo.c | 0 .../zigbee_demo/zigbee_send_demo.c | 0 .../Applications/control_app/Kconfig | 8 ++ .../Applications/control_app/Makefile | 0 .../Applications/knowing_app/Kconfig | 7 ++ .../Applications/knowing_app/Makefile | 0 APP_Framework/Applications/sensor_app/Kconfig | 70 ++++++++++++++++ APP_Framework/Framework/Kconfig | 41 +++++---- APP_Framework/Framework/Makefile | 9 ++ APP_Framework/Framework/control/Kconfig | 3 + APP_Framework/Framework/control/Makefile | 3 + APP_Framework/Framework/know/Kconfig | 8 ++ APP_Framework/Framework/know/Makefile | 13 +++ .../Framework/know/tflite_mnist/Kconfig | 2 +- .../Framework/know/tflite_sin/Kconfig | 2 +- APP_Framework/Kconfig | 2 + APP_Framework/lib/Kconfig | 14 ++++ APP_Framework/lib/Makefile | 7 +- 38 files changed, 214 insertions(+), 150 deletions(-) rename APP_Framework/Applications/{ => app_test}/sd_card_mount.c (100%) rename APP_Framework/Applications/{ => app_test}/spi_sd_card_mount.c (100%) create mode 100755 APP_Framework/Applications/connection_app/Kconfig create mode 100755 APP_Framework/Applications/connection_app/Makefile rename APP_Framework/Applications/{connection_demo => connection_app}/adhoc_lora_demo/Makefile (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/adhoc_lora_demo/client.c (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/adhoc_lora_demo/gateway.c (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/bluetooth_demo/Makefile (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/bluetooth_demo/bluetooth_receive_demo.c (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/bluetooth_demo/bluetooth_send_demo.c (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/ethernet_demo/Makefile (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/ethernet_demo/ethernet_demo.c (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/nbiot_demo/Makefile (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/nbiot_demo/nbiot_demo.c (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/wifi_demo/Makefile (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/wifi_demo/wifi_demo.c (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/zigbee_demo/Makefile (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/zigbee_demo/zigbee_receive_demo.c (100%) rename APP_Framework/Applications/{connection_demo => connection_app}/zigbee_demo/zigbee_send_demo.c (100%) create mode 100755 APP_Framework/Applications/control_app/Kconfig create mode 100755 APP_Framework/Applications/control_app/Makefile create mode 100755 APP_Framework/Applications/knowing_app/Kconfig create mode 100755 APP_Framework/Applications/knowing_app/Makefile create mode 100755 APP_Framework/Applications/sensor_app/Kconfig create mode 100755 APP_Framework/Framework/control/Kconfig create mode 100755 APP_Framework/Framework/control/Makefile create mode 100755 APP_Framework/Framework/know/Kconfig create mode 100755 APP_Framework/Framework/know/Makefile create mode 100755 APP_Framework/lib/Kconfig diff --git a/APP_Framework/Applications/Kconfig b/APP_Framework/Applications/Kconfig index e08b6f7c7..7c5592045 100644 --- a/APP_Framework/Applications/Kconfig +++ b/APP_Framework/Applications/Kconfig @@ -11,83 +11,10 @@ menu "Applications" default 85 if KTASK_PRIORITY_256 endmenu -menuconfig APPLICATION_SENSOR - bool "Using sensor apps" - default n - select PERCEPTION_SENSORDEVICE - - if APPLICATION_SENSOR - menuconfig APPLICATION_SENSOR_CO2 - bool "Using sensor CO2 apps" - default n - select PERCEPTION_CO2 - - if APPLICATION_SENSOR_CO2 - config APPLICATION_SENSOR_CO2_ZG09 - bool "Using sensor ZG09 apps" - default n - select PERCEPTION_ZG09 - endif - - menuconfig APPLICATION_SENSOR_PM1_0 - bool "Using sensor PM1.0 apps" - default n - select PERCEPTION_PM - - if APPLICATION_SENSOR_PM1_0 - config APPLICATION_SENSOR_PM1_0_PS5308 - bool "Using sensor PS5308 apps" - default n - select PERCEPTION_PS5308 - endif - - menuconfig APPLICATION_SENSOR_VOICE - bool "Using sensor voice apps" - default n - select PERCEPTION_VOICE - - if APPLICATION_SENSOR_VOICE - config APPLICATION_SENSOR_VOICE_D124 - bool "Using sensor D124 apps" - default n - select PERCEPTION_D124 - endif - - menuconfig APPLICATION_SENSOR_HUMIDITY - bool "Using sensor humidity apps" - default n - select PERCEPTION_HUMIDITY - - if APPLICATION_SENSOR_HUMIDITY - config APPLICATION_SENSOR_HUMIDITY_HS300X - bool "Using sensor HS300x apps" - default n - select PERCEPTION_HS300X - endif - - menuconfig APPLICATION_SENSOR_TEMPERATURE - bool "Using sensor temperature apps" - default n - select PERCEPTION_TEMPERATURE - - if APPLICATION_SENSOR_TEMPERATURE - config APPLICATION_SENSOR_TEMPERATURE_HS300X - bool "Using sensor HS300x apps" - default n - select PERCEPTION_HS300X - endif - endif - -menuconfig CONNECTION_COMMUNICATION_ZIGBEE - bool "enable zigbee demo" - default n - select CONFIG_CONNECTION_COMMUNICATION_ZIGBEE - if CONNECTION_COMMUNICATION_ZIGBEE - source "$KERNEL_DIR/framework/connection/Adapter/zigbee/Kconfig" - endif - - - -source "$APP_DIR/Applications/app_test/Kconfig" + source "$APP_DIR/Applications/app_test/Kconfig" + source "$APP_DIR/Applications/connection_app/Kconfig" + source "$APP_DIR/Applications/control_app/Kconfig" + source "$APP_DIR/Applications/knowing_app/Kconfig" + source "$APP_DIR/Applications/sensor_app/Kconfig" endmenu diff --git a/APP_Framework/Applications/Makefile b/APP_Framework/Applications/Makefile index 3e11b654d..7451edb74 100644 --- a/APP_Framework/Applications/Makefile +++ b/APP_Framework/Applications/Makefile @@ -2,44 +2,20 @@ SRC_DIR := general_functions SRC_FILES := main.c framework_init.c -ifeq ($(CONFIG_RESOURCES_SDIO), y) - SRC_FILES += sd_card_mount.c -endif - -ifeq ($(CONFIG_RESOURCES_SPI_SD), y) - SRC_FILES += spi_sd_card_mount.c -endif - -ifeq ($(CONFIG_CONNECTION_COMMUNICATION_BOOTSTART_LORA_NET_SAMPLE), y) - SRC_DIR += connection_demo/adhoc_lora_demo -endif - -ifeq ($(CONFIG_CONNECTION_COMMUNICATION_ZIGBEE), y) - SRC_DIR += connection_demo/zigbee_demo -endif - -ifeq ($(CONFIG_CONNECTION_COMMUNICATION_ETHERNET), y) - SRC_DIR += connection_demo/ethernet_demo -endif - -ifeq ($(CONFIG_CONNECTION_COMMUNICATION_WIFI), y) - SRC_DIR += connection_demo/wifi_demo -endif - -ifeq ($(CONFIG_CONNECTION_COMMUNICATION_NB_IOT), y) - SRC_DIR += connection_demo/nbiot_demo -endif - -# ifeq ($(CONFIG_CONNECTION_COMMUNICATION_4G), y) -# SRC_DIR += connection_demo/4G_demo -# endif - -ifeq ($(CONFIG_CONNECTION_COMMUNICATION_BLUETOOTH), y) - SRC_DIR += connection_demo/bluetooth_demo -endif - ifeq ($(CONFIG_APPLICATION_SENSOR),y) SRC_DIR += sensor_app endif +ifeq ($(CONFIG_APPLICATION_CONNECTION),y) + SRC_DIR += connection_app +endif + +ifeq ($(CONFIG_APPLICATION_KNOWING),y) + SRC_DIR += knowing_app +endif + +ifeq ($(CONFIG_APPLICATION_CONTROL),y) + SRC_DIR += control_app +endif + include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Applications/app_test/Kconfig b/APP_Framework/Applications/app_test/Kconfig index 09b464f25..66837a945 100644 --- a/APP_Framework/Applications/app_test/Kconfig +++ b/APP_Framework/Applications/app_test/Kconfig @@ -1,18 +1,20 @@ -menuconfig USER_TEST - bool "Enable application test function " - default n +menu "test app" + menuconfig USER_TEST + bool "Enable application test function " + default n - if USER_TEST - config USER_TEST_LORA_ADHOC - bool "Config test lora adhoc" - default n + if USER_TEST + config USER_TEST_LORA_ADHOC + bool "Config test lora adhoc" + default n - config USER_TEST_SPI_LORA - bool "Config test spi lora" - default n + config USER_TEST_SPI_LORA + bool "Config test spi lora" + default n - config USER_TEST_SPI_FLASH - bool "Config test spi flash" - default n + config USER_TEST_SPI_FLASH + bool "Config test spi flash" + default n - endif + endif +endmenu diff --git a/APP_Framework/Applications/sd_card_mount.c b/APP_Framework/Applications/app_test/sd_card_mount.c similarity index 100% rename from APP_Framework/Applications/sd_card_mount.c rename to APP_Framework/Applications/app_test/sd_card_mount.c diff --git a/APP_Framework/Applications/spi_sd_card_mount.c b/APP_Framework/Applications/app_test/spi_sd_card_mount.c similarity index 100% rename from APP_Framework/Applications/spi_sd_card_mount.c rename to APP_Framework/Applications/app_test/spi_sd_card_mount.c diff --git a/APP_Framework/Applications/connection_app/Kconfig b/APP_Framework/Applications/connection_app/Kconfig new file mode 100755 index 000000000..27a8e1d47 --- /dev/null +++ b/APP_Framework/Applications/connection_app/Kconfig @@ -0,0 +1,14 @@ +menu "connection app" + menuconfig APPLICATION_CONNECTION + bool "Using connection apps" + default n + + menuconfig CONNECTION_COMMUNICATION_ZIGBEE + bool "enable zigbee demo" + default n + select CONFIG_CONNECTION_COMMUNICATION_ZIGBEE + if CONNECTION_COMMUNICATION_ZIGBEE + source "$KERNEL_DIR/framework/connection/Adapter/zigbee/Kconfig" + endif + +endmenu diff --git a/APP_Framework/Applications/connection_app/Makefile b/APP_Framework/Applications/connection_app/Makefile new file mode 100755 index 000000000..e69de29bb diff --git a/APP_Framework/Applications/connection_demo/adhoc_lora_demo/Makefile b/APP_Framework/Applications/connection_app/adhoc_lora_demo/Makefile similarity index 100% rename from APP_Framework/Applications/connection_demo/adhoc_lora_demo/Makefile rename to APP_Framework/Applications/connection_app/adhoc_lora_demo/Makefile diff --git a/APP_Framework/Applications/connection_demo/adhoc_lora_demo/client.c b/APP_Framework/Applications/connection_app/adhoc_lora_demo/client.c similarity index 100% rename from APP_Framework/Applications/connection_demo/adhoc_lora_demo/client.c rename to APP_Framework/Applications/connection_app/adhoc_lora_demo/client.c diff --git a/APP_Framework/Applications/connection_demo/adhoc_lora_demo/gateway.c b/APP_Framework/Applications/connection_app/adhoc_lora_demo/gateway.c similarity index 100% rename from APP_Framework/Applications/connection_demo/adhoc_lora_demo/gateway.c rename to APP_Framework/Applications/connection_app/adhoc_lora_demo/gateway.c diff --git a/APP_Framework/Applications/connection_demo/bluetooth_demo/Makefile b/APP_Framework/Applications/connection_app/bluetooth_demo/Makefile similarity index 100% rename from APP_Framework/Applications/connection_demo/bluetooth_demo/Makefile rename to APP_Framework/Applications/connection_app/bluetooth_demo/Makefile diff --git a/APP_Framework/Applications/connection_demo/bluetooth_demo/bluetooth_receive_demo.c b/APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_receive_demo.c similarity index 100% rename from APP_Framework/Applications/connection_demo/bluetooth_demo/bluetooth_receive_demo.c rename to APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_receive_demo.c diff --git a/APP_Framework/Applications/connection_demo/bluetooth_demo/bluetooth_send_demo.c b/APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_send_demo.c similarity index 100% rename from APP_Framework/Applications/connection_demo/bluetooth_demo/bluetooth_send_demo.c rename to APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_send_demo.c diff --git a/APP_Framework/Applications/connection_demo/ethernet_demo/Makefile b/APP_Framework/Applications/connection_app/ethernet_demo/Makefile similarity index 100% rename from APP_Framework/Applications/connection_demo/ethernet_demo/Makefile rename to APP_Framework/Applications/connection_app/ethernet_demo/Makefile diff --git a/APP_Framework/Applications/connection_demo/ethernet_demo/ethernet_demo.c b/APP_Framework/Applications/connection_app/ethernet_demo/ethernet_demo.c similarity index 100% rename from APP_Framework/Applications/connection_demo/ethernet_demo/ethernet_demo.c rename to APP_Framework/Applications/connection_app/ethernet_demo/ethernet_demo.c diff --git a/APP_Framework/Applications/connection_demo/nbiot_demo/Makefile b/APP_Framework/Applications/connection_app/nbiot_demo/Makefile similarity index 100% rename from APP_Framework/Applications/connection_demo/nbiot_demo/Makefile rename to APP_Framework/Applications/connection_app/nbiot_demo/Makefile diff --git a/APP_Framework/Applications/connection_demo/nbiot_demo/nbiot_demo.c b/APP_Framework/Applications/connection_app/nbiot_demo/nbiot_demo.c similarity index 100% rename from APP_Framework/Applications/connection_demo/nbiot_demo/nbiot_demo.c rename to APP_Framework/Applications/connection_app/nbiot_demo/nbiot_demo.c diff --git a/APP_Framework/Applications/connection_demo/wifi_demo/Makefile b/APP_Framework/Applications/connection_app/wifi_demo/Makefile similarity index 100% rename from APP_Framework/Applications/connection_demo/wifi_demo/Makefile rename to APP_Framework/Applications/connection_app/wifi_demo/Makefile diff --git a/APP_Framework/Applications/connection_demo/wifi_demo/wifi_demo.c b/APP_Framework/Applications/connection_app/wifi_demo/wifi_demo.c similarity index 100% rename from APP_Framework/Applications/connection_demo/wifi_demo/wifi_demo.c rename to APP_Framework/Applications/connection_app/wifi_demo/wifi_demo.c diff --git a/APP_Framework/Applications/connection_demo/zigbee_demo/Makefile b/APP_Framework/Applications/connection_app/zigbee_demo/Makefile similarity index 100% rename from APP_Framework/Applications/connection_demo/zigbee_demo/Makefile rename to APP_Framework/Applications/connection_app/zigbee_demo/Makefile diff --git a/APP_Framework/Applications/connection_demo/zigbee_demo/zigbee_receive_demo.c b/APP_Framework/Applications/connection_app/zigbee_demo/zigbee_receive_demo.c similarity index 100% rename from APP_Framework/Applications/connection_demo/zigbee_demo/zigbee_receive_demo.c rename to APP_Framework/Applications/connection_app/zigbee_demo/zigbee_receive_demo.c diff --git a/APP_Framework/Applications/connection_demo/zigbee_demo/zigbee_send_demo.c b/APP_Framework/Applications/connection_app/zigbee_demo/zigbee_send_demo.c similarity index 100% rename from APP_Framework/Applications/connection_demo/zigbee_demo/zigbee_send_demo.c rename to APP_Framework/Applications/connection_app/zigbee_demo/zigbee_send_demo.c diff --git a/APP_Framework/Applications/control_app/Kconfig b/APP_Framework/Applications/control_app/Kconfig new file mode 100755 index 000000000..6128642cf --- /dev/null +++ b/APP_Framework/Applications/control_app/Kconfig @@ -0,0 +1,8 @@ +menu "control app" + + menuconfig APPLICATION_CONTROL + bool "Using control apps" + default n + +endmenu + diff --git a/APP_Framework/Applications/control_app/Makefile b/APP_Framework/Applications/control_app/Makefile new file mode 100755 index 000000000..e69de29bb diff --git a/APP_Framework/Applications/knowing_app/Kconfig b/APP_Framework/Applications/knowing_app/Kconfig new file mode 100755 index 000000000..c49a45e54 --- /dev/null +++ b/APP_Framework/Applications/knowing_app/Kconfig @@ -0,0 +1,7 @@ +menu "knowing app" + + menuconfig APPLICATION_KNOWING + bool "Using knowing apps" + default n + +endmenu diff --git a/APP_Framework/Applications/knowing_app/Makefile b/APP_Framework/Applications/knowing_app/Makefile new file mode 100755 index 000000000..e69de29bb diff --git a/APP_Framework/Applications/sensor_app/Kconfig b/APP_Framework/Applications/sensor_app/Kconfig new file mode 100755 index 000000000..e413885eb --- /dev/null +++ b/APP_Framework/Applications/sensor_app/Kconfig @@ -0,0 +1,70 @@ +menu "sensor app" + + menuconfig APPLICATION_SENSOR + bool "Using sensor apps" + default n + select PERCEPTION_SENSORDEVICE + + if APPLICATION_SENSOR + menuconfig APPLICATION_SENSOR_CO2 + bool "Using sensor CO2 apps" + default n + select PERCEPTION_CO2 + + if APPLICATION_SENSOR_CO2 + config APPLICATION_SENSOR_CO2_ZG09 + bool "Using sensor ZG09 apps" + default n + select PERCEPTION_ZG09 + endif + + menuconfig APPLICATION_SENSOR_PM1_0 + bool "Using sensor PM1.0 apps" + default n + select PERCEPTION_PM + + if APPLICATION_SENSOR_PM1_0 + config APPLICATION_SENSOR_PM1_0_PS5308 + bool "Using sensor PS5308 apps" + default n + select PERCEPTION_PS5308 + endif + + menuconfig APPLICATION_SENSOR_VOICE + bool "Using sensor voice apps" + default n + select PERCEPTION_VOICE + + if APPLICATION_SENSOR_VOICE + config APPLICATION_SENSOR_VOICE_D124 + bool "Using sensor D124 apps" + default n + select PERCEPTION_D124 + endif + + menuconfig APPLICATION_SENSOR_HUMIDITY + bool "Using sensor humidity apps" + default n + select PERCEPTION_HUMIDITY + + if APPLICATION_SENSOR_HUMIDITY + config APPLICATION_SENSOR_HUMIDITY_HS300X + bool "Using sensor HS300x apps" + default n + select PERCEPTION_HS300X + endif + + menuconfig APPLICATION_SENSOR_TEMPERATURE + bool "Using sensor temperature apps" + default n + select PERCEPTION_TEMPERATURE + + if APPLICATION_SENSOR_TEMPERATURE + config APPLICATION_SENSOR_TEMPERATURE_HS300X + bool "Using sensor HS300x apps" + default n + select PERCEPTION_HS300X + endif + endif + +endmenu diff --git a/APP_Framework/Framework/Kconfig b/APP_Framework/Framework/Kconfig index a8f1638a4..66e1ec19a 100644 --- a/APP_Framework/Framework/Kconfig +++ b/APP_Framework/Framework/Kconfig @@ -1,22 +1,27 @@ -config TRANSFORM_LAYER_ATTRIUBUTE - bool "support transform layer" - default y - choice - prompt "select os features" - default ADD_XIUOS_FETURES +menu "Framework" - config ADD_XIUOS_FETURES - bool "add xiuos fetures" - - config ADD_NUTTX_FETURES - bool "add nuttx fetures" + config TRANSFORM_LAYER_ATTRIUBUTE + bool "support transform layer" + default y + choice + prompt "select os features" + default ADD_XIUOS_FETURES - config ADD_RTTHREAD_FETURES - bool "add rt_thread fetures" - endchoice + config ADD_XIUOS_FETURES + bool "add xiuos fetures" + + config ADD_NUTTX_FETURES + bool "add nuttx fetures" + + config ADD_RTTHREAD_FETURES + bool "add rt_thread fetures" + endchoice -source "$APP_DIR/Framework/sensor/Kconfig" -source "$APP_DIR/Framework/connection/Kconfig" -source "$APP_DIR/Framework/know/tflite_sin/Kconfig" -source "$APP_DIR/Framework/know/tflite_mnist/Kconfig" \ No newline at end of file + source "$APP_DIR/Framework/sensor/Kconfig" + source "$APP_DIR/Framework/connection/Kconfig" + source "$APP_DIR/Framework/know/Kconfig" + source "$APP_DIR/Framework/control/Kconfig" + + +endmenu diff --git a/APP_Framework/Framework/Makefile b/APP_Framework/Framework/Makefile index 88bebb00c..fc5bf3851 100644 --- a/APP_Framework/Framework/Makefile +++ b/APP_Framework/Framework/Makefile @@ -8,5 +8,14 @@ ifeq ($(CONFIG_SUPPORT_CONNECTION_FRAMEWORK),y) SRC_DIR += connection endif +ifeq ($(CONFIG_SUPPORT_KNOWING_FRAMEWORK),y) + SRC_DIR += know +endif + +ifeq ($(CONFIG_SUPPORT_CONTROL_FRAMEWORK),y) + SRC_DIR += control +endif + + include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/control/Kconfig b/APP_Framework/Framework/control/Kconfig new file mode 100755 index 000000000..b84fe5ace --- /dev/null +++ b/APP_Framework/Framework/control/Kconfig @@ -0,0 +1,3 @@ +menuconfig SUPPORT_CONTROL_FRAMEWORK + bool "support control framework" + default n \ No newline at end of file diff --git a/APP_Framework/Framework/control/Makefile b/APP_Framework/Framework/control/Makefile new file mode 100755 index 000000000..f75f2e60a --- /dev/null +++ b/APP_Framework/Framework/control/Makefile @@ -0,0 +1,3 @@ +SRC_DIR := + +include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/know/Kconfig b/APP_Framework/Framework/know/Kconfig new file mode 100755 index 000000000..0da0afa02 --- /dev/null +++ b/APP_Framework/Framework/know/Kconfig @@ -0,0 +1,8 @@ +menuconfig SUPPORT_KNOWING_FRAMEWORK + bool "support knowing framework" + default y + +if SUPPORT_KNOWING_FRAMEWORK + source "$APP_DIR/Framework/know/tflite_sin/Kconfig" + source "$APP_DIR/Framework/know/tflite_mnist/Kconfig" +endif diff --git a/APP_Framework/Framework/know/Makefile b/APP_Framework/Framework/know/Makefile new file mode 100755 index 000000000..60ec20c0f --- /dev/null +++ b/APP_Framework/Framework/know/Makefile @@ -0,0 +1,13 @@ +SRC_DIR := +ifeq ($(CONFIG_SUPPORT_KNOW_FRAMEWORK),y) + ifeq ($(CONFIG_USING_TFLITE_MNIST),y) + SRC_DIR += tflite_mnist + endif + + ifeq ($(CONFIG_USING_TFLITE_SIN),y) + SRC_DIR += tflite_sin + endif +endif + + +include $(KERNEL_ROOT)/compiler.mk diff --git a/APP_Framework/Framework/know/tflite_mnist/Kconfig b/APP_Framework/Framework/know/tflite_mnist/Kconfig index 7b77ef277..75f35dba8 100644 --- a/APP_Framework/Framework/know/tflite_mnist/Kconfig +++ b/APP_Framework/Framework/know/tflite_mnist/Kconfig @@ -1,4 +1,4 @@ -config USING_TFLITE_MNIST +menuconfig USING_TFLITE_MNIST bool "mnist demo app for tflite micro" depends on INTELLIGENT_TFLITE default n diff --git a/APP_Framework/Framework/know/tflite_sin/Kconfig b/APP_Framework/Framework/know/tflite_sin/Kconfig index dfe2fd0f6..ef8f6fb0d 100644 --- a/APP_Framework/Framework/know/tflite_sin/Kconfig +++ b/APP_Framework/Framework/know/tflite_sin/Kconfig @@ -1,4 +1,4 @@ -config USING_TFLITE_SIN +menuconfig USING_TFLITE_SIN bool "sin(x) demo app for tflite micro" depends on INTELLIGENT_TFLITE default n diff --git a/APP_Framework/Kconfig b/APP_Framework/Kconfig index f04bdf0ad..e63a1a14d 100644 --- a/APP_Framework/Kconfig +++ b/APP_Framework/Kconfig @@ -7,5 +7,7 @@ menu "APP_Framework" source "$APP_DIR/Applications/Kconfig" source "$APP_DIR/Framework/Kconfig" +source "$APP_DIR/lib/Kconfig" + endmenu diff --git a/APP_Framework/lib/Kconfig b/APP_Framework/lib/Kconfig new file mode 100755 index 000000000..bec09361c --- /dev/null +++ b/APP_Framework/lib/Kconfig @@ -0,0 +1,14 @@ +menu "app lib" + + choice + prompt "chose a kind of lib for app" + default APP_SELECT_NEWLIB + + config APP_SELECT_NEWLIB + bool "app select newlib" + + config APP_SELECT_OTHER_LIB + bool "app select other lib" + endchoice + +endmenu diff --git a/APP_Framework/lib/Makefile b/APP_Framework/lib/Makefile index e205bf8aa..ec6061b73 100644 --- a/APP_Framework/lib/Makefile +++ b/APP_Framework/lib/Makefile @@ -1,7 +1,10 @@ SRC_DIR := -ifeq ($(CONFIG_SEPARATE_COMPILE),y) - SRC_DIR += app_newlib +ifeq ($(CONFIG_APP_SELECT_NEWLIB),y) + ifeq ($(CONFIG_SEPARATE_COMPILE),y) + SRC_DIR += app_newlib + endif endif + include $(KERNEL_ROOT)/compiler.mk