1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-16 18:13:49 +01:00

makefiles/tools/esptool.mk: inverse CPU* conditionals

The CPU* conditionals are inverted so that they can be tested for ESP8266. In all other cases the MCU is any ESP32x SoC
This commit is contained in:
Gunar Schorcht 2022-06-23 07:28:49 +02:00
parent b60b47ff51
commit b6dc652d1d

View File

@ -1,14 +1,13 @@
ifneq ($(CPU),esp32) ifeq ($(CPU),esp8266)
ifneq (,$(filter esp_log_colored,$(USEMODULE)))
ifneq (,$(filter esp_log_colored,$(USEMODULE))) BOOTLOADER_COLOR = _colors
BOOTLOADER_COLOR = _colors endif
endif ifneq (,$(filter esp_log_startup,$(USEMODULE)))
ifneq (,$(filter esp_log_startup,$(USEMODULE))) BOOTLOADER_INFO = _info
BOOTLOADER_INFO = _info endif
endif # Full path to the bootloader binary. In the ESP32 case this is set by the
# Full path to the bootloader binary. In the ESP32 case this is set by the # esp_bootloader module.
# esp_bootloader module. BOOTLOADER_BIN ?= $(RIOTCPU)/$(CPU)/bin/bootloader$(BOOTLOADER_COLOR)$(BOOTLOADER_INFO).bin
BOOTLOADER_BIN ?= $(RIOTCPU)/$(CPU)/bin/bootloader$(BOOTLOADER_COLOR)$(BOOTLOADER_INFO).bin
endif endif
ESPTOOL ?= $(RIOTTOOLS)/esptools/esptool.py ESPTOOL ?= $(RIOTTOOLS)/esptools/esptool.py
@ -33,7 +32,7 @@ endif
.PHONY: esp-qemu .PHONY: esp-qemu
esp-qemu: esp-qemu:
ifneq (,$(filter esp32,$(CPU_FAM))) ifeq (esp32,$(CPU))
$(Q)echo \ $(Q)echo \
"--flash_mode $(FLASH_MODE) --flash_freq $(FLASH_FREQ) " \ "--flash_mode $(FLASH_MODE) --flash_freq $(FLASH_FREQ) " \
"--flash_size $(FLASH_SIZE)MB" \ "--flash_size $(FLASH_SIZE)MB" \
@ -41,7 +40,7 @@ ifneq (,$(filter esp32,$(CPU_FAM)))
"0x8000 $(BINDIR)/partitions.bin" \ "0x8000 $(BINDIR)/partitions.bin" \
"0x10000 $(FLASHFILE)" > $(BINDIR)/qemu_flash_args "0x10000 $(FLASHFILE)" > $(BINDIR)/qemu_flash_args
$(Q)$(ESPTOOL) \ $(Q)$(ESPTOOL) \
--chip esp32 merge_bin \ --chip $(CPU_FAM) merge_bin \
--fill-flash-size 4MB \ --fill-flash-size 4MB \
-o $(BINDIR)/qemu_flash_image.bin @$(BINDIR)/qemu_flash_args -o $(BINDIR)/qemu_flash_image.bin @$(BINDIR)/qemu_flash_args
$(Q)cp $(RIOTCPU)/$(CPU)/bin/rom_0x3ff90000_0x00010000.bin $(BINDIR)/rom1.bin $(Q)cp $(RIOTCPU)/$(CPU)/bin/rom_0x3ff90000_0x00010000.bin $(BINDIR)/rom1.bin