Merge pull request 'merge code' (#74) from develop into prepare_for_master
This commit is contained in:
commit
5e6d029717
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file fsl_flash.c
|
* @file flash.c
|
||||||
* @brief support flexspi norflash function
|
* @brief support flexspi norflash function
|
||||||
* @version 2.0
|
* @version 2.0
|
||||||
* @author AIIT XUOS Lab
|
* @author AIIT XUOS Lab
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <xs_base.h>
|
#include <xs_base.h>
|
||||||
#include "ymodem.h"
|
#include "ymodem.h"
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
#include "flash.h"
|
#include "flash_for_ota.h"
|
||||||
|
|
||||||
uint8_t tab_1024[1024] ={0};
|
uint8_t tab_1024[1024] ={0};
|
||||||
uint8_t FileName[FILE_NAME_LENGTH];
|
uint8_t FileName[FILE_NAME_LENGTH];
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 AIIT XUOS Lab
|
||||||
|
* XiUOS is licensed under Mulan PSL v2.
|
||||||
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the Mulan PSL v2 for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file boot_for_ota.h
|
* @file boot_for_ota.h
|
||||||
* @brief support bootloader function
|
* @brief support bootloader function
|
||||||
|
@ -6,8 +18,8 @@
|
||||||
* @date 2023-11-20
|
* @date 2023-11-20
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __MCUBOOT_H__
|
#ifndef __BOOT_FOR_OTA_H__
|
||||||
#define __MCUBOOT_H__
|
#define __BOOT_FOR_OTA_H__
|
||||||
|
|
||||||
#include "fsl_common.h"
|
#include "fsl_common.h"
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
|
|
@ -20,7 +20,6 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "fsl_romapi.h"
|
#include "fsl_romapi.h"
|
||||||
|
|
||||||
#define USE_HIGHT_SPEED_TRANS 1
|
|
||||||
#define SECTOR_SIZE 0x1000
|
#define SECTOR_SIZE 0x1000
|
||||||
#define FLASH_PAGE_SIZE 256
|
#define FLASH_PAGE_SIZE 256
|
||||||
|
|
||||||
|
@ -72,11 +71,5 @@ status_t Flash_Write(uint32_t WriteAddr, uint8_t *pBuffer, uint32_t NumByteToWri
|
||||||
status_t Flash_Read(uint32_t addr, uint8_t *buf, uint32_t len);
|
status_t Flash_Read(uint32_t addr, uint8_t *buf, uint32_t len);
|
||||||
status_t Flash_Copy(uint32_t srcAddr,uint32_t dstAddr, uint32_t imageSize);
|
status_t Flash_Copy(uint32_t srcAddr,uint32_t dstAddr, uint32_t imageSize);
|
||||||
|
|
||||||
#ifndef USE_HIGHT_SPEED_TRANS
|
|
||||||
status_t NOR_FLASH_Write(uint32_t* FlashAddress, uint8_t* Data ,uint16_t DataLength);
|
|
||||||
#else
|
|
||||||
status_t NOR_FLASH_Write(uint32_t* FlashAddress, uint8_t* Data ,uint16_t DataLength,uint8_t doneFlag);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,26 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 AIIT XUOS Lab
|
||||||
|
* XiUOS is licensed under Mulan PSL v2.
|
||||||
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the Mulan PSL v2 for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file flash.h
|
* @file flash_for_ota.h
|
||||||
* @brief support flexspi norflash function
|
* @brief support flash function
|
||||||
* @version 2.0
|
* @version 2.0
|
||||||
* @author AIIT XUOS Lab
|
* @author AIIT XUOS Lab
|
||||||
* @date 2023-11-20
|
* @date 2023-11-20
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __FLASH_H__
|
#ifndef __FLASH_FOR_OTA_H__
|
||||||
#define __FLASH_H__
|
#define __FLASH_FOR_OTA_H__
|
||||||
|
|
||||||
#include <xs_base.h>
|
#include <xs_base.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
@ -1,5 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 AIIT XUOS Lab
|
||||||
|
* XiUOS is licensed under Mulan PSL v2.
|
||||||
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the Mulan PSL v2 for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file mucboot.c
|
* @file boot_for_ota.c
|
||||||
* @brief support bootloader function
|
* @brief support bootloader function
|
||||||
* @version 2.0
|
* @version 2.0
|
||||||
* @author AIIT XUOS Lab
|
* @author AIIT XUOS Lab
|
||||||
|
@ -10,7 +22,7 @@
|
||||||
#include <xs_base.h>
|
#include <xs_base.h>
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "boot_for_ota.h"
|
#include "boot_for_ota.h"
|
||||||
#include "flash.h"
|
#include "flash_for_ota.h"
|
||||||
|
|
||||||
#ifdef TOOL_USING_OTA
|
#ifdef TOOL_USING_OTA
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2020 AIIT XUOS Lab
|
||||||
|
* XiUOS is licensed under Mulan PSL v2.
|
||||||
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the Mulan PSL v2 for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file fsl_flash.c
|
* @file flash_for_ota.c
|
||||||
* @brief support flexspi norflash function
|
* @brief support flash function
|
||||||
* @version 2.0
|
* @version 2.0
|
||||||
* @author AIIT XUOS Lab
|
* @author AIIT XUOS Lab
|
||||||
* @date 2023-11-20
|
* @date 2023-11-20
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include "flash.h"
|
|
||||||
#include "flash_for_ota.h"
|
#include "flash_for_ota.h"
|
||||||
#include "MIMXRT1052.h"
|
#include "MIMXRT1052.h"
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2018-2020 NXP
|
* Copyright (c) 2020 AIIT XUOS Lab
|
||||||
* All rights reserved.
|
* XiUOS is licensed under Mulan PSL v2.
|
||||||
*
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
*/
|
* http://license.coscl.org.cn/MulanPSL2
|
||||||
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the Mulan PSL v2 for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file flash_ops.h
|
* @file flash_ops.h
|
||||||
|
@ -15,9 +20,7 @@
|
||||||
#ifndef __FLASH_OPS_H__
|
#ifndef __FLASH_OPS_H__
|
||||||
#define __FLASH_OPS_H__
|
#define __FLASH_OPS_H__
|
||||||
|
|
||||||
|
#include "flash_for_ota.h"
|
||||||
#include <flash.h>
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
/* board init function*/
|
/* board init function*/
|
||||||
|
|
Loading…
Reference in New Issue