mirror of
https://github.com/elua/elua.git
synced 2025-01-25 01:02:54 +08:00
eLua now running on LM3S9B92. Some kinks and bugs to work out remain
- ADC always returns zero - many modules remain untested
This commit is contained in:
parent
d6c06625c8
commit
0cd9644745
@ -105,7 +105,7 @@ romfs = { 'bisect' : [ 'bisect.lua' ],
|
||||
file_list = { 'SAM7-EX256' : [ 'bisect', 'hangman' , 'led', 'piano', 'hello', 'info', 'morse' ],
|
||||
'EK-LM3S8962' : [ 'bisect', 'hangman', 'lhttpd', 'pong', 'led', 'piano', 'pwmled', 'tvbgone', 'hello', 'info', 'morse', 'adcscope','adcpoll' ],
|
||||
'EK-LM3S6965' : [ 'bisect', 'hangman', 'lhttpd', 'pong', 'led', 'piano', 'pwmled', 'tvbgone', 'hello', 'info', 'morse', 'adcscope','adcpoll' ],
|
||||
'EK-LM3S9B92' : [ 'bisect', 'hangman', 'lhttpd', 'led', 'hello', 'info', 'adcscope','adcpoll' ],
|
||||
'EK-LM3S9B92' : [ 'bisect', 'hangman', 'lhttpd', 'led', 'pwmled', 'hello', 'info', 'adcscope','adcpoll', 'life' ],
|
||||
'STR9-COMSTICK' : [ 'bisect', 'hangman', 'led', 'hello', 'info' ],
|
||||
'PC' : [ 'bisect', 'hello', 'info', 'life', 'hangman' ],
|
||||
'SIM' : [ 'bisect', 'hello', 'info', 'life', 'hangman' ],
|
||||
|
@ -13,7 +13,10 @@ if boardname == 'EAGLE-100':
|
||||
else:
|
||||
linkopts = ""
|
||||
|
||||
ldscript = "lm3s.ld"
|
||||
if boardname == 'EK-LM3S9B92':
|
||||
ldscript = "lm3s-9b92.ld"
|
||||
else:
|
||||
ldscript = "lm3s.ld"
|
||||
|
||||
# Prepend with path
|
||||
specific_files = " ".join( [ "src/platform/%s/%s" % ( platform, f ) for f in specific_files.split() ] )
|
||||
|
@ -74,7 +74,11 @@ static void adcs_init();
|
||||
int platform_init()
|
||||
{
|
||||
// Set the clocking to run from PLL
|
||||
#ifdef FORLM3S9B92
|
||||
SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ);
|
||||
#else
|
||||
SysCtlClockSet(SYSCTL_SYSDIV_4 | SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_XTAL_8MHZ);
|
||||
#endif
|
||||
|
||||
// Setup PIO
|
||||
pios_init();
|
||||
|
@ -106,13 +106,15 @@ LUALIB_API int ( luaopen_disp )( lua_State* L );
|
||||
|
||||
// Number of resources (0 if not available/not implemented)
|
||||
#ifdef FORLM3S9B92
|
||||
#define NUM_PIO 8
|
||||
#define NUM_PIO 7
|
||||
#else
|
||||
#define NUM_PIO 7
|
||||
#endif
|
||||
#define NUM_SPI 1
|
||||
#ifdef FORLM3S6965
|
||||
#define NUM_UART 3
|
||||
#elif FORLM3S9B92
|
||||
#define NUM_UART 3
|
||||
#else
|
||||
#define NUM_UART 2
|
||||
#endif
|
||||
@ -148,12 +150,21 @@ LUALIB_API int ( luaopen_disp )( lua_State* L );
|
||||
// #define PIO_PINS_PER_PORT (n) if each port has the same number of pins, or
|
||||
// #define PIO_PIN_ARRAY { n1, n2, ... } to define pins per port in an array
|
||||
// Use #define PIO_PINS_PER_PORT 0 if this isn't needed
|
||||
#define PIO_PIN_ARRAY { 8, 8, 8, 8, 4, 4, 2 }
|
||||
#ifdef FORLM3S9B92
|
||||
#define PIO_PIN_ARRAY { 8, 8, 8, 8, 8, 6, 8, 8, 8 }
|
||||
#else
|
||||
#define PIO_PIN_ARRAY { 8, 8, 8, 8, 4, 4, 2 }
|
||||
#endif
|
||||
// A, B, C, D, E, F, G, H, J
|
||||
|
||||
// Allocator data: define your free memory zones here in two arrays
|
||||
// (start address and end address)
|
||||
#define MEM_START_ADDRESS { ( void* )end }
|
||||
#define MEM_END_ADDRESS { ( void* )( SRAM_BASE + 0x10000 - STACK_SIZE_TOTAL - 1 ) }
|
||||
#ifdef FORLM3S9B92
|
||||
#define MEM_END_ADDRESS { ( void* )( SRAM_BASE + 0x10000 - STACK_SIZE_TOTAL - 1 ) }
|
||||
#else
|
||||
#define MEM_END_ADDRESS { ( void* )( SRAM_BASE + 0x18000 - STACK_SIZE_TOTAL - 1 ) }
|
||||
#endif
|
||||
|
||||
// *****************************************************************************
|
||||
// CPU constants that should be exposed to the eLua "cpu" module
|
||||
|
Loading…
x
Reference in New Issue
Block a user