diff --git a/Kconfig b/Kconfig index eb5808d2..2f0b9860 100644 --- a/Kconfig +++ b/Kconfig @@ -31,15 +31,14 @@ config PLATFORM_LUBANLITE default y config PKGS_DIR - string - option env="PKGS_ROOT" - default "packages" + default "tools/env/packages" + help + packages directory for RT-Thread online packages + if ! AIC_BOOTLOADER source "application/Kconfig" endif -#source "kernel/$PRJ_KERNEL/Kconfig" -#source "$PKGS_DIR/Kconfig" source ".Kconfig.prj" source "packages/Kconfig" source "bsp/Kconfig" diff --git a/tools/env/packages/packages/iot/abup_fota/Kconfig b/tools/env/packages/packages/iot/abup_fota/Kconfig index 4f603d3d..b1730628 100644 --- a/tools/env/packages/packages/iot/abup_fota/Kconfig +++ b/tools/env/packages/packages/iot/abup_fota/Kconfig @@ -13,7 +13,7 @@ if PKG_USING_ABUP_FOTA choice prompt "Enable HTTP/CoAP FOTA" - default ABUP_NETWORKING_MODE + default ABUP_NETWORKING_MODE_HTTP help Select the package Networking mode @@ -38,7 +38,7 @@ endif choice prompt "Recover algorithm" - default ABUP_ALGORITHM + default ABUP_ALGORITHM_LUSUN help Select the package algorithm diff --git a/tools/env/packages/packages/iot/iot_cloud/ali-iotkit/Kconfig b/tools/env/packages/packages/iot/iot_cloud/ali-iotkit/Kconfig index 63c1c3c9..f236226f 100644 --- a/tools/env/packages/packages/iot/iot_cloud/ali-iotkit/Kconfig +++ b/tools/env/packages/packages/iot/iot_cloud/ali-iotkit/Kconfig @@ -16,19 +16,19 @@ if PKG_USING_ALI_IOTKIT config PKG_USING_ALI_IOTKIT_PRODUCT_KEY string "Config Product Key" - default a1dSQSGZ77X + default "a1dSQSGZ77X" config PKG_USING_ALI_IOTKIT_PRODUCT_SECRET string "Config Product Secret" - default NfIdVcfBP7rtH24H + default "NfIdVcfBP7rtH24H" config PKG_USING_ALI_IOTKIT_DEVICE_NAME string "Config Device Name" - default RGB-LED-DEV-1 + default "RGB-LED-DEV-1" config PKG_USING_ALI_IOTKIT_DEVICE_SECRET string "Config Device Secret" - default Ghuiyd9nmGowdZzjPqFtxhm3WUHEbIlI + default "Ghuiyd9nmGowdZzjPqFtxhm3WUHEbIlI" if (PKG_ALI_IOTKIT_VER_NUM >= 0x30000) config PKG_ALI_IOTKIT_SELECT_ITEM diff --git a/tools/env/packages/packages/iot/iot_cloud/tencent-iot-sdk/Kconfig b/tools/env/packages/packages/iot/iot_cloud/tencent-iot-sdk/Kconfig index 1414c4e6..3fc5a5ef 100644 --- a/tools/env/packages/packages/iot/iot_cloud/tencent-iot-sdk/Kconfig +++ b/tools/env/packages/packages/iot/iot_cloud/tencent-iot-sdk/Kconfig @@ -19,7 +19,7 @@ if PKG_USING_TENCENT_IOT_EXPLORER config PKG_USING_TENCENT_IOT_EXPLORER_DEVICE_NAME string "Config Device Name" - default dev001 + default "dev001" config PKG_USING_TENCENT_IOT_EXPLORER_DEVICE_SECRET string "Config Device Secret" diff --git a/tools/env/packages/packages/iot/kawaii-mqtt/Kconfig b/tools/env/packages/packages/iot/kawaii-mqtt/Kconfig index 2ce1373b..3e5ab71a 100644 --- a/tools/env/packages/packages/iot/kawaii-mqtt/Kconfig +++ b/tools/env/packages/packages/iot/kawaii-mqtt/Kconfig @@ -74,7 +74,7 @@ if PKG_USING_KAWAII_MQTT default n config SALOF_LOG_LEVEL - int "salof output log level " + int "salof output log level" default KAWAII_MQTT_LOG_LEVEL endif endif diff --git a/tools/env/packages/packages/iot/lorawan_driver/Kconfig b/tools/env/packages/packages/iot/lorawan_driver/Kconfig index 486c7b19..98d3c52f 100644 --- a/tools/env/packages/packages/iot/lorawan_driver/Kconfig +++ b/tools/env/packages/packages/iot/lorawan_driver/Kconfig @@ -26,31 +26,31 @@ if PKG_USING_LORAWAN_DRIVER choice prompt "Work Mode" - default ClassA + default LORAWAN_DRIVER_ClassA help Select the Work Mode config LORAWAN_DRIVER_ClassA - bool ClassA + bool "ClassA" config LORAWAN_DRIVER_ClassC - bool ClassC + bool "ClassC" endchoice choice prompt "Join Mode" - default ABP + default LORAWAN_DRIVER_ABP help Select the Join Mode config LORAWAN_DRIVER_OTAA - bool OTAA + bool "OTAA" config LORAWAN_DRIVER_ABP - bool ABP + bool "ABP" endchoice choice prompt "Select the RF frequency" - default REGION_CN470 + default LORAWAN_DRIVER_REGION_CN470 help Select the RF frequency diff --git a/tools/env/packages/packages/iot/lorawan_ed_stack/Kconfig b/tools/env/packages/packages/iot/lorawan_ed_stack/Kconfig index 750a551d..b53826b2 100644 --- a/tools/env/packages/packages/iot/lorawan_ed_stack/Kconfig +++ b/tools/env/packages/packages/iot/lorawan_ed_stack/Kconfig @@ -239,40 +239,40 @@ if PKG_USING_LORAWAN_ED_STACK if REGION_CN470 config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK0 string "Channel Mask0" - default 00FF + default "00FF" config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK1 string "Channel Mask1" - default 0000 + default "0000" config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK2 string "Channel Mask2" - default 0000 + default "0000" config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK3 string "Channel Mask3" - default 0000 + default "0000" config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK4 string "Channel Mask4" - default 0000 + default "0000" config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK5 string "Channel Mask5" - default 0000 + default "0000" endif if REGION_CN470S config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK0 string "Channel Mask0" - default 00FF + default "00FF" endif if REGION_EU868 config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK0 string "Channel Mask0" - default 00FF + default "00FF" endif if REGION_AS923 config LORAWAN_ED_STACK_PHY_PARAMETER_CHANNEL_MASK0 string "Channel Mask0" - default 00FF + default "00FF" endif endmenu diff --git a/tools/env/packages/packages/iot/rt-link_hw/Kconfig b/tools/env/packages/packages/iot/rt-link_hw/Kconfig index 467e9084..db1cb296 100644 --- a/tools/env/packages/packages/iot/rt-link_hw/Kconfig +++ b/tools/env/packages/packages/iot/rt-link_hw/Kconfig @@ -7,7 +7,7 @@ if PKG_USING_RT_LINK_HW choice prompt"Select the underlying transport" - default RT_LINK_USING_UART + default PKG_RT_LINK_USING_UART config PKG_RT_LINK_USING_UART bool "use UART" diff --git a/tools/env/packages/packages/iot/wiznet/Kconfig b/tools/env/packages/packages/iot/wiznet/Kconfig index b068dfe5..502ff6bf 100644 --- a/tools/env/packages/packages/iot/wiznet/Kconfig +++ b/tools/env/packages/packages/iot/wiznet/Kconfig @@ -57,15 +57,15 @@ if PKG_USING_WIZNET config WIZ_IPADDR string "IPv4: IP address" - default 192.168.1.10 + default "192.168.1.10" config WIZ_GWADDR string "IPv4: Gateway address" - default 192.168.1.1 + default "192.168.1.1" config WIZ_MSKADDR string "IPv4: Mask address" - default 255.255.255.0 + default "255.255.255.0" endmenu diff --git a/tools/env/packages/packages/multimedia/gui_engine/Kconfig b/tools/env/packages/packages/multimedia/gui_engine/Kconfig index 360790fa..a224ef75 100644 --- a/tools/env/packages/packages/multimedia/gui_engine/Kconfig +++ b/tools/env/packages/packages/multimedia/gui_engine/Kconfig @@ -29,10 +29,10 @@ choice prompt "RGB888 pixel bits" config PKG_USING_RGB888_PIXEL_BITS_32 - bool 32 + bool "32" config PKG_USING_RGB888_PIXEL_BITS_24 - bool 24 + bool "24" endchoice config PKG_USING_RGB888_PIXEL_BITS diff --git a/tools/env/packages/packages/multimedia/mp3player/Kconfig b/tools/env/packages/packages/multimedia/mp3player/Kconfig index 9da668e5..ee993029 100644 --- a/tools/env/packages/packages/multimedia/mp3player/Kconfig +++ b/tools/env/packages/packages/multimedia/mp3player/Kconfig @@ -15,7 +15,7 @@ if PKG_USING_MP3PLAYER config MP3_SOUND_DEVICE_NAME string "The play device name" - default sound0 + default "sound0" config MP3_INPUT_BUFFER_SIZE int "mp3 input buffer size" default 2048 diff --git a/tools/env/packages/packages/peripherals/Misaka_AT24CXX/Kconfig b/tools/env/packages/packages/peripherals/Misaka_AT24CXX/Kconfig index 1ce5f1f3..b7181032 100644 --- a/tools/env/packages/packages/peripherals/Misaka_AT24CXX/Kconfig +++ b/tools/env/packages/packages/peripherals/Misaka_AT24CXX/Kconfig @@ -16,7 +16,7 @@ if PKG_USING_MISAKA_AT24CXX choice prompt "Version" - default PKG_USING_MISAKA_AT24CXX_LATEST_VERSION + default PKG_USING_MISAKA_AT24CXX_V100 help Select the package version diff --git a/tools/env/packages/packages/peripherals/cw2015/Kconfig b/tools/env/packages/packages/peripherals/cw2015/Kconfig index 47c5ebc0..1d24b4cc 100644 --- a/tools/env/packages/packages/peripherals/cw2015/Kconfig +++ b/tools/env/packages/packages/peripherals/cw2015/Kconfig @@ -15,7 +15,7 @@ if PKG_USING_CW2015 default "i2c1" config CW2015_USE_AUTO_UPDATE - bool "Enable CW2015 AUTO UPDATE BAT INFO " + bool "Enable CW2015 AUTO UPDATE BAT INFO" default n help "It will create a thread to update the battery info." diff --git a/tools/env/packages/packages/peripherals/infrared/Kconfig b/tools/env/packages/packages/peripherals/infrared/Kconfig index 372b3141..66e777c2 100644 --- a/tools/env/packages/packages/peripherals/infrared/Kconfig +++ b/tools/env/packages/packages/peripherals/infrared/Kconfig @@ -22,7 +22,7 @@ if PKG_USING_INFRARED endmenu config PKG_USING_DRV_INFRARED - bool "Use the infrared driver provided by the software package " + bool "Use the infrared driver provided by the software package" default y if PKG_USING_DRV_INFRARED config INFRARED_SEND diff --git a/tools/env/packages/packages/peripherals/lora_gw_driver_lib/Kconfig b/tools/env/packages/packages/peripherals/lora_gw_driver_lib/Kconfig index efb0623f..2d24e6bf 100644 --- a/tools/env/packages/packages/peripherals/lora_gw_driver_lib/Kconfig +++ b/tools/env/packages/packages/peripherals/lora_gw_driver_lib/Kconfig @@ -26,13 +26,13 @@ if PKG_USING_LORA_GW_DRIVER_LIB config LORA_GW_DRIVER_SPI_BUS_NAME string "Setup LoRa Gw Driver Spi Bus Name (eg:spi1,spi2..,Define BSP_USING_SPIx in [Target Platform]\\Board\\Kconfig)" - default spi2 + default "spi2" help Setup LoRa Gw Driver Spi Bus Name,eg:spi2,Please define BSP_USING_SPIx in the [Target Platform]\\Board\\Kconfig config LORA_GW_DRIVER_I2C_DEVICE_NAME string "Setup LoRa Gw Driver I2C Device Name for Temperture(eg:i2c1,i2c2..,Define BSP_USING_IICx in [Target Platform]\\Board\\Kconfig)" - default i2c3 + default "i2c3" config LORA_GW_DRIVER_USING_SERVICES bool "Select lora-gw-driver Services" diff --git a/tools/env/packages/packages/peripherals/lora_modem_driver/Kconfig b/tools/env/packages/packages/peripherals/lora_modem_driver/Kconfig index cc0d83c6..970f17eb 100644 --- a/tools/env/packages/packages/peripherals/lora_modem_driver/Kconfig +++ b/tools/env/packages/packages/peripherals/lora_modem_driver/Kconfig @@ -12,7 +12,7 @@ if PKG_USING_LORA_MODEM_DRIVER config LORA_MODEM_UART_DEVICE string "Setup LoRa Modem Uart Device Name (eg:uart1,Define BSP_USING_UARTx in [Target Platform]\\Board\\Kconfig)" - default uart1 + default "uart1" help Setup LoRa LoRa Modem Uart Device Name,eg:uart1,Please define BSP_USING_UARTx in the [Target Platform]\\Board\\Kconfig diff --git a/tools/env/packages/packages/peripherals/lora_radio_driver/Kconfig b/tools/env/packages/packages/peripherals/lora_radio_driver/Kconfig index 3f4bc97c..6f3f5f96 100644 --- a/tools/env/packages/packages/peripherals/lora_radio_driver/Kconfig +++ b/tools/env/packages/packages/peripherals/lora_radio_driver/Kconfig @@ -32,11 +32,11 @@ if PKG_USING_LORA_RADIO_DRIVER config LORA_RADIO0_DEVICE_NAME string "Setup LoRa Radio Device Name" - default lora-radio0 + default "lora-radio0" config LORA_RADIO0_SPI_BUS_NAME string "Setup LoRa Radio Spi Name (eg:spi2,Define BSP_USING_SPIx in [Target Platform]\\Board\\Kconfig)" - default spi2 + default "spi2" help Setup LoRa Radio Spi Device Name,eg:spi2,Please define BSP_USING_SPIx in the [Target Platform]\\Board\\Kconfig diff --git a/tools/env/packages/packages/peripherals/multi_infrared/Kconfig b/tools/env/packages/packages/peripherals/multi_infrared/Kconfig index 1e5a87c4..94a31216 100644 --- a/tools/env/packages/packages/peripherals/multi_infrared/Kconfig +++ b/tools/env/packages/packages/peripherals/multi_infrared/Kconfig @@ -17,7 +17,7 @@ if PKG_USING_MULTI_INFRARED endmenu config PKG_USING_DRV_MULTI_INFRARED - bool "Use the multi infrared driver provided by the software package " + bool "Use the multi infrared driver provided by the software package" default y if PKG_USING_DRV_MULTI_INFRARED config MULTI_INFRARED_RECEIVE diff --git a/tools/env/packages/packages/peripherals/vdevice/Kconfig b/tools/env/packages/packages/peripherals/vdevice/Kconfig index 0e1fa81b..7687be79 100644 --- a/tools/env/packages/packages/peripherals/vdevice/Kconfig +++ b/tools/env/packages/packages/peripherals/vdevice/Kconfig @@ -11,7 +11,7 @@ if PKG_USING_VDEVICE default "/packages/peripherals/vdevice" config VDEVICE_USING_PIN - bool "Use virtualized pin " + bool "Use virtualized pin" select RT_USING_PIN default n @@ -22,7 +22,7 @@ if PKG_USING_VDEVICE endif config VDEVICE_USING_LCD - bool "Use virtualized lcd " + bool "Use virtualized lcd" default n if VDEVICE_USING_LCD @@ -32,7 +32,7 @@ if PKG_USING_VDEVICE endif config VDEVICE_USING_TOUCH - bool "Use virtualized touch " + bool "Use virtualized touch" select RT_USING_TOUCH default n diff --git a/tools/env/packages/packages/system/tlsf/Kconfig b/tools/env/packages/packages/system/tlsf/Kconfig index 489073bd..ea83e4cd 100644 --- a/tools/env/packages/packages/system/tlsf/Kconfig +++ b/tools/env/packages/packages/system/tlsf/Kconfig @@ -2,7 +2,6 @@ # Kconfig file for package tlsf menuconfig PKG_USING_TLSF bool "TLSF: A dynamic memory allocation algorithm with predictable execution time and low fragmentation." - select RT_USING_USERHEAP default n if PKG_USING_TLSF diff --git a/tools/scripts/aic_build.py b/tools/scripts/aic_build.py index f249f5af..297d33f9 100755 --- a/tools/scripts/aic_build.py +++ b/tools/scripts/aic_build.py @@ -168,6 +168,15 @@ def mk_kconfig_prj(aic_root, filename): f.write('source "kernel/{}/Kconfig"\n'.format(prj_kernel)) f.write('source "application/{}/{}/Kconfig"\n'.format(prj_kernel, prj_app)) + if prj_kernel == 'rt-thread': + f.write('source "tools/env/packages/packages/Kconfig"\n') + + +def update_project_env(aic_root): + os.environ['PKGS_ROOT'] = os.path.join(aic_root, 'tools', 'env', 'packages') + os.environ['PKGS_DIR'] = os.path.join(aic_root, 'tools', 'env', 'packages') + os.environ['RTT_ROOT'] = os.path.join(aic_root, 'kernel', 'rt-thread/') + os.environ['RTT_DIR'] = os.path.join(aic_root, 'kernel', 'rt-thread/') def apply_defconfig(aic_root, defconfig): @@ -186,10 +195,7 @@ def apply_defconfig(aic_root, defconfig): # Should generate .Kconfig.prj before apply defconfig, because project depends on this file. mk_kconfig_prj(aic_root, src) - os.environ['PKGS_ROOT'] = os.path.join(aic_root, 'packages') - os.environ['PKGS_DIR'] = os.path.join(aic_root, 'packages') - os.environ['RTT_ROOT'] = os.path.join(aic_root, 'kernel/rt-thread/') - os.environ['RTT_DIR'] = os.path.join(aic_root, 'kernel/rt-thread/') + update_project_env(aic_root) pydefconfig = os.path.join(aic_root, 'kernel', 'rt-thread', 'tools', 'defconfig.py') defconf_cmd = 'python3 {} {}'.format(pydefconfig, src) os.system(defconf_cmd) @@ -205,23 +211,16 @@ def save_defconfig(aic_root): defconfig = get_prj_defconfig(aic_root) if defconfig: dst = os.path.join(aic_root, 'target', 'configs', defconfig) - os.environ['PKGS_ROOT'] = os.path.join(aic_root, 'packages') - os.environ['PKGS_DIR'] = os.path.join(aic_root, 'packages') - os.environ['RTT_ROOT'] = os.path.join(aic_root, 'kernel/rt-thread/') - os.environ['RTT_DIR'] = os.path.join(aic_root, 'kernel/rt-thread/') + update_project_env(aic_root) pydefconfig = os.path.join(aic_root, 'kernel', 'rt-thread', 'tools', 'savedefconfig.py') defconf_cmd = 'python3 {} --out {}'.format(pydefconfig, dst) os.system(defconf_cmd) def update_defconfig(aic_root): - os.environ['PKGS_ROOT'] = os.path.join(aic_root, 'packages') - os.environ['PKGS_DIR'] = os.path.join(aic_root, 'packages') - os.environ['RTT_ROOT'] = os.path.join(aic_root, 'kernel/rt-thread/') - os.environ['RTT_DIR'] = os.path.join(aic_root, 'kernel/rt-thread/') - pydefconfig = os.path.join(aic_root, 'kernel', 'rt-thread', 'tools', 'olddefconfig.py') - defconf_cmd = 'python3 {}'.format(pydefconfig) - os.system(defconf_cmd) + defconfig = get_prj_defconfig(aic_root) + if defconfig: + apply_defconfig(aic_root, defconfig) # cmd-option: list defconfig without bootloader