@@ -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)
|
||||
|
@@ -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 */
|
||||
|
Reference in New Issue
Block a user