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
ff6e5e99
Commit
ff6e5e99
authored
Jan 05, 2015
by
funshine
Browse files
build pre-build bin, auto save flash init data
parent
4851618f
Changes
8
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
ff6e5e99
# **NodeMcu** #
version 0.9.
4
version 0.9.
5
###A lua based firmware for wifi-soc esp8266
Build on
[
ESP8266 sdk 0.9.
4
](
http://bbs.espressif.com/viewtopic.php?f=
5
&t=
90
)
<br
/>
Build on
[
ESP8266 sdk 0.9.
5
](
http://bbs.espressif.com/viewtopic.php?f=
7
&t=
104
)
<br
/>
Lua core based on
[
eLua project
](
http://www.eluaproject.net/
)
<br
/>
File system based on
[
spiffs
](
https://github.com/pellepl/spiffs
)
<br
/>
Open source development kit for NodeMCU
[
nodemcu-devkit
](
https://github.com/nodemcu/nodemcu-devkit
)
<br
/>
...
...
@@ -13,6 +13,13 @@ bbs: [中文论坛Chinese bbs](http://bbs.nodemcu.com)<br />
Tencent QQ group QQ群: 309957875
<br
/>
# Change log
2015-01-05
<br
/>
update sdk to 0.9.5.
<br
/>
pre_build bin now compiled by gcc toolchain.
<br
/>
memory/heap usage optimized.
<br
/>
add support for multiple platform and toolchain include eclipse.
<br
/>
combine firmware for 512K, 1M, 2M, 4M flash to one. flash size auto-detected.
2014-12-30
<br
/>
modify uart.on api, when run_input set to 0, uart.on now can read raw data from uart.
<br
/>
serial input now accept non-ascii chars.
<br
/>
...
...
@@ -101,10 +108,11 @@ add tmr.time() api to get rtc time and calibration.
####*GNU toolchain is not tested*
####file ./app/include/user_config.h
```
c
#define FLASH_512K
//
#define FLASH_512K
// #define FLASH_1M
// #define FLASH_2M
// #define FLASH_4M
#define FLASH_AUTOSIZE
...
#define LUA_USE_MODULES
#ifdef LUA_USE_MODULES
...
...
@@ -119,12 +127,12 @@ add tmr.time() api to get rtc time and calibration.
#define LUA_USE_MODULES_ADC
#define LUA_USE_MODULES_UART
#define LUA_USE_MODULES_OW
//
#define LUA_USE_MODULES_BIT
#define LUA_USE_MODULES_BIT
#endif
/* LUA_USE_MODULES */
```
#Flash the firmware
nodemcu_
512k
.bin: 0x00000
<br
/>
nodemcu_
latest
.bin: 0x00000
<br
/>
for most esp8266 modules, just pull GPIO0 down and restart.
<br
/>
You can use the
[
nodemcu-flasher
](
https://github.com/nodemcu/nodemcu-flasher
)
to burn the firmware.
...
...
app/platform/flash_api.c
View file @
ff6e5e99
...
...
@@ -171,6 +171,20 @@ uint32_t flash_get_speed(void)
return
speed
;
}
bool
flash_init_data_written
(
void
)
{
// FLASH SEC - 4
// Dangerous, here are dinosaur infested!!!!!
// Reboot required!!!
// It will init system data to default!
uint32_t
data
[
2
]
ICACHE_STORE_ATTR
;
SPIRead
((
flash_get_sec_num
()
-
4
)
*
SPI_FLASH_SEC_SIZE
,
data
,
sizeof
(
data
));
if
(
data
[
0
]
==
0xFFFFFFFF
&&
data
[
1
]
==
0xFFFFFFFF
)
{
return
false
;
}
return
true
;
}
bool
flash_init_data_default
(
void
)
{
// FLASH SEC - 4
...
...
app/platform/flash_api.h
View file @
ff6e5e99
...
...
@@ -41,6 +41,7 @@ bool flash_set_size_byte(uint32_t);
uint16_t
flash_get_sec_num
(
void
);
uint8_t
flash_get_mode
(
void
);
uint32_t
flash_get_speed
(
void
);
bool
flash_init_data_written
(
void
);
bool
flash_init_data_default
(
void
);
bool
flash_init_data_blank
(
void
);
bool
flash_self_destruct
(
void
);
...
...
app/user/user_main.c
View file @
ff6e5e99
...
...
@@ -96,6 +96,10 @@ void user_init(void)
// test_romfs();
#elif defined ( BUILD_SPIFFS )
spiffs_mount
();
if
(
!
flash_init_data_written
()){
NODE_ERR
(
"Restore init data.
\n
"
);
flash_init_data_default
();
}
// test_spiffs();
#endif
// endpoint_setup();
...
...
pre_build/0.9.5/nodemcu_20150105.bin
0 → 100644
View file @
ff6e5e99
File added
pre_build/0.9.5/nodemcu_latest.bin
0 → 100644
View file @
ff6e5e99
File added
pre_build/latest/nodemcu_512k_latest.bin
View file @
ff6e5e99
No preview for this file type
pre_build/latest/nodemcu_latest.bin
0 → 100644
View file @
ff6e5e99
File added
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