fix MMU table overwrite issue

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1006 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
qiuyiuestc 2010-10-10 11:50:28 +00:00
parent da7bbdb0df
commit acfbfad25e
3 changed files with 8 additions and 11 deletions

View File

@ -62,9 +62,6 @@ SECTIONS
.nobss : { *(.nobss) }
. = 0x30200000;
.mmu_table : { *(.mmu_table) }
. = 0x30300000;
. = ALIGN(4);
__bss_start = .;
.bss : { *(.bss) }

View File

@ -5,14 +5,14 @@ LR_IROM1 0x30000000 0x1000000 {
.ANY (+RO)
}
ER_MMU 0x30400000 EMPTY 0x00100000 {
}
RW_IRAM1 0x30500000 { ; RW data
RW_IRAM1 +0 { ; RW data
.ANY (+RW)
}
ER_ZI +0 { ; ZI data
.ANY (+ZI)
}
ER_MMU 0x33FF0000 EMPTY 0x00100000 {
}
}

View File

@ -54,7 +54,8 @@ extern struct rt_device uart0_device;
rt_uint8_t _undefined_stack_start[512];
rt_uint8_t _abort_stack_start[512];
rt_uint8_t _svc_stack_start[1024] SECTION(".nobss");
extern int __bss_end;
extern unsigned char __bss_start;
extern unsigned char __bss_end;
#endif
/**
@ -63,7 +64,6 @@ extern struct rt_device uart0_device;
#if (defined (__GNUC__))
void *_sbrk (int incr)
{
extern int __bss_end; /* Set by linker. */
static char * heap_end;
char * prev_heap_end;
@ -110,9 +110,9 @@ void rtthread_startup(void)
/* init heap memory system */
#ifdef __CC_ARM
rt_system_heap_init((void*)&Image$$ER_ZI$$ZI$$Limit, (void*)0x34000000);
rt_system_heap_init((void*)&Image$$ER_ZI$$ZI$$Limit, (void*)0x33F00000);
#else
rt_system_heap_init((void*)0x32000000, (void*)0x34000000);
rt_system_heap_init((void*)&__bss_end, (void*)0x33F00000);
#endif
/* init scheduler system */