Merge pull request 'merge code' (#74) from develop into prepare_for_master

This commit is contained in:
wgzAIIT 2023-11-21 09:13:45 +08:00
commit 5e6d029717
8 changed files with 72 additions and 28 deletions

View File

@ -6,7 +6,7 @@
*/
/**
* @file fsl_flash.c
* @file flash.c
* @brief support flexspi norflash function
* @version 2.0
* @author AIIT XUOS Lab

View File

@ -20,7 +20,7 @@
#include <xs_base.h>
#include "ymodem.h"
#include "string.h"
#include "flash.h"
#include "flash_for_ota.h"
uint8_t tab_1024[1024] ={0};
uint8_t FileName[FILE_NAME_LENGTH];

View File

@ -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
* @brief support bootloader function
@ -6,8 +18,8 @@
* @date 2023-11-20
*/
#ifndef __MCUBOOT_H__
#define __MCUBOOT_H__
#ifndef __BOOT_FOR_OTA_H__
#define __BOOT_FOR_OTA_H__
#include "fsl_common.h"
#include "board.h"

View File

@ -20,7 +20,6 @@
#include <stdint.h>
#include "fsl_romapi.h"
#define USE_HIGHT_SPEED_TRANS 1
#define SECTOR_SIZE 0x1000
#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_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

View File

@ -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
* @brief support flexspi norflash function
* @file flash_for_ota.h
* @brief support flash function
* @version 2.0
* @author AIIT XUOS Lab
* @date 2023-11-20
*/
#ifndef __FLASH_H__
#define __FLASH_H__
#ifndef __FLASH_FOR_OTA_H__
#define __FLASH_FOR_OTA_H__
#include <xs_base.h>
#include <stdint.h>

View File

@ -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
* @version 2.0
* @author AIIT XUOS Lab
@ -10,7 +22,7 @@
#include <xs_base.h>
#include "common.h"
#include "boot_for_ota.h"
#include "flash.h"
#include "flash_for_ota.h"
#ifdef TOOL_USING_OTA

View File

@ -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
* @brief support flexspi norflash function
* @file flash_for_ota.c
* @brief support flash function
* @version 2.0
* @author AIIT XUOS Lab
* @date 2023-11-20
*/
#include <stdio.h>
#include "flash.h"
#include "flash_for_ota.h"
#include "MIMXRT1052.h"

View File

@ -1,9 +1,14 @@
/*
* Copyright 2018-2020 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
* 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_ops.h
@ -15,9 +20,7 @@
#ifndef __FLASH_OPS_H__
#define __FLASH_OPS_H__
#include <flash.h>
#include "flash_for_ota.h"
typedef struct
{
/* board init function*/