commit
f27c6d2091
|
@ -0,0 +1,75 @@
|
|||
menu "OTA function"
|
||||
|
||||
menuconfig TOOL_USING_OTA
|
||||
bool "Enable support OTA function"
|
||||
default n
|
||||
|
||||
if TOOL_USING_OTA
|
||||
choice
|
||||
prompt "Compile bootloader bin or application bin."
|
||||
default MCUBOOT_BOOTLOADER
|
||||
|
||||
config MCUBOOT_BOOTLOADER
|
||||
bool "Config as bootloader."
|
||||
|
||||
config MCUBOOT_APPLICATION
|
||||
bool "Config as application."
|
||||
endchoice
|
||||
|
||||
if MCUBOOT_APPLICATION
|
||||
choice
|
||||
prompt "The way of OTA firmware upgrade."
|
||||
default OTA_BY_PLATFORM
|
||||
|
||||
config OTA_BY_PLATFORM
|
||||
bool "Through IoT management platform."
|
||||
select TOOL_USING_MQTT
|
||||
|
||||
config OTA_BY_TCPSERVER
|
||||
bool "Through the public network TCP server."
|
||||
select SUPPORT_CONNECTION_FRAMEWORK
|
||||
select CONNECTION_ADAPTER_4G
|
||||
endchoice
|
||||
endif
|
||||
|
||||
|
||||
menu "Flash area address and size configuration."
|
||||
config CHIP_FLAH_BASE
|
||||
hex "Flash base address of the chip."
|
||||
default 0x60000000
|
||||
|
||||
config XIUOS_FLAH_ADDRESS
|
||||
hex "Flash area address of the XiUOS system."
|
||||
default 0x60100000
|
||||
|
||||
config BAKUP_FLAH_ADDRESS
|
||||
hex "Flash area address of the backup firmware."
|
||||
default 0x60300000
|
||||
|
||||
config DOWN_FLAH_ADDRESS
|
||||
hex "Flash area address of the downloaded firmware."
|
||||
default 0x60500000
|
||||
|
||||
config FLAG_FLAH_ADDRESS
|
||||
hex "Flash area address of the OTA information."
|
||||
default 0x60700000
|
||||
|
||||
config APP_FLASH_SIZE
|
||||
hex "Application package size,the default size is limited to 1M."
|
||||
default 0x00100000
|
||||
endmenu
|
||||
|
||||
config OTA_RX_TIMEOUT
|
||||
int "OTA receive data timeout(ms)."
|
||||
default 600 if OTA_BY_PLATFORM
|
||||
default 10000 if OTA_BY_TCPSERVER
|
||||
default 10000 if MCUBOOT_BOOTLOADER
|
||||
|
||||
config OTA_RX_BUFFERSIZE
|
||||
int "OTA receive data buffer size."
|
||||
default 3072 if OTA_BY_PLATFORM
|
||||
default 2048 if OTA_BY_TCPSERVER
|
||||
default 256 if MCUBOOT_BOOTLOADER
|
||||
endif
|
||||
|
||||
endmenu
|
|
@ -0,0 +1,4 @@
|
|||
SRC_DIR :=
|
||||
SRC_DIR += flash ota
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
|
@ -0,0 +1,3 @@
|
|||
SRC_FILES := flash_ops.c
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
|
@ -6,14 +6,14 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* @file bootloader_ops.h
|
||||
* @file flash_ops.h
|
||||
* @brief support flash function
|
||||
* @version 2.0
|
||||
* @author AIIT XUOS Lab
|
||||
* @date 2023-04-03
|
||||
*/
|
||||
#ifndef __BOOTLOADER_OPS_H__
|
||||
#define __BOOTLOADER_OPS_H__
|
||||
#ifndef __FLASH_OPS_H__
|
||||
#define __FLASH_OPS_H__
|
||||
|
||||
|
||||
#include <flash.h>
|
|
@ -0,0 +1,3 @@
|
|||
SRC_FILES := ota.c
|
||||
|
||||
include $(KERNEL_ROOT)/compiler.mk
|
Loading…
Reference in New Issue