mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
examples/lua*: adapt to the blob mechanism
This commit is contained in:
parent
d191b9c38a
commit
ead8b80cb9
@ -25,28 +25,7 @@ CFLAGS += -DTHREAD_STACKSIZE_MAIN='(THREAD_STACKSIZE_DEFAULT+7000)'
|
||||
|
||||
USEPKG += lua
|
||||
|
||||
LUA_PATH = $(BINDIR)/lua
|
||||
|
||||
# add directory of generated *.lua.h files to include path
|
||||
CFLAGS += -I$(LUA_PATH)
|
||||
|
||||
# generate .lua.h header files of .lua files
|
||||
LUA = $(wildcard *.lua)
|
||||
|
||||
LUA_H = $(LUA:%.lua=$(LUA_PATH)/%.lua.h)
|
||||
|
||||
BUILDDEPS += $(LUA_H) $(LUA_PATH)/
|
||||
BLOBS += $(wildcard *.lua)
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
# The code below generates a header file from any .lua scripts in the
|
||||
# example directory. The header file contains a byte array of the
|
||||
# ASCII characters in the .lua script.
|
||||
|
||||
$(LUA_PATH)/:
|
||||
$(Q)mkdir -p $@
|
||||
|
||||
# FIXME: This way of embedding lua code is not robust. A proper script will
|
||||
# be included later.
|
||||
$(LUA_H): $(LUA_PATH)/%.lua.h: %.lua | $(LUA_PATH)/
|
||||
$(Q)xxd -i $< | sed 's/^unsigned/const unsigned/g' > $@
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "lua_run.h"
|
||||
#include "lua_builtin.h"
|
||||
#include "repl.lua.h"
|
||||
#include "blob/repl.lua.h"
|
||||
|
||||
/* The basic interpreter+repl needs about 13k ram AT Minimum but we need more
|
||||
* memory in order to do interesting stuff.
|
||||
|
@ -22,28 +22,7 @@ endif
|
||||
|
||||
USEPKG += lua
|
||||
|
||||
LUA_PATH = $(BINDIR)/lua
|
||||
|
||||
# add directory of generated *.lua.h files to include path
|
||||
CFLAGS += -I$(LUA_PATH)
|
||||
|
||||
# generate .lua.h header files of .lua files
|
||||
LUA = $(wildcard *.lua)
|
||||
|
||||
LUA_H = $(LUA:%.lua=$(LUA_PATH)/%.lua.h)
|
||||
|
||||
BUILDDEPS += $(LUA_H) $(LUA_PATH)/
|
||||
BLOBS += $(wildcard *.lua)
|
||||
|
||||
include $(RIOTBASE)/Makefile.include
|
||||
|
||||
# The code below generates a header file from any .lua scripts in the
|
||||
# example directory. The header file contains a byte array of the
|
||||
# ASCII characters in the .lua script.
|
||||
|
||||
$(LUA_PATH)/:
|
||||
$(Q)mkdir -p $@
|
||||
|
||||
# FIXME: This way of embedding lua code is not robust. A proper script will
|
||||
# be included later.
|
||||
$(LUA_H): $(LUA_PATH)/%.lua.h: %.lua | $(LUA_PATH)/
|
||||
$(Q)xxd -i $< | sed 's/^unsigned/const unsigned/g' > $@
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "lualib.h"
|
||||
#include "lua_run.h"
|
||||
|
||||
#include "main.lua.h"
|
||||
#include "blob/main.lua.h"
|
||||
|
||||
#define LUA_MEM_SIZE (11000)
|
||||
static char lua_mem[LUA_MEM_SIZE] __attribute__ ((aligned(__BIGGEST_ALIGNMENT__)));
|
||||
|
Loading…
Reference in New Issue
Block a user