134 lines
6.4 KiB
C
134 lines
6.4 KiB
C
|
|
/**
|
||
|
|
*****************************************************************************************
|
||
|
|
* Copyright(c) 2017, Realtek Semiconductor Corporation. All rights reserved.
|
||
|
|
*****************************************************************************************
|
||
|
|
* @file flash_map.h
|
||
|
|
* @brief Flash Layout Configuration, and flash layout must be changed with config file!
|
||
|
|
* @note flash_map.h must be generated by FlashMapGenerateTool!
|
||
|
|
* *************************************************************************************
|
||
|
|
*/
|
||
|
|
|
||
|
|
#ifndef _FLASH_MAP_H_
|
||
|
|
#define _FLASH_MAP_H_
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
extern "C" {
|
||
|
|
#endif
|
||
|
|
|
||
|
|
/*============================================================================*
|
||
|
|
* Flash Layout
|
||
|
|
*============================================================================*/
|
||
|
|
/* Flash total size 512KB
|
||
|
|
example:
|
||
|
|
1) Reserved: 4K (0x00800000)
|
||
|
|
2) OEM Header: 4K (0x00801000)
|
||
|
|
3) OTA Bank0: 300K (0x00802000)
|
||
|
|
a) OTA Header 4K (0x00802000)
|
||
|
|
b) Secure boot loader 4K (0x0080D000)
|
||
|
|
c) Patch code 40K (0x00803000)
|
||
|
|
d) Upperstack Code 92K (0x0080E000)
|
||
|
|
e) APP code 160K (0x00825000)
|
||
|
|
f) APP data1 0K (0x0084D000)
|
||
|
|
g) APP data2 0K (0x0084D000)
|
||
|
|
h) APP data3 0K (0x0084D000)
|
||
|
|
i) APP data4 0K (0x0084D000)
|
||
|
|
j) APP data5 0K (0x0084D000)
|
||
|
|
k) APP data6 0K (0x0084D000)
|
||
|
|
4) OTA Bank1: 0K (0x0084D000)
|
||
|
|
a) OTA Header 0K (0x00000000)
|
||
|
|
b) Secure boot loader 0K (0x00000000)
|
||
|
|
c) Patch code 0K (0x00000000)
|
||
|
|
d) Upperstack Code 0K (0x00000000)
|
||
|
|
e) APP code 0K (0x00000000)
|
||
|
|
f) APP data1 0K (0x00000000)
|
||
|
|
g) APP data2 0K (0x00000000)
|
||
|
|
h) APP data3 0K (0x00000000)
|
||
|
|
i) APP data4 0K (0x00000000)
|
||
|
|
j) APP data5 0K (0x00000000)
|
||
|
|
k) APP data6 0K (0x00000000)
|
||
|
|
5) FTL: 16K (0x0084D000)
|
||
|
|
6) OTA Tmp: 180K (0x00851000)
|
||
|
|
7) user data1: 4K (0x0087E000)
|
||
|
|
8) user data2: 4K (0x0087F000)
|
||
|
|
*/
|
||
|
|
|
||
|
|
/*============================================================================*
|
||
|
|
* Flash Layout Configuration (Generated by FlashMapGenerateTool)
|
||
|
|
*============================================================================*/
|
||
|
|
|
||
|
|
#define FLASH_ADDR 0x00800000 //Fixed
|
||
|
|
#define FLASH_SIZE 0x00080000 //512K Bytes
|
||
|
|
|
||
|
|
/* ========== High Level Flash Layout Configuration ========== */
|
||
|
|
#define RESERVED_ADDR 0x00800000
|
||
|
|
#define RESERVED_SIZE 0x00001000 //4K Bytes
|
||
|
|
#define OEM_CFG_ADDR 0x00801000
|
||
|
|
#define OEM_CFG_SIZE 0x00001000 //4K Bytes
|
||
|
|
#define OTA_BANK0_ADDR 0x00802000
|
||
|
|
#define OTA_BANK0_SIZE 0x0004B000 //300K Bytes
|
||
|
|
#define OTA_BANK1_ADDR 0x0084D000
|
||
|
|
#define OTA_BANK1_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define FTL_ADDR 0x0084D000
|
||
|
|
#define FTL_SIZE 0x00004000 //16K Bytes
|
||
|
|
#define OTA_TMP_ADDR 0x00851000
|
||
|
|
#define OTA_TMP_SIZE 0x0002D000 //180K Bytes
|
||
|
|
#define USER_DATA1_ADDR 0x0087E000
|
||
|
|
#define USER_DATA1_SIZE 0x00001000 //4K Bytes
|
||
|
|
#define USER_DATA2_ADDR 0x0087F000
|
||
|
|
#define USER_DATA2_SIZE 0x00001000 //4K Bytes
|
||
|
|
|
||
|
|
/* ========== OTA Bank0 Flash Layout Configuration ========== */
|
||
|
|
#define BANK0_OTA_HEADER_ADDR 0x00802000
|
||
|
|
#define BANK0_OTA_HEADER_SIZE 0x00001000 //4K Bytes
|
||
|
|
#define BANK0_SECURE_BOOT_ADDR 0x0080D000
|
||
|
|
#define BANK0_SECURE_BOOT_SIZE 0x00001000 //4K Bytes
|
||
|
|
#define BANK0_ROM_PATCH_ADDR 0x00803000
|
||
|
|
#define BANK0_ROM_PATCH_SIZE 0x0000A000 //40K Bytes
|
||
|
|
#define BANK0_UPPERSTACK_ADDR 0x0080E000
|
||
|
|
#define BANK0_UPPERSTACK_SIZE 0x00017000 //92K Bytes
|
||
|
|
#define BANK0_APP_ADDR 0x00825000
|
||
|
|
#define BANK0_APP_SIZE 0x00028000 //160K Bytes
|
||
|
|
#define BANK0_APP_DATA1_ADDR 0x0084D000
|
||
|
|
#define BANK0_APP_DATA1_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK0_APP_DATA2_ADDR 0x0084D000
|
||
|
|
#define BANK0_APP_DATA2_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK0_APP_DATA3_ADDR 0x0084D000
|
||
|
|
#define BANK0_APP_DATA3_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK0_APP_DATA4_ADDR 0x0084D000
|
||
|
|
#define BANK0_APP_DATA4_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK0_APP_DATA5_ADDR 0x0084D000
|
||
|
|
#define BANK0_APP_DATA5_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK0_APP_DATA6_ADDR 0x0084D000
|
||
|
|
#define BANK0_APP_DATA6_SIZE 0x00000000 //0K Bytes
|
||
|
|
|
||
|
|
/* ========== OTA Bank1 Flash Layout Configuration ========== */
|
||
|
|
#define BANK1_OTA_HEADER_ADDR 0x00000000
|
||
|
|
#define BANK1_OTA_HEADER_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK1_SECURE_BOOT_ADDR 0x00000000
|
||
|
|
#define BANK1_SECURE_BOOT_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK1_ROM_PATCH_ADDR 0x00000000
|
||
|
|
#define BANK1_ROM_PATCH_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK1_UPPERSTACK_ADDR 0x00000000
|
||
|
|
#define BANK1_UPPERSTACK_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK1_APP_ADDR 0x00000000
|
||
|
|
#define BANK1_APP_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK1_APP_DATA1_ADDR 0x00000000
|
||
|
|
#define BANK1_APP_DATA1_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK1_APP_DATA2_ADDR 0x00000000
|
||
|
|
#define BANK1_APP_DATA2_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK1_APP_DATA3_ADDR 0x00000000
|
||
|
|
#define BANK1_APP_DATA3_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK1_APP_DATA4_ADDR 0x00000000
|
||
|
|
#define BANK1_APP_DATA4_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK1_APP_DATA5_ADDR 0x00000000
|
||
|
|
#define BANK1_APP_DATA5_SIZE 0x00000000 //0K Bytes
|
||
|
|
#define BANK1_APP_DATA6_ADDR 0x00000000
|
||
|
|
#define BANK1_APP_DATA6_SIZE 0x00000000 //0K Bytes
|
||
|
|
|
||
|
|
|
||
|
|
#ifdef __cplusplus
|
||
|
|
}
|
||
|
|
#endif
|
||
|
|
/** @} */ /* _FLASH_MAP_H_ */
|
||
|
|
#endif
|