131 lines
5.1 KiB
C
131 lines
5.1 KiB
C
/****************************************************************************
|
|
|
|
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
|
|
|
|
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
|
|
be copied by any method or incorporated into another program without
|
|
the express written consent of Aerospace C.Power. This Information or any portion
|
|
thereof remains the property of Aerospace C.Power. The Information contained herein
|
|
is believed to be accurate and Aerospace C.Power assumes no responsibility or
|
|
liability for its use in any way and conveys no license or title under
|
|
any patent or copyright and makes no representation or warranty that this
|
|
Information is free from patent or copyright infringement.
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef _HW_MEM_MAP_H_
|
|
#define _HW_MEM_MAP_H_
|
|
|
|
#include "iot_config.h"
|
|
|
|
extern unsigned int _heap_end;
|
|
extern unsigned int _heap_start;
|
|
|
|
#define MEM_MAP_PART_0_ADDR ((int)&_heap_start)
|
|
#define MEM_MAP_PART_0_LENTH ((size_t)((unsigned char *)&_heap_end - \
|
|
(unsigned char*)&_heap_start))
|
|
|
|
#if (IOT_STA_CONTROL_MODE == IOT_STA_CONTROL_TYPE_STA)
|
|
|
|
#define MEM_MAP_RESERVED_BUF_SZ (300 * 1024)
|
|
|
|
#else /* (IOT_STA_CONTROL_MODE == IOT_STA_CONTROL_TYPE_STA) */
|
|
|
|
#define MEM_MAP_RESERVED_BUF_SZ (64 * 1024)
|
|
|
|
#endif /* (IOT_STA_CONTROL_MODE == IOT_STA_CONTROL_TYPE_STA) */
|
|
|
|
#if (RUN_IN_PSRAM)
|
|
|
|
#if (BUILD_AMP_TYPE == IOT_BUILD_AMP_CUSTOM)
|
|
|
|
#define MEM_MAP_PART_COUNT (1)
|
|
#define MEM_MAP_INTERNAL_RAM_PART_INDEX (0)
|
|
#define MEM_MAP_GROUP {MEM_MAP_PART_0_ADDR, MEM_MAP_PART_0_LENTH}
|
|
|
|
#else /* (BUILD_AMP_TYPE == IOT_BUILD_AMP_CUSTOM) */
|
|
|
|
#if (BUILD_AMP_TYPE == IOT_BUILD_AMP_NONE)
|
|
|
|
#define MEM_MAP_PART_1_ADDR (0x30000000)
|
|
#define MEM_MAP_PART_1_LENTH (0x8000)
|
|
#define MEM_MAP_PART_2_ADDR (0x701a8000)
|
|
#define MEM_MAP_PART_2_LENTH (0x658000)
|
|
#define MEM_MAP_PART_3_ADDR (0x80000000)
|
|
#define MEM_MAP_PART_3_LENTH (0x10000)
|
|
#define MEM_MAP_PART_COUNT (4)
|
|
#define MEM_MAP_INTERNAL_RAM_PART_INDEX (0)
|
|
#define MEM_MAP_GROUP {MEM_MAP_PART_0_ADDR, MEM_MAP_PART_0_LENTH, \
|
|
MEM_MAP_PART_1_ADDR, MEM_MAP_PART_1_LENTH, \
|
|
MEM_MAP_PART_2_ADDR, MEM_MAP_PART_2_LENTH, \
|
|
MEM_MAP_PART_3_ADDR, MEM_MAP_PART_3_LENTH}
|
|
|
|
#else /* (BUILD_AMP_TYPE == IOT_BUILD_AMP_NONE) */
|
|
|
|
#if BUILD_FASTBOOT_MODE
|
|
#define MEM_MAP_PART_1_ADDR (0x80000000)
|
|
#define MEM_MAP_PART_1_LENTH (0x5C0000)
|
|
#define MEM_MAP_PART_COUNT (2)
|
|
#define MEM_MAP_INTERNAL_RAM_PART_INDEX (0)
|
|
#define MEM_MAP_GROUP {MEM_MAP_PART_0_ADDR, MEM_MAP_PART_0_LENTH, \
|
|
MEM_MAP_PART_1_ADDR, MEM_MAP_PART_1_LENTH}
|
|
|
|
#else
|
|
|
|
#define MEM_MAP_PART_1_ADDR (0x80100000)
|
|
#define MEM_MAP_PART_1_LENTH (0x4C0000)
|
|
#define MEM_MAP_PART_COUNT (2)
|
|
#define MEM_MAP_INTERNAL_RAM_PART_INDEX (0)
|
|
#define MEM_MAP_GROUP {MEM_MAP_PART_0_ADDR, MEM_MAP_PART_0_LENTH, \
|
|
MEM_MAP_PART_1_ADDR, MEM_MAP_PART_1_LENTH}
|
|
#endif
|
|
|
|
#endif /* (BUILD_AMP_TYPE == IOT_BUILD_AMP_NONE) */
|
|
|
|
#endif /* (BUILD_AMP_TYPE == IOT_BUILD_AMP_CUSTOM) */
|
|
|
|
#else /* (RUN_IN_PSRAM) */
|
|
|
|
#if (BUILD_AMP_TYPE == IOT_BUILD_AMP_CUSTOM)
|
|
|
|
#define MEM_MAP_PART_COUNT (1)
|
|
#define MEM_MAP_INTERNAL_RAM_PART_INDEX (0)
|
|
#define MEM_MAP_GROUP {MEM_MAP_PART_0_ADDR, MEM_MAP_PART_0_LENTH}
|
|
|
|
#else /* (BUILD_AMP_TYPE == IOT_BUILD_AMP_CUSTOM) */
|
|
|
|
#if (BUILD_AMP_TYPE == IOT_BUILD_AMP_NONE)
|
|
|
|
#define MEM_MAP_PART_1_ADDR (0x30000000)
|
|
#define MEM_MAP_PART_1_LENTH (0x8000)
|
|
#define MEM_MAP_PART_2_ADDR (0x70000000)
|
|
#define MEM_MAP_PART_2_LENTH (0x10000)
|
|
#define MEM_MAP_PART_3_ADDR (0x80000000)
|
|
#define MEM_MAP_PART_3_LENTH (0x10000)
|
|
#define MEM_MAP_PART_COUNT (4)
|
|
#define MEM_MAP_INTERNAL_RAM_PART_INDEX (0)
|
|
#define MEM_MAP_GROUP {MEM_MAP_PART_0_ADDR, MEM_MAP_PART_0_LENTH, \
|
|
MEM_MAP_PART_1_ADDR, MEM_MAP_PART_1_LENTH, \
|
|
MEM_MAP_PART_2_ADDR, MEM_MAP_PART_2_LENTH, \
|
|
MEM_MAP_PART_3_ADDR, MEM_MAP_PART_3_LENTH}
|
|
|
|
#else /* (BUILD_AMP_TYPE == IOT_BUILD_AMP_NONE) */
|
|
|
|
#define MEM_MAP_PART_1_ADDR (0x70000000)
|
|
#define MEM_MAP_PART_1_LENTH (0x10000)
|
|
#define MEM_MAP_PART_2_ADDR (0x80000000)
|
|
#define MEM_MAP_PART_2_LENTH (0x10000)
|
|
#define MEM_MAP_PART_COUNT (3)
|
|
#define MEM_MAP_INTERNAL_RAM_PART_INDEX (0)
|
|
#define MEM_MAP_GROUP {MEM_MAP_PART_0_ADDR, MEM_MAP_PART_0_LENTH, \
|
|
MEM_MAP_PART_1_ADDR, MEM_MAP_PART_1_LENTH, \
|
|
MEM_MAP_PART_2_ADDR, MEM_MAP_PART_2_LENTH}
|
|
|
|
#endif /* (BUILD_AMP_TYPE == IOT_BUILD_AMP_NONE) */
|
|
|
|
#endif /* (BUILD_AMP_TYPE == IOT_BUILD_AMP_CUSTOM) */
|
|
|
|
#endif /* (RUN_IN_PSRAM) */
|
|
|
|
#endif /* _HW_MEM_MAP_H_ */
|