From 0c72d22804f4748d8ca124d0c95f32e3e765ec57 Mon Sep 17 00:00:00 2001 From: a1012112796 <1012112796@qq.com> Date: Mon, 27 Mar 2023 17:31:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E5=8F=82=E6=95=B0=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E9=A2=84=E5=A4=87=E4=B8=80=E5=9D=97=20flash?= =?UTF-8?q?=20=E6=89=87=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: a1012112796 <1012112796@qq.com> --- board/fal_cfg.h | 10 +++++++--- project.uvoptx | 2 +- project.uvprojx | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/board/fal_cfg.h b/board/fal_cfg.h index 883bfb7..971d34c 100644 --- a/board/fal_cfg.h +++ b/board/fal_cfg.h @@ -22,10 +22,12 @@ #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 (5 * 128 * 1024) +#define FLASH_SIZE_APP (4 * 128 * 1024) +#define FLASH_SIZE_PARAM (128 * 1024) #define FLASH_SIZE_LOG (2 * 128 * 1024) -#define FLASH_OFFSET_LOG (FLASH_SIZE_APP) +#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; @@ -46,7 +48,8 @@ extern const struct fal_flash_dev stm32_onchip_flash_128k; * @brief flash 分配: * section addr size * 0 - 4 0x08000000 128kb bootloader - * 5 - 9 0x08020000 640kb app + * 5 - 8 0x08020000 512KB app + * 9 0x080A0000 128KB param * 10 - 11 0x080C0000 256kb ulog * */ @@ -54,6 +57,7 @@ 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}, \ } diff --git a/project.uvoptx b/project.uvoptx index 95ce837..0d12d8b 100644 --- a/project.uvoptx +++ b/project.uvoptx @@ -744,7 +744,7 @@ Fal - 0 + 1 0 0 0 diff --git a/project.uvprojx b/project.uvprojx index 328ccfa..9d1a0ca 100644 --- a/project.uvprojx +++ b/project.uvprojx @@ -16,8 +16,8 @@ STM32F413VGTx STMicroelectronics - Keil.STM32F4xx_DFP.2.16.0 - http://www.keil.com/pack/ + Keil.STM32F4xx_DFP.2.17.0 + https://www.keil.com/pack/ IRAM(0x20000000,0x00050000) IROM(0x08000000,0x00100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE