Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for DIO write protect issue, automatic entrypoint extraction #52

Merged
merged 2 commits into from
Jul 8, 2015

Conversation

jmattsson
Copy link
Contributor

I originally made these changes for the NodeMCU project. Most notably it works around the issue where the flash ends up in write-protect mode when DIO is used, and as such fixes #40. The hows and whys are already referenced within that thread by Marcel.

The second change is to make esptool extract the actual entry point from the ELF file rather than assume a hardcoded call_user_start.

Johny Mattsson added 2 commits July 3, 2015 12:52
This removes the need to manually override the entry when using firmware
with a different (and not necessarily fixed) entry point.
@omerk
Copy link

omerk commented Jul 8, 2015

@jmattsson Thanks for this fix, I can verify that it solves the filesystem issues I've been having on the new NodeMCU boards.

@themadinventor esptool, without this fix, is currently broken for all NodeMCU R2 board users. Please consider merging this PR.

themadinventor added a commit that referenced this pull request Jul 8, 2015
Workaround for DIO write protect issue, automatic entrypoint extraction
@themadinventor themadinventor merged commit 043f928 into espressif:master Jul 8, 2015
@themadinventor
Copy link
Collaborator

Thanks! I've been inexcusably absent for a while now...

@creationix
Copy link

Awesome work everyone!

@thehose
Copy link

thehose commented Aug 24, 2015

Hey folks,
I have a NodeMCU V2 board (from China) which came pre-loaded with Lua. I actually want to use Micropython, so I setup a build environment (OSX), built and loaded uPy on the board and while I get a prompt, it's really disabled. I get a memory check error.
screen shot 2015-08-24 at 1 57 58 pm
After a lot of google, I came across this issue with esptool.py and thought I'd found the problem. Got the latest version of the tool and changed the defaults for -fm/DIO and -fs/32m in the tool.
Same results.. I thought maybe it's a uPy issue, so to test I tried to load the latest Lua 0.9.6 using the tool as ( esptool.py --port=/dev/tty.SLAB_USBtoUART write_flash 0 ~/Desktop/nodemcu_integer_0.9.6-dev_20150704.bin -fs 32m -fm dio -ff 40m) and same type of issue..
screen shot 2015-08-24 at 2 06 47 pm

Any advise would be appreciated.....

@jmattsson
Copy link
Contributor Author

The MEM CHECK FAIL!!! is actually completely(?) harmless, though it doesn't sound like it. During boot-up the system looks for various saved values (calibration etc) in RTC system memory. On a cold-boot (either power-on or releasing CH_PD line) the RTC memory is uninitialised, and this message gets printed. On a reboot you would not get it.

@thehose
Copy link

thehose commented Aug 25, 2015

I have a Nodemcu V2 development board and this only happens when I depress the "RST" button, which I have to do when I upload any firmware. Is this what you refer to as a reboot ?

@projectgus projectgus mentioned this pull request Oct 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please support the new NodeMCU V1.0 with DIO mode
5 participants