Hi,
I'm trying to run script LED.lua from examples, but I have problem with pio function - error: stdin:1: attempt to index global 'pio' (a nil value) stack traceback: stdin:1: in main chunk [C]: ? My script: local uartid, invert, ledpin = 0, false ledpin = pio.PF_2 function cycle() pio.pin.sethigh( ledpin ) tmr.delay( 0, 500000 ) pio.pin.setlow( ledpin ) tmr.delay( 0, 500000 ) end pio.pin.setdir( pio.OUTPUT, ledpin ) while uart.getchar( uartid, 0 ) == "" do cycle() end I was trying use function - module(...) - but then I have this error: stdin:1: bad argument #1 to 'module' (string expected, got no value) stack traceback: [C]: in function 'module' stdin:1: in main chunk [C]: ? My platform is LM3S and version of my eLUA is v0.9. In board configuration in theory I have added pio module: components = { sercon = { uart = 0, speed = 115200 }, wofs = true, romfs = true, --shell = true, advanced_shell = true, term = { lines = 25, cols = 80 }, cints = true, lm3s_pio = true; rpc = { uart = 0, speed = 115200 }, adc = { buf_size = 2 }, xmodem = true, linenoise = { shell_lines = 10, lua_lines = 30 } }, modules = { generic = { 'all', '-pio', '-cpu', '-i2c', '-net' }, platform = {'all'} } Does anybody have any idea what I do wrong? Best Roman |
Maybe I have to put name of the module in module("some module name")?
But what modules do I have to add? Best , Roman |
In reply to this post by Roman
Did you try this before you adjusted your configuration file?
The items with dashes in front of them in the modules section will actually disable them: modules = { generic = { 'all', '-pio', '-cpu', '-i2c', '-net' }, platform = {'all'} } So this disables pio, cpu, i2c & net. the 'all' should include pio. You can check that modules have been built in to your project by typing something like: print(pio) at the prompt. If present you should see a response like: romtable: 0x2eac0 Best. -jsnyder On Fri, Sep 5, 2014 at 9:29 AM, Roman [via eLua Development] <[hidden email]> wrote: Hi, James Snyder
ph: (847) 448-0386 |
Free forum by Nabble | Edit this page |