405 iap 工程结构调试

Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
2024-07-24 16:22:31 +08:00
parent b1d8ce2643
commit c1bcad0c50
8 changed files with 378 additions and 195 deletions

View File

@@ -59,8 +59,17 @@ void SystemClock_Config(void)
HAL_RCC_EnableCSS();
}
//extern int iap_main_entry(void);
//INIT_ENV_EXPORT(iap_main_entry);
extern int iap_main_entry(void);
INIT_ENV_EXPORT(iap_main_entry);
#include "shell.h"
INIT_APP_EXPORT(finsh_system_init);
extern void fal(uint8_t argc, char **argv);
MSH_CMD_EXPORT(fal, FAL (Flash Abstraction Layer) operate.);
extern int fal_init(void);
INIT_COMPONENT_EXPORT(fal_init);
#include <stdlib.h>
static void reset_fc(int argc, char **argv)

View File

@@ -22,12 +22,10 @@
#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)
#define FLASH_SIZE_APP (4 * 128 * 1024)
#define FLASH_SIZE_APP (6 * 128 * 1024)
#define FLASH_SIZE_PARAM (128 * 1024)
#define FLASH_SIZE_LOG (2 * 128 * 1024)
#define FLASH_OFFSET_PARAM (FLASH_SIZE_APP)
#define FLASH_OFFSET_LOG (FLASH_SIZE_APP + FLASH_SIZE_PARAM)
extern const struct fal_flash_dev stm32_onchip_flash_16k;
extern const struct fal_flash_dev stm32_onchip_flash_64k;
@@ -45,12 +43,11 @@ extern const struct fal_flash_dev stm32_onchip_flash_128k;
/* partition table */
/**
* @brief flash ??:
* @brief flash:
* section addr size
* 0 - 4 0x08000000 128kb bootloader
* 5 - 8 0x08020000 512KB app
* 9 0x080A0000 128KB param
* 10 - 11 0x080C0000 256kb ulog
* 5 - 10 0x08020000 768KB app
* 11 0x080E0000 128KB param
*
*/
#define FAL_PART_TABLE \
@@ -58,7 +55,6 @@ extern const struct fal_flash_dev stm32_onchip_flash_128k;
{FAL_PART_MAGIC_WROD, "boot", "onchip_flash_64k", 0 , FLASH_SIZE_GRANULARITY_16K + FLASH_SIZE_GRANULARITY_64K , 0}, \
{FAL_PART_MAGIC_WROD, "app", "onchip_flash_128k", 0 , FLASH_SIZE_APP, 0}, \
{FAL_PART_MAGIC_WROD, "param", "onchip_flash_128k", FLASH_OFFSET_PARAM , FLASH_SIZE_PARAM, 0}, \
{FAL_PART_MAGIC_WROD, "ulog", "onchip_flash_128k", FLASH_OFFSET_LOG , FLASH_SIZE_LOG, 0}, \
}
#endif /* FAL_PART_HAS_TABLE_CFG */