mirror of
https://github.com/elua/elua.git
synced 2025-01-25 01:02:54 +08:00
Another fix for LM3S stack/memory config (arm stacks are descending!)
This commit is contained in:
parent
81378aec51
commit
1601e287ad
@ -163,15 +163,15 @@
|
|||||||
// A, B, C, D, E, F, G, H, J
|
// A, B, C, D, E, F, G, H, J
|
||||||
|
|
||||||
#ifdef FORLM3S9B92
|
#ifdef FORLM3S9B92
|
||||||
#define MEM_TOTAL ( 0x18000 )
|
#define SRAM_SIZE ( 0x18000 )
|
||||||
#else
|
#else
|
||||||
#define MEM_TOTAL ( 0x10000 )
|
#define SRAM_SIZE ( 0x10000 )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Allocator data: define your free memory zones here in two arrays
|
// Allocator data: define your free memory zones here in two arrays
|
||||||
// (start address and end address)
|
// (start address and end address)
|
||||||
#define MEM_START_ADDRESS { ( void* )end }
|
#define MEM_START_ADDRESS { ( void* )end }
|
||||||
#define MEM_END_ADDRESS { ( void* )( SRAM_BASE + MEM_TOTAL - STACK_SIZE_TOTAL - 1 ) }
|
#define MEM_END_ADDRESS { ( void* )( SRAM_BASE + SRAM_SIZE - STACK_SIZE_TOTAL - 1 ) }
|
||||||
|
|
||||||
// *****************************************************************************
|
// *****************************************************************************
|
||||||
// CPU constants that should be exposed to the eLua "cpu" module
|
// CPU constants that should be exposed to the eLua "cpu" module
|
||||||
|
@ -61,7 +61,7 @@ extern int main(void);
|
|||||||
__attribute__ ((section(".isr_vector")))
|
__attribute__ ((section(".isr_vector")))
|
||||||
void (* const g_pfnVectors[])(void) =
|
void (* const g_pfnVectors[])(void) =
|
||||||
{
|
{
|
||||||
(void (*) (void))( SRAM_BASE + MEM_TOTAL - STACK_SIZE_TOTAL ),
|
(void (*) (void))( SRAM_BASE + SRAM_SIZE ),
|
||||||
// The initial stack pointer
|
// The initial stack pointer
|
||||||
ResetISR, // The reset handler
|
ResetISR, // The reset handler
|
||||||
NmiSR, // The NMI handler
|
NmiSR, // The NMI handler
|
||||||
|
Loading…
x
Reference in New Issue
Block a user