SmingHub / Sming

Sming - powerful open source framework simplifying the creation of embedded C++ applications.
https://sming.readthedocs.io
GNU Lesser General Public License v3.0
1.48k stars 347 forks source link

RBOOT_SILENT problem #2071

Closed kwis2 closed 4 years ago

kwis2 commented 4 years ago

I am testing deep sleep, module ESP8266-01, and I am not able to switch off serial garbage after reset / wake up. Except serial data @115200 I send, I receive data @76800. In my opinion I am not able to make RBOOT_SILENT to work.

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

Booting rom 0 at 2000, load addr 32df0. ota1 not set ota2 not set V2 Mo ,ýrf cal sector: 251 freq trace enable 0 rf[112] Z± 8Yˇr\ĄFPY'¨ŮhńîAjvč|§ ©Ń­Á@±µ$~Ńm load ta2 not set V2 Mo ,ýrf cal sector: 251 freq trace enable 0 rf[112] Z± 8Yˇr\ĄFPY'¨ŮhńîAjvč|§ ©Ń­Á@±µ$~Ńm čP‹mřhksum 0x32 csum 0x32

rBoot v1.4.2 - richardaburton@gmail.com Flash Size: 8 Mbit Flash Mode: QIO Flash Speed: 40 MHz

my config:

CONFIG_VARS

  • COM_SPEED_SERIAL = $(COM_SPEED)
  • DEBUG_PRINT_FILENAME_AND_LINE = 0
  • DEBUG_VERBOSE_LEVEL = 0
  • DISABLE_SPIFFS = 0
  • ENABLE_CMD_EXECUTOR = 0
  • ENABLE_CUSTOM_LWIP = 1
  • ENABLE_ESPCONN = 0
  • ENABLE_GDB =
  • ENABLE_LWIPDEBUG = 0
  • ENABLE_SMART_CONFIG =
  • ENABLE_SSL = 0
  • ENABLE_TASK_COUNT =
  • ENABLE_WPS =
  • GDB_UART_SWAP =
  • HTTP_SERVER_EXPOSE_NAME = 1
  • HTTP_SERVER_EXPOSE_VERSION = 0
  • LOCALE =
  • MQTT_NO_COMPAT =
  • PROJECT_DIR = /d/elektr_2020/soft/Sming/Timing_sensor
  • RBOOT_GPIO_ENABLED = 0
  • RBOOT_GPIO_SKIP_ENABLED = 0
  • RBOOT_ROM0_ADDR = 0x002000
  • RBOOT_ROM1_ADDR =
  • RBOOT_ROM2_ADDR =
  • RBOOT_RTC_ENABLED = 0
  • RBOOT_SILENT = 1
  • RBOOT_SPIFFS_0 = 0x80000
  • RBOOT_SPIFFS_1 = 0x300000
  • SDK_BASE = /C/tools/sming/Sming/Arch/Esp8266/Components/esp8266/ESP8266_NONOS_SDK
  • SPIFF_SIZE = 0x40000
  • SPI_MODE = qio
  • SPI_SIZE = 1M
  • SPI_SPEED = 40
  • STRING_OBJECT_SIZE = 12
  • TASK_QUEUE_LENGTH = 10
  • USER_CFLAGS =
  • USE_US_TIMER = 1
  • WIFI_PWD =
  • WIFI_SSID = CACHE_VARS
  • COM_OPTS = --raw --encoding ascii
  • COM_PORT = COM3
  • COM_PORT_ESPTOOL = $(COM_PORT)
  • COM_PORT_GDB = $(COM_PORT)
  • COM_SPEED = 115200
  • COM_SPEED_ESPTOOL = $(COM_SPEED)
  • ENABLE_LEGACY_BUILD = 0
  • FULL_COMPONENT_BUILD =
  • GDB_CMDLINE = trap '' INT; $(GDB) -x $(GDBSTUB_DIR)/gdbcmds -b $(COM_SPEED_GDB) -ex "target remote $(COM_PORT_GDB)"
  • KILL_TERM = pkill -9 -f "$(COM_PORT) $(COM_SPEED_SERIAL)" || exit 0
  • PIP_ARGS =
  • SERVER_OTA_PORT = 9999
  • SPIFF_BIN = spiff_rom
  • SPIFF_FILES = files
  • STRICT =
  • TERMINAL = $(PYTHON) -m serial.tools.miniterm $(COM_OPTS) $(COM_PORT) $(COM_SPEED_SERIAL)
  • TRACE = RELINK_VARS
  • DISABLE_WIFI = 0
  • ENABLE_CUSTOM_HEAP = 0
  • ENABLE_CUSTOM_PWM = 1
  • ENABLE_SSL = 0
  • RBOOT_LD_TEMPLATE = $(RBOOT_DIR)/rboot.rom0.ld
  • RBOOT_ROM_0 = rom0
  • RBOOT_ROM_1 = rom1
  • SPIFF_FILEDESC_COUNT = 12
  • SSL_DEBUG = 0 DEBUG_VARS
  • APP_CFLAGS = -DCOM_SPEED_SERIAL=$(COM_SPEED_SERIAL) -DRBOOT_SPIFFS_0=$(RBOOT_SPIFFS_0) -DRBOOT_SPIFFS_1=$(RBOOT_SPIFFS_1) -DRBOOT_INTEGRATION -DDISABLE_SPIFFS=$(DISABLE_SPIFFS) -DSPIFF_SIZE=$(SPIFF_SIZE)
  • APP_LIBDIR = out/Esp8266/debug/lib
  • ARCH_BASE = /C/tools/sming/Sming/Arch/Esp8266
  • AWK = POSIXLY_CORRECT= awk
  • BUILD_BASE = $(OUT_BASE)/build
  • CLANG_FORMAT = clang-format
  • CMAKE = cmake
  • COM_SPEED_GDB = $(COM_SPEED_SERIAL)
  • ESPTOOL = python /C/tools/sming/Sming/Arch/Esp8266/Components/esptool/esptool/esptool.py
  • ESPTOOL2 = /C/tools/sming/Sming/out/Esp8266/debug/tools/esptool2.exe
  • ESP_HOME = /C/Espressif
  • FW_BASE = $(OUT_BASE)/firmware
  • GCC_VERSION = 5.2.0
  • GDB = /C/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-gdb
  • GDBSTUB_DIR = /C/tools/sming/Sming/Arch/Esp8266/Components/gdbstub
  • GIT = git
  • GLOBAL_CFLAGS = $(USER_CFLAGS) -DPROJECT_DIR=\"$(PROJECT_DIR)\" -DSMING_HOME=\"$(SMING_HOME)\" -DENABLE_CMD_EXECUTOR=$(ENABLE_CMD_EXECUTOR) -DHTTP_SERVER_EXPOSE_NAME=$(HTTP_SERVER_EXPOSE_NAME) -DHTTP_SERVER_EXPOSE_VERSION=$(HTTP_SERVER_EXPOSE_VERSION) -DDEBUG_PRINT_FILENAME_AND_LINE=$(DEBUG_PRINT_FILENAME_AND_LINE) -DCUST_FILE_BASE=$$* -DDEBUG_VERBOSE_LEVEL=$(DEBUG_VERBOSE_LEVEL) -DSTRING_OBJECT_SIZE=$(STRING_OBJECT_SIZE) -DSDK_INTERNAL=1 -DUSE_US_TIMER
  • LIBMAIN_COMMANDS = $(APP_LIBMAIN_COMMANDS)
  • OS = Windows_NT
  • OUT_BASE = out/Esp8266/debug
  • PYTHON = python
  • RBOOT_BIG_FLASH = 0
  • RBOOT_TWO_ROMS = 0
  • SDK_INCDIR = /C/tools/sming/Sming/Arch/Esp8266/Components/esp8266/ESP8266_NONOS_SDK/include
  • SDK_INTERNAL = 1
  • SDK_LIBDIR = /C/tools/sming/Sming/Arch/Esp8266/Components/esp8266/ESP8266_NONOS_SDK/lib
  • SMING_ARCH = Esp8266
  • SMING_CXX_STD = c++17
  • SMING_HOME = /C/tools/sming/Sming
  • SMING_RELEASE =
  • TOOLS_BASE = $(SMING_HOME)/$(OUT_BASE)/tools
  • UNAME = Windows
  • USER_LIBDIR = $(SMING_HOME)/$(OUT_BASE)/lib
slaff commented 4 years ago

In my opinion I am not able to make RBOOT_SILENT to work.

Try the following sequence:

cd $SMING_HOME/../samples/Basic_rBoot
make dist-clean
make clean
make RBOOT_SILENT=1 V=1 

After these commands you should have also a brand new rboot.bin file. The file should contain almost no strings. You can check this with the following command:

xtensa-lx106-elf-strings out/Esp8266/debug/firmware/rboot.bin

In my case I get just the following output

baAraB
b!Ar!BV
t"!@'
 / =
 R -
YQyA
XQxAZ

You can now flash just the bootloader with the command:

make flashboot