what files to flash for NON OS SDK

Posts: 1
Joined: Sat Jun 02, 2018 9:12 pm

what files to flash for NON OS SDK

Postby n_kotso1 » Sat Jun 02, 2018 9:24 pm

Hi, I downloaded this firmware version ESP8266 NONOS SDK V2.2.0 for flashing it to my esp-12 (via wires) and use it with AT Commands. I also downloaded the latest version of Flash download tools v3.6.4. I'm in the step where I must put the paths and addresses for the files to flash. I opened the readme file from ESP8266 NONOS SDK V2.2.0 where refers to these files for NON BOOT MODE:

eagle.flash.bin 0x00000
eagle.irom0text.bin 0x10000
Flash size 8Mbit: 0x7e000 & 0xfe000
Flash size 16Mbit: 0x7e000 & 0x1fe000
Flash size 16Mbit-C1: 0xfe000 & 0x1fe000
Flash size 32Mbit: 0x7e000 & 0x3fe000
Flash size 32Mbit-C1: 0xfe000 & 0x3fe000
esp_init_data_default.bin (optional)
Flash size 8Mbit: 0xfc000
Flash size 16Mbit: 0x1fc000
Flash size 16Mbit-C1: 0x1fc000
Flash size 32Mbit: 0x3fc000
Flash size 32Mbit-C1: 0x3fc000

But my problem is that the "eagle.flash.bin" and "eagle.irom0text.bin" files are nowhere!
Any suggestions?
Is it something that I've missed?

Thank you in advance.

Posts: 178
Joined: Sat Apr 01, 2017 1:21 am

Re: what files to flash for NON OS SDK

Postby AgentSmithers » Wed Jun 06, 2018 2:03 am

I'm in my other office right now, I'll check my makefile when I return to the other one to get you the locations.

Edit: Here is a custom makefile I made, I hope this helps, in a nutshell I don't use either of those files you talk about sir.

Code: Select all

CC = xtensa-lx106-elf-gcc
CFLAGS = -I. -DICACHE_FLASH -mlongcalls
LDLIBS = -nostdlib -Wl,--start-group -lmain -lpwm -lnet80211 -lwpa -llwip -lpp -lphy -lc -Wl,--end-group -lgcc
LDFLAGS = -Teagle.app.v6.ld
INCLUDES = -Iinclude -I../driver_lib/include

esptool.py write_flash --flash_size 32m-c1 0x60000 index.html 0x65000 config.html
screen /dev/ttyUSB0 115200

main-0x00000.bin: main
echo a
echo $(LDFLAGS)
esptool.py elf2image $^

build-fotamain-0x81000.bin: LDFLAGS=-Teagle.app.v6.new.2048.ld
build-fotamain-0x81000.bin: main
esptool.py elf2image --version 2 main -o main-0x81000.bin
build-fotamain-0x01000.bin: LDFLAGS=-Teagle.app.v6.new.2048.ld
build-fotamain-0x01000.bin: main
esptool.py elf2image --version 2 main -o main-0x01000.bin

#fotamain-0x81000.bin: LDFLAGS=-Teagle.app.v6.new.1024.app2.ld
#fotamain-0x81000.bin: LDFLAGS=-Teagle.app.v6.new.2048.app2.ld
fotamain-0x81000.bin: LDFLAGS=-Teagle.app.v6.new.2048.ld
fotamain-0x81000.bin: main
echo b
#echo $(LDFLAGS)
#esptool.py elf2image --version 2 main
#esptool.py write_flash --flash_size 32m-c1 0x81000 main-0x81000.bin
#esptool.py write_flash --flash_size 32m-c1 0x101000 main-0x101000.bin
#esptool.py write_flash --flash_size detect 0x101000 main-0x81000.bin
esptool.py write_flash --flash_size 32m-c1 0x101000 main-0x01000.bin
#fotamain-0x01000.bin: LDFLAGS=-Teagle.app.v6.new.1024.app1.ld
#For some reason the flag below is not applying
fotamain-0x01000.bin: LDFLAGS=-Teagle.app.v6.new.2048.ld
fotamain-0x01000.bin: main
echo c
echo $(LDFLAGS)
esptool.py elf2image --version 2 main   
esptool.py write_flash --flash_size 32m-c1 0 boot_v1.7.bin 0x1000 main-0x01000.bin 0x7e000 blank.bin 0xFE000 blank.bin 0x3FC000 ../library/esp_init_data_default_adc33.bin 0x60000 index.html 0x65000 config.html

