feat add lorawan_gateway_single_channel lib for XiUOS and compile OK

This commit is contained in:
Liu_Weichao 2023-06-20 11:24:15 +08:00
parent 5d8375caee
commit 5c08cae005
6 changed files with 42 additions and 7 deletions

5
.gitmodules vendored
View File

@ -28,4 +28,7 @@
[submodule "APP_Framework/lib/lorawan/lorawan_devicenode"]
path = APP_Framework/lib/lorawan/lorawan_devicenode
url = https://gitlink.org.cn/IACU/lorawan_devicenode.git
branch = master
branch = master
[submodule "APP_Framework/lib/lorawan/lorawan_gateway_single_channel"]
path = APP_Framework/lib/lorawan/lorawan_gateway_single_channel
url = https://gitlink.org.cn/IACU/lorawan_gateway_single_channel.git

View File

@ -5,6 +5,18 @@ menuconfig LIB_USING_LORAWAN
default n
if LIB_USING_LORAWAN
menuconfig LIB_USING_LORAWAN_GATEWAY_SC
help
Please add "source "$APP_DIR/lib/lorawan/lorawan_gateway_single_channel/Kconfig"" when using lorawan_gateway_single_channel
bool "LoRaWan using lorawan_gateway for single channel(SX126x/SX127x) lib"
default n
select LIB_USING_LORA_RADIO
select BSP_USING_LWIP
if LIB_USING_LORAWAN_GATEWAY_SC
endif
menuconfig LIB_USING_LORAWAN_ED_STACK
help
Please add "source "$APP_DIR/lib/lorawan/lorawan_devicenode/Kconfig"" when using lorawan_devicenode
@ -21,6 +33,7 @@ menuconfig LIB_USING_LORAWAN
Please add "source "$APP_DIR/lib/lorawan/lora_radio_driver/Kconfig"" when using lora_radio_driver
bool "LoRaWan using lora-radio-driver lib"
default n
select BSP_USING_SPI
if LIB_USING_LORA_RADIO

View File

@ -8,4 +8,8 @@ ifeq ($(CONFIG_LIB_USING_LORAWAN_ED_STACK),y)
SRC_DIR += lorawan_devicenode
endif
ifeq ($(CONFIG_LIB_USING_LORAWAN_GATEWAY_SC),y)
SRC_DIR += lorawan_gateway_single_channel
endif
include $(KERNEL_ROOT)/compiler.mk

View File

@ -1,16 +1,17 @@
# lorawan子模块调试说明
矽璓工业物联操作系统XiUOS目前支持lorawan相关开源库通过子模块形式管理该目录主要内容是包含**lora_radio_driver**、**lorawan_devicenode**等。
矽璓工业物联操作系统XiUOS目前支持lorawan相关开源库通过子模块形式管理该目录主要内容是包含**lora_radio_driver**、**lorawan_devicenode**、**lorawan_gateway_single_channel**等。
## 目录内容
```
xiuos/APP_Framework/lib/lorawan
├── README.md
├── lora_radio_driver lora_radio驱动库
├── lorawan_devicenode lorawan节点协议栈
├── Kconfig lorawan Kconfig配置
└── Makefile lorawan Makefile
├── lora_radio_driver lora_radio驱动库
├── lorawan_devicenode lorawan节点协议栈
├── lorawan_gateway_single_channel lorawan节点协议栈
├── Kconfig lorawan Kconfig配置
└── Makefile lorawan Makefile
```
## 使用
@ -24,7 +25,16 @@ git submodule init
git submodule update APP_Framework/lib/lorawan/lora_radio_driver
git submodule update APP_Framework/lib/lorawan/lorawan_devicenode
# 进入 APP_Framework/lib/lorawan/Kconfig 配置增加子模块source路径
# 进入 APP_Framework/lib/lorawan/Kconfig 配置增加子模块source路径从而编译时可找到相应lib的配置
menuconfig LIB_USING_LORAWAN_GATEWAY_SC
bool "LoRaWan using lorawan_gateway for single channel(SX126x、SX127x) lib"
default n
select LIB_USING_LORA_RADIO
if LIB_USING_LORAWAN_GATEWAY_SC
source "$APP_DIR/lib/lorawan/lorawan_gateway_single_channel/Kconfig"
endif
menuconfig LIB_USING_LORAWAN_ED_STACK
bool "LoRaWan using lorawan_ed_stack lib"
default n

@ -0,0 +1 @@
Subproject commit ac1c6516ec9b2998c0c50796a4e5a8b78781dc8c

View File

@ -533,6 +533,10 @@ KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/lib/lorawan/lorawan_deviceno
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/lib/lorawan/lorawan_devicenode/lorawan-ed-stack/Mac/Crypto #
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/lib/lorawan/lorawan_devicenode/lorawan-ed-stack/Phy/region #
endif
ifeq ($(CONFIG_LIB_USING_LORAWAN_GATEWAY_SC),y)
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/lib/lorawan/lorawan_gateway_single_channel/inc #
endif
endif
ifeq ($(CONFIG_CRYPTO), y)