1
0
mirror of https://github.com/elua/elua.git synced 2025-01-25 01:02:54 +08:00

Handle variable memory quantities on LM3S better.

This commit is contained in:
James Snyder 2009-10-13 22:51:36 +00:00
parent 5528ceeb7f
commit 00aba5981e
2 changed files with 8 additions and 7 deletions

View File

@ -162,14 +162,16 @@
#endif
// A, B, C, D, E, F, G, H, J
#ifdef FORLM3S9B92
#define MEM_TOTAL ( 0x18000 )
#else
#define MEM_TOTAL ( 0x10000 )
#endif
// Allocator data: define your free memory zones here in two arrays
// (start address and end address)
#define MEM_START_ADDRESS { ( void* )end }
#ifdef FORLM3S9B92
#define MEM_END_ADDRESS { ( void* )( SRAM_BASE + 0x18000 - STACK_SIZE_TOTAL - 1 ) }
#else
#define MEM_END_ADDRESS { ( void* )( SRAM_BASE + 0x10000 - STACK_SIZE_TOTAL - 1 ) }
#endif
#define MEM_END_ADDRESS { ( void* )( SRAM_BASE + MEM_TOTAL - STACK_SIZE_TOTAL - 1 ) }
// *****************************************************************************
// CPU constants that should be exposed to the eLua "cpu" module

View File

@ -61,8 +61,7 @@ extern int main(void);
__attribute__ ((section(".isr_vector")))
void (* const g_pfnVectors[])(void) =
{
//(void (*)(void))((unsigned long)pulStack + sizeof(pulStack)),
(void (*) (void))(SRAM_BASE + 64*1024),
(void (*) (void))( SRAM_BASE + MEM_TOTAL - STACK_SIZE_TOTAL ),
// The initial stack pointer
ResetISR, // The reset handler
NmiSR, // The NMI handler