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

basic_example on esp-12e (nodemcu v1.0) doesn't work #18

Open
adibacco opened this issue Apr 17, 2016 · 1 comment
Open

basic_example on esp-12e (nodemcu v1.0) doesn't work #18

adibacco opened this issue Apr 17, 2016 · 1 comment

Comments

@adibacco
Copy link

adibacco commented Apr 17, 2016

I built the basic_example (https://github.com/esp8266/source-code-examples.git) and simply put the following code at the beginning of user_init

    uart_div_modify(0, UART_CLK_FREQ / 115200);

    while (true) {
        os_printf("Starting\n\r");
        os_delay_us(1000000);
    }

then considering that nodemcu v1.0 uses DIO for SPI flash, I modified the Makefile in two places:

- $(Q) $(ESPTOOL) elf2image -o $(FW_BASE)/ $(TARGET_OUT)
+ $(Q) $(ESPTOOL) elf2image --version=2 -o $(FW_BASE)/fw.bin $(TARGET_OUT)

in order to obtain a single bin and I added some options to esptool for loading:

- $(ESPTOOL) --port $(ESPPORT) write_flash $(FW_FILE_1_ADDR) $(FW_FILE_1) $(FW_FILE_2_ADDR) $(FW_FILE_2)
+ $(ESPTOOL) --port $(ESPPORT) write_flash -fm dio -fs 32m -ff 40m $(FW_FILE_ADDR) $(FW_BASE)/$(FW_FILE)

The program doesn't start up, I expected a periodic printing but I don't get anything.

I tried to load the nodemcu bin with the esptool command and I get a CHECK MEM FAIL even if it does work.

@adibacco adibacco changed the title basic_example on esp-12e (nodemcu v2) doesn't work basic_example on esp-12e (nodemcu v1.0) doesn't work Apr 17, 2016
@dfries
Copy link

dfries commented Jul 3, 2016

This is the first day I've tried to load anything on the ESP8266 myself. I was getting garbage out of the stock basic_example myself. You do need uart_div_modify, with that infinite loop in there I get a few Starting followed by a watchdog timer reboot, add the uart_div_modify but put your print in the provided loop function (don't have that infinite loop). You must have a different problem though, because you should at least see something.

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

No branches or pull requests

2 participants