main: main.o

main.o: main.c

dhonewire: dhonewire.o

dhonewire.o: dhonewire.c

fresh: clean main-0x00000.bin
echo d
echo $(LDFLAGS)
#kill $(ps aux | grep '[S]CREEN' | awk '{print $2}')
esptool.py erase_flash
esptool.py write_flash 0 main-0x00000.bin 0x10000 main-0x10000.bin 0x7e000 blank.bin 0x3fc000 ../library/esp_init_data_default_adc33.bin 0x3fe000 blank.bin 0x60000 index.html 0x65000 config.html
#screen /dev/ttyUSB0 74880
screen /dev/ttyUSB0 115200

flash: LDFLAGS=-Teagle.app.v6.ld
flash: main-0x00000.bin
echo e
echo $(LDFLAGS)
esptool.py write_flash 0 main-0x00000.bin 0x10000 main-0x10000.bin 0x60000 index.html 0x65000 config.html
screen /dev/ttyUSB0 115200

quick: main-0x00000.bin
echo f
echo $(LDFLAGS)
esptool.py write_flash 0 main-0x00000.bin 0x10000 main-0x10000.bin

build: main-0x00000.bin
echo g
echo $(LDFLAGS)

ota: fotamain-0x01000.bin fotamain-0x81000.bin
#export -p
echo h
echo $(LDFLAGS)
#esptool.py write_flash --flash_size 32m-c1 0x81000 main-0x81000.bin

screen /dev/ttyUSB0 115200

echo i
rm -f main main.o main*.bin
#echo 'osboxes.org' | sudo -S chmod 777 /dev/ttyUSB0 #No longer needed, osboxes added to dialout group with usermod

echo j
rm -f main main.o main-0x00000.bin main-0x10000.bin main-0x81000.bin main-0x01000.bin

Posts: 32
Joined: Sat Mar 24, 2018 12:52 am

Re: what files to flash for NON OS SDK

Postby Pato » Wed Jun 06, 2018 7:59 pm


The two files "eagle.flash.bin" and "eagle.irom0text.bin" are the final outputs from the compiler.
E.g. if you use the ./gen_misc script to build your app (or one of the example), at step 2 the script will ask you if you want to generate these two files (for non-FOTA) or user1.bin or user2.bin (for FOTA):

STEP 2: choose bin generate(0=eagle.flash.bin+eagle.irom0text.bin, 1=user1.bin, 2=user2.bin)
enter (0/1/2, default 0):
ignore boot
generate bin: eagle.flash.bin+eagle.irom0text.bin

They are by default outputed in NONOS_SDK/bin. I guess they are default names given by the Esspressif's script. The first may be a kind of bootloader, the second is your application.
So I suppose you just need to compile your app :)

Posts: 178
Joined: Sat Apr 01, 2017 1:21 am

Re: what files to flash for NON OS SDK

Postby AgentSmithers » Thu Jun 07, 2018 12:21 pm

Agreed, One is like a boot loader and the other is your actual usercode..
The way I do it is a little different, I use the Blinky Example to output a
Blinky-0x00000.bin and a blinky-0x10000.bin
The 0x00000 is around 50.5KB and the 0x10000.bin is around 222.6KB (My code)
I burn to the coordinating addresses for non FOTA.
Let me know if you get it going.

Who is online

Users browsing this forum: Bing [Bot] and 8 guests