Skip to content

Commit

Permalink
cleanup, use sdk v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nqd committed May 22, 2015
1 parent e752de2 commit 7ae7312
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 10 deletions.
16 changes: 9 additions & 7 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,17 @@ endif

mode = 0 ### flash mode
freqdiv = 0 ### flash clk div
size = 0 ### flash size

ifeq ($(SPI_SIZE), 256)
ifeq ($(FLASH_SIZE), 256)
size = 1
else ifeq ($(FLASH_SIZE), 1024)
size = 2
else ifeq ($(FLASH_SIZE), 2048)
size = 3
else ifeq ($(FLASH_SIZE), 4096)
size = 4
else
size = 0
endif

# various paths from the SDK used in this project
Expand Down Expand Up @@ -169,18 +170,17 @@ $(BIN_NAME_2): $(TARGET_OUT)
$(vecho) "Generate $@ successully"

$(BIN_NAME_OTA): $(TARGET_OUT)
@COMPILE=gcc python $(GEN_APPBIN) $< $(BOOT) $(mode) $(freqdiv) $(size)
$(vecho) "Support boot_v1.2 and +"
@mv eagle.app.flash.bin $@
@rm eagle.app.v6.*
$(vecho) "Support boot_v1.2 and +"
@echo "Generate $@ successully"

$(TARGET_OUT): $(APP_AR)
###
### TWO link script for user1 and user2
### force to build *.out with new link script
###
$(vecho) "LD $@"
$(vecho) "LD $(LD_SCRIPT) $@"
$(Q) $(LD) -L$(SDK_LIBDIR) $(LD_SCRIPT) $(LDFLAGS) -Wl,--start-group $(LIBS) $(APP_AR) -Wl,--end-group -o $@
@$(OBJCOPY) --only-section .text -O binary $@ eagle.app.v6.text.bin
@$(OBJCOPY) --only-section .data -O binary $@ eagle.app.v6.data.bin
Expand Down Expand Up @@ -212,10 +212,12 @@ else ifeq ($(OTA), 1)
-$(ESPTOOL) --port $(ESPPORT) write_flash 0x00000 $(ROOT)/esp-sdk/bin/boot_v1.3b3.bin $(IMAGE_ADDRESS) $(BIN_NAME_OTA) 0xFC000 $(ROOT)/esp-sdk/bin/esp_init_data_default.bin 0xFE000 $(ROOT)/esp-sdk/bin/blank.bin
endif
endif
${ROOT}/tools/serialdump-linux -b115200 ${ESPPORT}
# ${ROOT}/tools/serialdump-linux -b115200 ${ESPPORT}
screen ${ESPPORT} 115200

login:
${ROOT}/tools/serialdump-linux -b115200 ${ESPPORT}
# ${ROOT}/tools/serialdump-linux -b115200 ${ESPPORT}
screen ${ESPPORT} 115200

clean:
$(Q) rm -f $(APP_AR)
Expand Down
2 changes: 1 addition & 1 deletion apps/fota/fota-firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ upgrade_connect_cb(void *arg)
}

os_sprintf(fota_cdn->up_server->url,
"GET /%s HTTP/1.1\r\nHost: %s\r\n"pHeadStatic"\r\n",
"GET %s HTTP/1.1\r\nHost: %s\r\n"pHeadStatic"\r\n",
fota_cdn->url, fota_cdn->host);

if(system_upgrade_start(fota_cdn->up_server) != false) {
Expand Down
3 changes: 3 additions & 0 deletions apps/fota/fota-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ start_esp_connect(struct espconn *conn, uint8_t secure, void *connect_cb, void *
// conn->proto.tcp->remote_port);

if (secure) {
os_printf("Secure connection\n");

espconn_secure_set_size(ESPCONN_CLIENT, 8192); // set SSL buffer size, if your SSL packet larger than 2048 bytes
if (espconn_secure_connect(conn) !=0 )
INFO("Secure connect fail\n");
}
Expand Down
9 changes: 8 additions & 1 deletion examples/uart/user/uart-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,14 @@ user_init()
// reset write pos
UartDev.rcv_buff.pWritePos = UartDev.rcv_buff.pRcvMsgBuff ;

// os_delay_us(1000000);
os_delay_us(1000000);
os_printf("\n");
os_printf("compile time: %s %s\n", __DATE__, __TIME__);
system_print_meminfo();
os_printf("boot version: %d\n", system_get_boot_version());
os_printf("cpu frequency: %d Mhz\n", system_get_cpu_freq());
os_printf("flash id: %d\n", spi_flash_get_id());


cmd_recvTaskQueue = (os_event_t *)os_malloc(sizeof(os_event_t)*CMD_RECVTASKQUEUELEN);
system_os_task(cmd_recvTask, CMD_RECVTASKPRIO, cmd_recvTaskQueue, CMD_RECVTASKQUEUELEN);
Expand Down

0 comments on commit 7ae7312

Please sign in to comment.