Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
21c4e110
Commit
21c4e110
authored
Oct 07, 2015
by
Johny Mattsson
Browse files
Enable dynamic build dates, plus print SDK version.
parent
439f72c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
21c4e110
...
@@ -3,15 +3,16 @@ before_install:
...
@@ -3,15 +3,16 @@ before_install:
-
sudo apt-get install -y python-serial srecord
-
sudo apt-get install -y python-serial srecord
install
:
install
:
-
tar -zxvf tools/esp-open-sdk.tar.gz
-
tar -zxvf tools/esp-open-sdk.tar.gz
-
export PATH=$PATH:$PWD/esp-open-sdk/
sdk:$PWD/esp-open-sdk/
xtensa-lx106-elf/bin
-
export PATH=$PATH:$PWD/esp-open-sdk/xtensa-lx106-elf/bin
script
:
script
:
-
make all
-
export BUILD_DATE=$(date +%Y%m%d)
-
make EXTRA_CCFLAGS="-DBUILD_DATE='\"'$BUILD_DATE'\"'" all
-
cd bin/
-
cd bin/
-
file_name_float="nodemcu_float_${TRAVIS_TAG}.bin"
-
file_name_float="nodemcu_float_${TRAVIS_TAG}.bin"
-
srec_cat -output ${file_name_float} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
-
srec_cat -output ${file_name_float} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
-
cd ../
-
cd ../
-
make clean
-
make clean
-
make EXTRA_CCFLAGS="-DLUA_NUMBER_INTEGRAL"
-
make EXTRA_CCFLAGS="-DLUA_NUMBER_INTEGRAL
-DBUILD_DATE='\"'$BUILD_DATE'\"'
"
-
cd bin/
-
cd bin/
-
file_name_integer="nodemcu_integer_${TRAVIS_TAG}.bin"
-
file_name_integer="nodemcu_integer_${TRAVIS_TAG}.bin"
-
srec_cat -output ${file_name_integer} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
-
srec_cat -output ${file_name_integer} -binary 0x00000.bin -binary -fill 0xff 0x00000 0x10000 0x10000.bin -binary -offset 0x10000
...
...
app/include/user_version.h
View file @
21c4e110
...
@@ -7,6 +7,10 @@
...
@@ -7,6 +7,10 @@
#define NODE_VERSION_INTERNAL 0U
#define NODE_VERSION_INTERNAL 0U
#define NODE_VERSION "NodeMCU 1.4.0"
#define NODE_VERSION "NodeMCU 1.4.0"
#define BUILD_DATE "build 20151006"
#ifndef BUILD_DATE
#define BUILD_DATE "20151006"
#endif
extern
char
SDK_VERSION
[];
#endif
/* __USER_VERSION_H__ */
#endif
/* __USER_VERSION_H__ */
app/lua/lua.c
View file @
21c4e110
...
@@ -135,9 +135,13 @@ static int docall (lua_State *L, int narg, int clear) {
...
@@ -135,9 +135,13 @@ static int docall (lua_State *L, int narg, int clear) {
}
}
static
void
print_version
(
void
)
{
static
void
print_version
(
lua_State
*
L
)
{
// l_message(NULL, LUA_RELEASE " " LUA_COPYRIGHT);
lua_pushliteral
(
L
,
"
\n
"
NODE_VERSION
" build "
BUILD_DATE
" powered by "
LUA_RELEASE
" on SDK "
);
l_message
(
NULL
,
"
\n
"
NODE_VERSION
" "
BUILD_DATE
" powered by "
LUA_RELEASE
);
lua_pushstring
(
L
,
SDK_VERSION
);
lua_concat
(
L
,
2
);
const
char
*
msg
=
lua_tostring
(
L
,
-
1
);
l_message
(
NULL
,
msg
);
lua_pop
(
L
,
1
);
}
}
...
@@ -399,7 +403,7 @@ static int pmain (lua_State *L) {
...
@@ -399,7 +403,7 @@ static int pmain (lua_State *L) {
lua_gc
(
L
,
LUA_GCSTOP
,
0
);
/* stop collector during initialization */
lua_gc
(
L
,
LUA_GCSTOP
,
0
);
/* stop collector during initialization */
luaL_openlibs
(
L
);
/* open libraries */
luaL_openlibs
(
L
);
/* open libraries */
lua_gc
(
L
,
LUA_GCRESTART
,
0
);
lua_gc
(
L
,
LUA_GCRESTART
,
0
);
print_version
();
print_version
(
L
);
s
->
status
=
handle_luainit
(
L
);
s
->
status
=
handle_luainit
(
L
);
#if 0
#if 0
if (s->status != 0) return 0;
if (s->status != 0) return 0;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment