|
@@ -46,6 +46,7 @@
|
|
|
#include "FreeRTOS.h"
|
|
|
#include "task.h"
|
|
|
#include "hal.h"
|
|
|
+#include "syslog.h"
|
|
|
|
|
|
/** Enable debugging for LWFTP */
|
|
|
#ifndef LWFTP_DEBUG
|
|
@@ -697,7 +698,7 @@ static unsigned data_sink(void *arg, const char* ptr, unsigned len)
|
|
|
}
|
|
|
|
|
|
if (received_bytes_count + len > MAIN_FW_SIZE) {
|
|
|
- printf("ftp: the firmware is too big! aborting the download\r\n");
|
|
|
+ syslog_str(SYSLOG_ERROR, "Файл прошивки слишком велик");
|
|
|
return 0;
|
|
|
}
|
|
|
spi_flash_write(SPI_FLASH_SECTOR_SIZE * FIRMWARE_UPDATE_SECTOR_OFFSET + received_bytes_count, ptr, len, 0);
|
|
@@ -712,6 +713,7 @@ static unsigned data_sink(void *arg, const char* ptr, unsigned len)
|
|
|
set_act_source(FTP_ACT);
|
|
|
HTTP_StartResetTask(true);
|
|
|
} else {
|
|
|
+ syslog_str(SYSLOG_ERROR, "Некорректный файл прошивки");
|
|
|
// erase it so the bootloader won't try to verify it every time
|
|
|
erase_spif_firmware();
|
|
|
}
|