| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- /*
- * Copyright (c) 2006-2021, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- * 2022-01-17 19813 the first version
- */
- #ifndef APPLICATIONS_IAP_H_
- #define APPLICATIONS_IAP_H_
- ///
- ///
- ///
- ///
- ///
- /// 使用跳转功能前需要设置的几项
- ///
- /// 1. 设置boot loader工程的rom 起始地址不变 大小缩减为给bl预留的大小
- /// 设置位置在linkscripts stm32xxxx - > link.lds
- ///
- /// 2. 设置bl工程中的烧录方式由auto改为块擦除 选择烧录bin文件 起始位置不变
- ///
- /// 3. 设置app工程中 rom的起始位置为0x08000000 + bl预留空间的大小 设置rom大小为flash大小-bl大小
- ///
- /// 4. 设置app工程中的烧录方式由auto改为块擦除 选择烧录bin文件 起始位置改为0x08000000 + bl预留空间的大小
- ///
- /// 5. 在app工程中libraries\CMSIS\Device\ST\STM32G0xx\Source\Templates\System_stm32xxxx.h中
- /// 修改中断向量表的宏定义 VECT_TAB_OFFSET 的值 由默认值0x0U 改为app Rom起始地址
- /// 如预留32K给bootloader 则 VECT_TAB_OFFSET 的值设置为0x8000U 即可
- ///
- /// 6. 再BL工程中 #define app_start_addr 修改为 0x08000000 + VECT_TAB_OFFSET ( boot.c ) 同时修改iap.c中的定义
- ///
- /// 7. BL工程中 iap.c 和 at_client.c 中 #define 的 App_size 的大小改为app区 的空间大小
- ///
- ///
- ///
- ///
- ///
- ///
- uint8_t Sever_CMD_Response(uint8_t CMD_Type);
- uint8_t get_slave_num(void);
- uint8_t record_wait_sent(void);
- void MQTT_Send_Pub(uint8_t type);
- void Valve_CTL_Execute(uint8_t Cmd);
- int Get_cfg_value(uint16_t start_addr);
- uint8_t printf_sensor_list(uint8_t Type);
- u_int16_t printf_e_code(uint8_t times);
- uint8_t get_slave_addr(void);
- uint8_t Get_fw_crc(void);
- typedef struct Bak_info ///*/存放bak相关的所有参数 一次性读取 减少bl占用时间
- {
- uint8_t Bak_sta[3]; ///bak空间的状态,0 - > iap 空间 1 - > bak1空间 2 - > bak2空间
- uint16_t FW_Version[3]; ///bak空间中的固件版本号 存放固件版本的1000倍的整数
- uint16_t FW_Ver_tim[3]; ///存放bak空间中固件的记录日期
- ///具体算法为 高8位存放月的个数与年数*12的和 低八位存放日
- } Bak_info;
- typedef struct Unsend_buf
- {
- uint8_t fill_flag; //是否有数据等待发送标记位
- uint8_t buf[100]; //等待中的数据
- } Unsend_buf;
- #endif /* APPLICATIONS_IAP_H_ */
|