As mentioned in an other e-mail, the image compiled from the current trunk for LM3S6965 is too large to flash over. TO save space and for testing, I compiled an image without the ROM filesystem. However, I copied all files in romfs onto a micro SD card, with the plan to run the demos from there.
However, running pong (on the board) resulted in: eLua# lua /mmc/pong.lua Press CTRL+Z to exit Lua lua: /mmc/pong.lua:65: module 'EK-LM3S6965' not found: no field package.preload['EK-LM3S6965'] no file '/rom/EK-LM3S6965.lua' no file '/rom/EK-LM3S6965.lc' no file './EK-LM3S6965.so' no file '/usr/local/lib/lua/5.1/EK-LM3S6965.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: in function 'require' /mmc/pong.lua:65: in main chunk [C]: ? Which triggers the question: from does the on-board "require" get its search path? Thanks. Cheers -- Stefan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hello guys,
On v0.7 has indeed a problem with require finding files on SD/MMC. This was fixed (by me and Marcelo) in the current trunk and, as far as I can remember now, the search order for a filename is: 1- .lc (Lua compiled) on sd/mmc filesystem 2- .lua on sd/mmc filesystem 3- .lc on romfs 4- .lua on romfs Your error log shows Lua is searching only its default paths and this is strange. Are you sure you are running the trunk version ? Best Dado On Sun, Jun 13, 2010 at 16:24, Stefan Brantschen <[hidden email]> wrote: As mentioned in an other e-mail, the image compiled from the current trunk for LM3S6965 is too large to flash over. TO save space and for testing, I compiled an image without the ROM filesystem. However, I copied all files in romfs onto a micro SD card, with the plan to run the demos from there. _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hi
On 13 Jun 2010, at 21:40, Dado Sutter wrote: > This was fixed (by me and Marcelo) in the current trunk and, as far as I can remember now, the search order for a filename is: > > 1- .lc (Lua compiled) on sd/mmc filesystem > 2- .lua on sd/mmc filesystem > 3- .lc on romfs > 4- .lua on romfs > > Your error log shows Lua is searching only its default paths and this is strange. Are you sure you are running the trunk version ? I just compiled the trunk (for LM3S, conf see below) and ran a test for "require" (a file req1.lua with a simple 'require "test"', with test-lua not existing), with these results Error: [string "xmodem"]:3: module 'test' not found: no field package.preload['test'] no file '/rom/test.lua' no file '/rom/test.lc' no file './test.so' no file '/usr/local/lib/lua/5.1/test.so' no file '/usr/local/lib/lua/5.1/loadall.so' Do I miss something to get the search also in mmc? I compile with #define BUILD_XMODEM #define BUILD_SHELL #define BUILD_ROMFS #define BUILD_MMCFS #define BUILD_TERM //#define BUILD_UIP //#define BUILD_DHCPC //#define BUILD_DNS #define BUILD_CON_GENERIC #define BUILD_ADC //#define BUILD_RPC //#define BUILD_CON_TCP Cheers -- Stefan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
On Sun, Jun 20, 2010 at 12:40, Stefan Brantschen <[hidden email]> wrote: Reports are welcomed.I just compiled the trunk (for LM3S, conf see below) and ran a test for "require" (a file req1.lua with a simple 'require "test"', with test-lua not existing), with these results .......... Please update your trunk and try again now Stephane. Best Dado _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hi Dado
On 21 Jun 2010, at 23:15, Dado Sutter wrote: > On Sun, Jun 20, 2010 at 12:40, Stefan Brantschen <[hidden email]> wrote: > I just compiled the trunk (for LM3S, conf see below) and ran a test for "require" (a file req1.lua with a simple 'require "test"', with test-lua not existing), with these results > .......... > > Please update your trunk and try again now Stephane. > Reports are welcomed. Problem persists. Shouldn't line 108 in src/lua/luaconf.h read #define LUA_PATH_DEFAULT "/mmc/?.lua;/mmc/?.lc;/rom/?.lua;/rom/?.lc" in lieu of the current #define LUA_PATH_DEFAULT "/rom/?.lua;/rom/?.lc" Cheers -- Stefan _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
On Tue, Jun 22, 2010 at 02:02, Stefan Brantschen <[hidden email]> wrote: ................... Yes Stefan. I had fixed it only on line 93 and this is also needed on line 108. I've already commited the fix so you can update your trunk and try again, if you haven't done it locally already. Those #defines look a bit confusing to me, since we added the #ifdefs for LUA_RPC (and kept the original Lua checks for WIN32). I don't know for example, why we need to keep searching the original (Lua) paths of /, /lua for .lua and .lc files and even for the init.lua file. To respect the Lua feature of running an init.lua or init.lc file if found, we should instead add it to our /rom and /mmc search paths or to better merge this feature with our autorun right ? Tks for helping us to test it Best Dado
_______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Hello,
I could finally test it on a kit and require() is now working fine for modules on ROMFS and on MMC. eLua first search the SD/MMC for filename.lua, then filename.lc (lua compiled bytecodes). Then this search is repeated for files on ROMFS. The init.lua and init.lc is a Lua feature and eLua does not change it at all. For more information, see the PIL2, section 15.5, page 145. Stepan seem to still have another problem with Pong though. Could you explain it again, in another thread, if you haven't fixed it ? Best Dado On Tue, Jun 22, 2010 at 11:23, Dado Sutter <[hidden email]> wrote:
_______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
In reply to this post by Stefan Brantschen-3
On 25 Jun 2010, at 21:16, Dado Sutter <[hidden email]> wrote: Stepan seem to still have another problem with Pong though. Cheers -- Stefan Sent from my microwave. _______________________________________________ eLua-dev mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/elua-dev |
Free forum by Nabble | Edit this page |