Browse Source

add kconfig for application framework

pull/3/head
Wang_Weigen 1 year ago
parent
commit
96af003398
  1. 83
      APP_Framework/Applications/Kconfig
  2. 40
      APP_Framework/Applications/Makefile
  3. 30
      APP_Framework/Applications/app_test/Kconfig
  4. 0
      APP_Framework/Applications/app_test/sd_card_mount.c
  5. 0
      APP_Framework/Applications/app_test/spi_sd_card_mount.c
  6. 14
      APP_Framework/Applications/connection_app/Kconfig
  7. 0
      APP_Framework/Applications/connection_app/Makefile
  8. 0
      APP_Framework/Applications/connection_app/adhoc_lora_demo/Makefile
  9. 0
      APP_Framework/Applications/connection_app/adhoc_lora_demo/client.c
  10. 0
      APP_Framework/Applications/connection_app/adhoc_lora_demo/gateway.c
  11. 0
      APP_Framework/Applications/connection_app/bluetooth_demo/Makefile
  12. 0
      APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_receive_demo.c
  13. 0
      APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_send_demo.c
  14. 0
      APP_Framework/Applications/connection_app/ethernet_demo/Makefile
  15. 0
      APP_Framework/Applications/connection_app/ethernet_demo/ethernet_demo.c
  16. 0
      APP_Framework/Applications/connection_app/nbiot_demo/Makefile
  17. 0
      APP_Framework/Applications/connection_app/nbiot_demo/nbiot_demo.c
  18. 0
      APP_Framework/Applications/connection_app/wifi_demo/Makefile
  19. 0
      APP_Framework/Applications/connection_app/wifi_demo/wifi_demo.c
  20. 0
      APP_Framework/Applications/connection_app/zigbee_demo/Makefile
  21. 0
      APP_Framework/Applications/connection_app/zigbee_demo/zigbee_receive_demo.c
  22. 0
      APP_Framework/Applications/connection_app/zigbee_demo/zigbee_send_demo.c
  23. 8
      APP_Framework/Applications/control_app/Kconfig
  24. 0
      APP_Framework/Applications/control_app/Makefile
  25. 7
      APP_Framework/Applications/knowing_app/Kconfig
  26. 0
      APP_Framework/Applications/knowing_app/Makefile
  27. 70
      APP_Framework/Applications/sensor_app/Kconfig
  28. 41
      APP_Framework/Framework/Kconfig
  29. 9
      APP_Framework/Framework/Makefile
  30. 3
      APP_Framework/Framework/control/Kconfig
  31. 3
      APP_Framework/Framework/control/Makefile
  32. 8
      APP_Framework/Framework/know/Kconfig
  33. 13
      APP_Framework/Framework/know/Makefile
  34. 2
      APP_Framework/Framework/know/tflite_mnist/Kconfig
  35. 2
      APP_Framework/Framework/know/tflite_sin/Kconfig
  36. 2
      APP_Framework/Kconfig
  37. 14
      APP_Framework/lib/Kconfig
  38. 7
      APP_Framework/lib/Makefile

83
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

40
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
ifeq ($(CONFIG_APPLICATION_SENSOR),y)
SRC_DIR += sensor_app
endif
ifeq ($(CONFIG_CONNECTION_COMMUNICATION_WIFI), y)
SRC_DIR += connection_demo/wifi_demo
ifeq ($(CONFIG_APPLICATION_CONNECTION),y)
SRC_DIR += connection_app
endif
ifeq ($(CONFIG_CONNECTION_COMMUNICATION_NB_IOT), y)
SRC_DIR += connection_demo/nbiot_demo
ifeq ($(CONFIG_APPLICATION_KNOWING),y)
SRC_DIR += knowing_app
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
ifeq ($(CONFIG_APPLICATION_CONTROL),y)
SRC_DIR += control_app
endif
include $(KERNEL_ROOT)/compiler.mk

