Merge pull request #12896 from gschorcht/cpu/esp8266/esp_log_startup
cpu/esp8266: startup info if module esp_log_startup is used
This commit is contained in:
commit
f2dbd3ba4a
@ -54,6 +54,14 @@ ifneq (, $(filter littlefs, $(USEMODULE)))
|
||||
export RIOT_TEST_TIMEOUT = 200
|
||||
endif
|
||||
|
||||
ifneq (,$(filter log_color,$(USEMODULE)))
|
||||
USEMODULE += esp_log_colored
|
||||
endif
|
||||
|
||||
ifneq (,$(filter 4 5,$(LOG_LEVEL)))
|
||||
USEMODULE += esp_log_startup
|
||||
endif
|
||||
|
||||
# regular Makefile
|
||||
|
||||
export TARGET_ARCH ?= xtensa-esp8266-elf
|
||||
@ -62,6 +70,7 @@ export TARGET_ARCH ?= xtensa-esp8266-elf
|
||||
PSEUDOMODULES += esp_gdb
|
||||
PSEUDOMODULES += esp_log_colored
|
||||
PSEUDOMODULES += esp_log_tagged
|
||||
PSEUDOMODULES += esp_log_startup
|
||||
PSEUDOMODULES += esp_qemu
|
||||
PSEUDOMODULES += esp_sw_timer
|
||||
PSEUDOMODULES += esp_spiffs
|
||||
@ -204,16 +213,20 @@ PREFFLAGS += ls -l $(FLASHFILE).bin | awk '{ print $$5 }' >> $(BINDIR)/partition
|
||||
PREFFLAGS += python $(RIOTCPU)/$(CPU)/vendor/esp-idf/partition_table/gen_esp32part.py
|
||||
PREFFLAGS += --verify $(BINDIR)/partitions.csv $(BINDIR)/partitions.bin
|
||||
|
||||
ifneq (, $(filter esp_log_colored, $(USEMODULE)))
|
||||
BOOTLOADER ?= bootloader_dout_115200_color.bin
|
||||
else
|
||||
BOOTLOADER ?= bootloader_dout_115200_no_color.bin
|
||||
ifneq (,$(filter esp_log_colored,$(USEMODULE)))
|
||||
BOOTLOADER_COLOR = _colors
|
||||
endif
|
||||
|
||||
ifneq (,$(filter esp_log_startup,$(USEMODULE)))
|
||||
BOOTLOADER_INFO = _info
|
||||
endif
|
||||
|
||||
BOOTLOADER_BIN = bootloader$(BOOTLOADER_COLOR)$(BOOTLOADER_INFO).bin
|
||||
|
||||
ifneq (, $(filter esp_qemu, $(USEMODULE)))
|
||||
FLASHER = dd
|
||||
FFLAGS += if=/dev/zero bs=1M count=1 | tr "\\000" "\\377" > tmp.bin &&
|
||||
FFLAGS += cat $(RIOTCPU)/$(CPU)/bin/$(BOOTLOADER) tmp.bin |
|
||||
FFLAGS += cat $(RIOTCPU)/$(CPU)/bin/$(BOOTLOADER_BIN) tmp.bin |
|
||||
FFLAGS += head -c $$((0x8000)) |
|
||||
FFLAGS += cat - $(BINDIR)/partitions.bin tmp.bin |
|
||||
FFLAGS += head -c $$((0x10000)) |
|
||||
@ -228,7 +241,7 @@ else
|
||||
FFLAGS += --before default_reset write_flash -z
|
||||
FFLAGS += --flash_size detect
|
||||
FFLAGS += --flash_mode $(FLASH_MODE) --flash_freq $(FLASH_FREQ)
|
||||
FFLAGS += 0x0000 $(RIOTCPU)/$(CPU)/bin/$(BOOTLOADER)
|
||||
FFLAGS += 0x0000 $(RIOTCPU)/$(CPU)/bin/$(BOOTLOADER_BIN)
|
||||
FFLAGS += 0x8000 $(BINDIR)/partitions.bin
|
||||
FFLAGS += 0x10000 $(FLASHFILE).bin
|
||||
endif
|
||||
|
||||
BIN
cpu/esp8266/bin/bootloader.bin
Normal file
BIN
cpu/esp8266/bin/bootloader.bin
Normal file
Binary file not shown.
BIN
cpu/esp8266/bin/bootloader_colors.bin
Normal file
BIN
cpu/esp8266/bin/bootloader_colors.bin
Normal file
Binary file not shown.
@ -183,8 +183,8 @@ void spi_flash_drive_init (void)
|
||||
_flash_end = _flashchip->chip_size - 5 * _flashchip->sector_size;
|
||||
_flash_size = _flash_end - _flash_beg; /* MUST be at least 3 sectors (0x3000) */
|
||||
|
||||
LOG_TAG_INFO("spi_flash", "MTD in SPI flash starts at address 0x%08x "
|
||||
"with a size of %d kbytes\n", _flash_beg, _flash_size >> 10);
|
||||
LOG_TAG_DEBUG("spi_flash", "MTD in SPI flash starts at address 0x%08x "
|
||||
"with a size of %d kbytes\n", _flash_beg, _flash_size >> 10);
|
||||
|
||||
_flash_dev.driver = &_flash_driver;
|
||||
_flash_dev.sector_count = _flash_size / _flashchip->sector_size;
|
||||
|
||||
@ -67,12 +67,14 @@ void esp_riot_init(void)
|
||||
}
|
||||
|
||||
ets_printf("\n");
|
||||
#ifdef MODULE_ESP_LOG_STARTUP
|
||||
ets_printf("Starting ESP8266 CPU with ID: %08x\n", system_get_chip_id());
|
||||
ets_printf("ESP8266-RTOS-SDK Version %s\n\n", system_get_sdk_version());
|
||||
ets_printf("CPU clock frequency: %d MHz\n", system_get_cpu_freq());
|
||||
extern void heap_stats(void);
|
||||
heap_stats();
|
||||
ets_printf("\n");
|
||||
#endif
|
||||
|
||||
/* set exception handlers */
|
||||
init_exceptions ();
|
||||
@ -102,8 +104,10 @@ void esp_riot_init(void)
|
||||
/* trigger board initialization */
|
||||
board_init();
|
||||
|
||||
#ifdef MODULE_ESP_LOG_STARTUP
|
||||
/* print the board config */
|
||||
board_print_config();
|
||||
#endif
|
||||
|
||||
/* initialize ESP system event loop */
|
||||
extern void esp_event_handler_init(void);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user