diff --git a/embedded8266/0x00000.bin b/embedded8266/0x00000.bin deleted file mode 100644 index fadf7a1..0000000 Binary files a/embedded8266/0x00000.bin and /dev/null differ diff --git a/embedded8266/0x40000.bin b/embedded8266/0x40000.bin deleted file mode 100644 index bcccc35..0000000 Binary files a/embedded8266/0x40000.bin and /dev/null differ diff --git a/embedded8266/Makefile b/embedded8266/Makefile index 844cdc4..eddbf21 100644 --- a/embedded8266/Makefile +++ b/embedded8266/Makefile @@ -3,9 +3,9 @@ include makeconf.inc # Look here for user configuration .PHONY : all clean cleanall netburn burnweb burn uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))) -FW_FILE1 = image.elf-0x00000.bin -FW_FILE2 = image.elf-0x40000.bin TARGET = image.elf +FW_FILE1 = $(TARGET)-0x00000.bin +FW_FILE2 = $(TARGET)-0x40000.bin SRCS = \ driver/uart.c \ @@ -49,7 +49,7 @@ $(TARGET) : $(SRCS) ifeq ($(CHIP), 8285) burn : $(FW_FILE1) $(FW_FILE2) - ($(ESPTOOL_PY) --port $(PORT) write_flash -fs 8m -fm dout 0x00000 0x00000.bin 0x40000 0x40000.bin)||(true) + ($(ESPTOOL_PY) --port $(PORT) write_flash -fs 8m -fm dout 0x00000 $(FW_FILE1) 0x40000 $(FW_FILE2))||(true) else ifeq ($(CHIP), 8266) burn : $(FW_FILE1) $(FW_FILE2) ($(ESPTOOL_PY) --port $(PORT) write_flash 0x00000 $(FW_FILE1) 0x40000 $(FW_FILE2))||(true) @@ -68,10 +68,12 @@ netburn : $(FW_FILE1) $(FW_FILE2) @cd web && $(MAKE) $(MFLAGS) $(MAKEOVERRIDES) execute_reflash web/execute_reflash $(IP) $(FW_FILE1) $(FW_FILE2) +netweb : + @cd web && $(MAKE) $(MFLAGS) $(MAKEOVERRIDES) push + clean : $(RM) $(patsubst %.c,%.o,$(SRCS)) $(TARGET) purge : clean @cd web && $(MAKE) $(MFLAGS) $(MAKEOVERRIDES) clean $(RM) $(FW_FILE1) $(FW_FILE2) - diff --git a/embedded8266/README.md b/embedded8266/README.md index 8aadd1f..aaddba7 100644 --- a/embedded8266/README.md +++ b/embedded8266/README.md @@ -7,7 +7,7 @@ This project is based off of the I2S interface for the mp3 player found here: https://github.com/espressif/esp8266_mp3_decoder/ -If you want more information about the build environment, etc. You should +If you want more information about the build environment, etc. You should check out the regular WS2812 driver, found here: https://github.com/cnlohr/ws2812esp8266 WARNING: This subproject is very jankey! It's about stable, but I don't think it's quite there yet. @@ -20,7 +20,14 @@ The audio data is taken from TOUT, but must be kept between 0 and 1V. ## Notes -./makeconf.inc has a few variables that make uses for building and flashing the firmware. +./makeconf.inc has a few variables that Make uses for building and flashing the firmware. Most notably the location of the toolchain for the esp8266/85 on your system. You should edit them according to your preferences or better add `export ESP_ROOT='/path/to/the/esp-open-sdk'` to your bashrc. +If you have problems with burning the firmware or transfering page data over network (`make netburn` or `make netweb`), you should try uncommenting + + OPTS += -DVERIFY_FLASH_WRITE + +in `makeconf.inc`. This way the esp checks if the flash is written correctly. +Especially with some ESP-01 modules there has been a problem with the flash +not being written correctly. diff --git a/embedded8266/common/commonservices.c b/embedded8266/common/commonservices.c index 9627cf1..30d0c17 100644 --- a/embedded8266/common/commonservices.c +++ b/embedded8266/common/commonservices.c @@ -36,8 +36,8 @@ struct totalscan_t int scanplace = 0; static void ICACHE_FLASH_ATTR scandone(void *arg, STATUS status) { - scaninfo *c = arg; - struct bss_info *inf; + scaninfo *c = arg; + struct bss_info *inf; if( need_to_switch_back_to_soft_ap == 1 ) need_to_switch_back_to_soft_ap = 2; @@ -143,11 +143,22 @@ int ICACHE_FLASH_ATTR issue_command(char * buffer, int retsize, char *pusrdata, spi_flash_write( nr, (uint32*)buffer, (datlen/4)*4 ); ExitCritical(); + #ifdef VERIFY_FLASH_WRITE + #define VFW_SIZE 128 + int jj; + uint8_t __attribute__ ((aligned (32))) buf[VFW_SIZE]; + for(jj=0; jj