This commit is contained in:
pvvx 2016-12-05 11:48:41 +03:00
parent ad9b495d7e
commit 494a7e1b39
31 changed files with 391 additions and 851 deletions

View file

@ -171,14 +171,19 @@ SRAM_BF_DATA_SECTION
#endif
static unsigned char ucHeap[configTOTAL_HEAP_SIZE];
extern void * __sdram_bss_end__; //, __ram_image1_text_end__, __ram_image2_text_start__;
#if defined(CONFIG_PLATFORM_8195A)
HeapRegion_t xHeapRegions[] =
{
{ (uint8_t*)0x10002300, 0x3D00 }, // Image1 recycle heap (15616 bytes)
{ (uint8_t*)0x10002300, 0x10006000 - 0x10002300 }, // Image1 recycle heap (__ram_image2_text_start__ - __ram_image1_text_end__)
{ ucHeap, sizeof(ucHeap) }, // Defines a block from ucHeap
#if 0
{ (uint8_t*)0x301b5000, 300*1024 }, // SDRAM heap
#endif
#ifdef CONFIG_SDR_EN
{ (uint8_t*)&__sdram_bss_end__, 0x80000 },
#endif
// { NULL, 0 }, // add SDRAM heap
{ NULL, 0 } // Terminates the array.
};
@ -222,7 +227,12 @@ void *pvReturn = NULL;
if(pxEnd == NULL)
{
#if defined(CONFIG_PLATFORM_8195A)
// xHeapRegions[0].pucStartAddress = __ram_image1_text_end__;
// xHeapRegions[0].xSizeInBytes = (u32)&__ram_image2_text_start__ - (u32)xHeapRegions[0].pucStartAddress;
xHeapRegions[1].xSizeInBytes = (u32)0x10070000 - (u32)xHeapRegions[1].pucStartAddress;
#ifdef CONFIG_SDR_EN
xHeapRegions[2].xSizeInBytes = (u32)0x30200000 - (u32)xHeapRegions[2].pucStartAddress;
#endif
#endif
vPortDefineHeapRegions( xHeapRegions );
}

View file

@ -14,7 +14,8 @@ typedef enum _RT_DEV_LOCK_E
{
RT_DEV_LOCK_EFUSE = 0,
RT_DEV_LOCK_FLASH = 1,
RT_DEV_LOCK_MAX = 2
RT_DEV_LOCK_CRYPTO = 2,
RT_DEV_LOCK_MAX = 3
}RT_DEV_LOCK_E;
void device_mutex_lock(RT_DEV_LOCK_E device);

View file

@ -54,7 +54,6 @@
#ifdef CONFIG_TIMER_MODULE
#include "hal_misc.h"
#define __Delay(t) HalDelayUs(t)
#else
static __inline__ u32 __Delay(u32 us)
@ -67,7 +66,7 @@ static __inline__ u32 __Delay(u32 us)
#define Mdelay(t) __Delay(t*1000)
#define Udelay(t) __Delay(t)
#undef ASSERT
#define ASSERT(_bool_) do { } while (0)
//#define panic_printk DiagPrintf

View file

@ -7,7 +7,7 @@
#define TCM_HEAP_SIZE (42*1024)
#define TCM_HEAP_SIZE (42*1024) // min size
// MAX_BACKUP_SIZE in hal_soc_ps_monitor = 129*4, 0x1FFFFFFC - 129*4 = 0x1FFFFD18 !
#define tcm_heap_size ((0x20000000 - (u32)&tcm_heap - 768 + sizeof(heap_buf_t) - 1)/sizeof(heap_buf_t))*sizeof(heap_buf_t)