-->
Page 14 of 14

Re: Official GCC compiler VM from Espressif

PostPosted: Sat May 13, 2017 10:43 pm
by GentlemanEngineer
davydnorris wrote:
Narasing wrote:code uploaded succeeds but ESP8266 (NodeMCU) doesn't run for ESP8266_RTOS_SDK v1.4.0


--
I'm trying to run blinking LED program using ESP8266_RTOS_SDK on LUBUNTU by espressif.
program link-->https://github.com/sarwadenj/ESP8266_RTOS/tree/master/test_2
also i written another program and set WiFi in station mode--->https://github.com/sarwadenj/ESP8266_RTOS/blob/master/wifi/user/user_main.c

I compiled my program using
./gen_misc.sh
and set
STEP 1: use boot_v1.2+ by default
STEP 2: generate bin: user1.bin
STEP 3: spi speed: 40 MHz
STEP 4: spi mode: QIO
STEP 5: spi size: 4096KB
spi ota map: 1024KB + 1024KB

and uploaded code going into Bin_path-->
sudo esptool.py --port /dev/ttyUSB0 write_flash --flash_mode qio 0x2000 user1.4096.new.6.bin

it uploaded successfully but code didn't run. So what should be the problem. is I'm missing something.

Is there any solution for this?
Thanks in advance.


Couple of things spring out...

- If your chip is 4M then you need to specify its size as 32m (32m BIT) on the esptool command line.
- you also need to load your user1 at 0x1000, esp_init_data_default.bin at 0x3FC000, and blank.bin at both 0xFE000 and 0x3FE000


I have attempted this process, and fail to obtain a running program on the Wemos D1 Mini with the latest version of ESP8266 RTOS SDK. I am curious where the concept of writing blank.bin to the slot reserved for master_device_key.bin arises.

The preamble of eagle.app.v6.new.1024.app1.ld appears to state:

/* Flash Map (1024KB + 1024KB), support 2MB/4MB SPI Flash */
/* |..|........................|.....|.....|..|........................|.....|....| */
/* ^ ^ ^ ^ ^ ^ ^ ^ */
/* |_boot start(0x0000) | | |_pad start(0x100000) | | */
/* |_user1 start(0x1000) |_user1 end |_user2 start(0x101000) |_user2 end */
/* |_system param symmetric area(0xfb000) |_system param area(0x1fb000) */


which contradicts that which you stated (and that stated in the official literature).

Would you be able to shed any light upon this?

Re: Official GCC compiler VM from Espressif

PostPosted: Tue May 16, 2017 6:58 pm
by davydnorris
GentlemanEngineer wrote:I have attempted this process, and fail to obtain a running program on the Wemos D1 Mini with the latest version of ESP8266 RTOS SDK. I am curious where the concept of writing blank.bin to the slot reserved for master_device_key.bin arises.

If you are not using the IoT samples that connect to the Espressif platform, then this area is not used and can be zeroed out. If you are using the Espressif platform then you'll need to prepare and write your personal device key into this area. See:
http://bbs.espressif.com/viewtopic.php?t=50

The preamble of eagle.app.v6.new.1024.app1.ld appears to state:

/* Flash Map (1024KB + 1024KB), support 2MB/4MB SPI Flash */
/* |..|........................|.....|.....|..|........................|.....|....| */
/* ^ ^ ^ ^ ^ ^ ^ ^ */
/* |_boot start(0x0000) | | |_pad start(0x100000) | | */
/* |_user1 start(0x1000) |_user1 end |_user2 start(0x101000) |_user2 end */
/* |_system param symmetric area(0xfb000) |_system param area(0x1fb000) */


which contradicts that which you stated (and that stated in the official literature).

Would you be able to shed any light upon this?


I think this has not been updated to reflect the larger chip sizes. For flash mode 6 (4MB, 1024+1024) I actually use eagle.app.v6.new.2048.ld instead.

The Wemos D1 mini units that I have work fine for me using flash mode 6 - try that out.