admin 管理员组

文章数量: 887021


2024年1月5日发(作者:电子发票导出是xml格式的)

2.2、烧录boot

3.3、添加组件包

3.4、修改board.h

/* * Copyright (c) 2006-2021, RT-Thread Development Team * * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes * 2021-11-05 YPD the first version */#ifndef PACKAGES_FAL_V0_5_0_INC_FAL_CFG_H_#define PACKAGES_FAL_V0_5_0_INC_FAL_CFG_H_#include #include "board.h"#define FLASH_SIZE_GRANULARITY_16K (4 * 16 * 1024)#define FLASH_SIZE_GRANULARITY_64K (64 * 1024)#define FLASH_SIZE_GRANULARITY_128K (7 * 128 * 1024)#define STM32_FLASH_START_ADRESS_16K STM32_FLASH_START_ADRESS#define STM32_FLASH_START_ADRESS_64K (STM32_FLASH_START_ADRESS_16K + FLASH_SIZE_GRANULARITY_16K)#define STM32_FLASH_START_ADRESS_128K (STM32_FLASH_START_ADRESS_64K + FLASH_SIZE_GRANULARITY_64K)extern const struct fal_flash_dev stm32_onchip_flash_16k;extern const struct fal_flash_dev stm32_onchip_flash_64k;extern const struct fal_flash_dev stm32_onchip_flash_128k;/* flash device table */#define FAL_FLASH_DEV_TABLE { &stm32_onchip_flash_128k, }/* ====================== Partition Configuration ========================== */#ifdef FAL_PART_HAS_TABLE_CFG/* partition table */#define FAL_PART_TABLE { {FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k", 0 , (3*128*1024), 0}, {FAL_PART_MAGIC_WROD, "download","onchip_flash_128k", (3*128*1024), (4*128*1024), 0}, }#endif /* FAL_PART_HAS_TABLE_CFG */#endif /* PACKAGES_FAL_V0_5_0_INC_FAL_CFG_H_ */

3.6、修改 app 固件配置3.6.1、修改中断向量表的跳转基地址为 0x8020000。#define RT_APP_PART_ADDR 0x8020000static int ota_app_vtor_reconfig(void){ #define NVIC_VTOR_MASK 0x3FFFFF80 /* Set the Vector Table base location by user application firmware definition */ SCB->VTOR = RT_APP_PART_ADDR & NVIC_VTOR_MASK; return 0;}INIT_BOARD_EXPORT(ota_app_vtor_reconfig);

3.6.2、修改app固件连接地址3.7、编译下载


本文标签: 修改 地址 固件 导出 发票