30
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

0
APP_Framework/Applications/sd_card_mount.c → APP_Framework/Applications/app_test/sd_card_mount.c

0
APP_Framework/Applications/spi_sd_card_mount.c → APP_Framework/Applications/app_test/spi_sd_card_mount.c

14
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

0
APP_Framework/Applications/connection_app/Makefile

0
APP_Framework/Applications/connection_demo/adhoc_lora_demo/Makefile → APP_Framework/Applications/connection_app/adhoc_lora_demo/Makefile

0
APP_Framework/Applications/connection_demo/adhoc_lora_demo/client.c → APP_Framework/Applications/connection_app/adhoc_lora_demo/client.c

0
APP_Framework/Applications/connection_demo/adhoc_lora_demo/gateway.c → APP_Framework/Applications/connection_app/adhoc_lora_demo/gateway.c

0
APP_Framework/Applications/connection_demo/bluetooth_demo/Makefile → APP_Framework/Applications/connection_app/bluetooth_demo/Makefile

0
APP_Framework/Applications/connection_demo/bluetooth_demo/bluetooth_receive_demo.c → APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_receive_demo.c

0
APP_Framework/Applications/connection_demo/bluetooth_demo/bluetooth_send_demo.c → APP_Framework/Applications/connection_app/bluetooth_demo/bluetooth_send_demo.c

0
APP_Framework/Applications/connection_demo/ethernet_demo/Makefile → APP_Framework/Applications/connection_app/ethernet_demo/Makefile

0
APP_Framework/Applications/connection_demo/ethernet_demo/ethernet_demo.c → APP_Framework/Applications/connection_app/ethernet_demo/ethernet_demo.c

0
APP_Framework/Applications/connection_demo/nbiot_demo/Makefile → APP_Framework/Applications/connection_app/nbiot_demo/Makefile

0
APP_Framework/Applications/connection_demo/nbiot_demo/nbiot_demo.c → APP_Framework/Applications/connection_app/nbiot_demo/nbiot_demo.c

0
APP_Framework/Applications/connection_demo/wifi_demo/Makefile → APP_Framework/Applications/connection_app/wifi_demo/Makefile

0
APP_Framework/Applications/connection_demo/wifi_demo/wifi_demo.c → APP_Framework/Applications/connection_app/wifi_demo/wifi_demo.c

0
APP_Framework/Applications/connection_demo/zigbee_demo/Makefile → APP_Framework/Applications/connection_app/zigbee_demo/Makefile

0
APP_Framework/Applications/connection_demo/zigbee_demo/zigbee_receive_demo.c → APP_Framework/Applications/connection_app/zigbee_demo/zigbee_receive_demo.c

0
APP_Framework/Applications/connection_demo/zigbee_demo/zigbee_send_demo.c → APP_Framework/Applications/connection_app/zigbee_demo/zigbee_send_demo.c

8
APP_Framework/Applications/control_app/Kconfig

@ -0,0 +1,8 @@
menu "control app"
menuconfig APPLICATION_CONTROL
bool "Using control apps"
default n
endmenu

0
APP_Framework/Applications/control_app/Makefile

7
APP_Framework/Applications/knowing_app/Kconfig

@ -0,0 +1,7 @@
menu "knowing app"
menuconfig APPLICATION_KNOWING
bool "Using knowing apps"
default n
endmenu

0
APP_Framework/Applications/knowing_app/Makefile

70
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

41
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"
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

9
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

3
APP_Framework/Framework/control/Kconfig

@ -0,0 +1,3 @@
menuconfig SUPPORT_CONTROL_FRAMEWORK
bool "support control framework"
default n

3
APP_Framework/Framework/control/Makefile

@ -0,0 +1,3 @@
SRC_DIR :=
include $(KERNEL_ROOT)/compiler.mk

8
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

13
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

2
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

2
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

2
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

14
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

7
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

Loading…
Cancel
Save