mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
tools/espXX/Config.mk: Refactor the flash options.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
committed by
Gustavo Henrique Nihei
parent
adef19704d
commit
cca3fa36ce
@@ -58,6 +58,8 @@ else
|
|||||||
ESPTOOL_WRITEFLASH_OPTS := -fs $(FLASH_SIZE) -fm dio -ff $(FLASH_FREQ)
|
ESPTOOL_WRITEFLASH_OPTS := -fs $(FLASH_SIZE) -fm dio -ff $(FLASH_FREQ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ESPTOOL_FLASH_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ)
|
||||||
|
|
||||||
# Configure the variables according to build environment
|
# Configure the variables according to build environment
|
||||||
|
|
||||||
ifdef ESPTOOL_BINDIR
|
ifdef ESPTOOL_BINDIR
|
||||||
@@ -117,8 +119,7 @@ define MERGEBIN
|
|||||||
echo "Missing Flash memory size configuration for the ESP32 chip."; \
|
echo "Missing Flash memory size configuration for the ESP32 chip."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
$(eval ESPTOOL_MERGEBIN_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ))
|
esptool.py -c esp32 merge_bin --output nuttx.merged.bin $(ESPTOOL_FLASH_OPTS) $(ESPTOOL_BINS)
|
||||||
esptool.py -c esp32 merge_bin --output nuttx.merged.bin $(ESPTOOL_MERGEBIN_OPTS) $(ESPTOOL_BINS)
|
|
||||||
$(Q) echo nuttx.merged.bin >> nuttx.manifest
|
$(Q) echo nuttx.merged.bin >> nuttx.manifest
|
||||||
$(Q) echo "Generated: nuttx.merged.bin"
|
$(Q) echo "Generated: nuttx.merged.bin"
|
||||||
endef
|
endef
|
||||||
@@ -165,8 +166,7 @@ define ELF2IMAGE
|
|||||||
echo "Missing Flash memory size configuration for the ESP32 chip."; \
|
echo "Missing Flash memory size configuration for the ESP32 chip."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
$(eval ESPTOOL_ELF2IMG_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ))
|
esptool.py -c esp32 elf2image $(ESPTOOL_FLASH_OPTS) -o nuttx.bin nuttx
|
||||||
esptool.py -c esp32 elf2image $(ESPTOOL_ELF2IMG_OPTS) -o nuttx.bin nuttx
|
|
||||||
$(Q) echo "Generated: nuttx.bin (ESP32 compatible)"
|
$(Q) echo "Generated: nuttx.bin (ESP32 compatible)"
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ else
|
|||||||
ESPTOOL_WRITEFLASH_OPTS := -fs $(FLASH_SIZE) -fm dio -ff $(FLASH_FREQ)
|
ESPTOOL_WRITEFLASH_OPTS := -fs $(FLASH_SIZE) -fm dio -ff $(FLASH_FREQ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ESPTOOL_FLASH_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ)
|
||||||
|
|
||||||
ifdef ESPTOOL_BINDIR
|
ifdef ESPTOOL_BINDIR
|
||||||
BL_OFFSET := 0x0
|
BL_OFFSET := 0x0
|
||||||
PT_OFFSET := 0x8000
|
PT_OFFSET := 0x8000
|
||||||
@@ -85,8 +87,7 @@ define ELF2IMAGE
|
|||||||
echo "Missing Flash memory size configuration for the ESP32-C3 chip."; \
|
echo "Missing Flash memory size configuration for the ESP32-C3 chip."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
$(eval ESPTOOL_ELF2IMG_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ))
|
esptool.py -c esp32c3 elf2image $(ESPTOOL_FLASH_OPTS) -o nuttx.bin nuttx
|
||||||
esptool.py -c esp32c3 elf2image $(ESPTOOL_ELF2IMG_OPTS) -o nuttx.bin nuttx
|
|
||||||
$(Q) echo "Generated: nuttx.bin (ESP32-C3 compatible)"
|
$(Q) echo "Generated: nuttx.bin (ESP32-C3 compatible)"
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -103,8 +104,7 @@ define MERGEBIN
|
|||||||
echo "Missing Flash memory size configuration for the ESP32-C3 chip."; \
|
echo "Missing Flash memory size configuration for the ESP32-C3 chip."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
$(eval ESPTOOL_MERGEBIN_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ))
|
esptool.py -c esp32c3 merge_bin --output nuttx.merged.bin $(ESPTOOL_FLASH_OPTS) $(ESPTOOL_BINS)
|
||||||
esptool.py -c esp32c3 merge_bin --output nuttx.merged.bin $(ESPTOOL_MERGEBIN_OPTS) $(ESPTOOL_BINS)
|
|
||||||
$(Q) echo nuttx.merged.bin >> nuttx.manifest
|
$(Q) echo nuttx.merged.bin >> nuttx.manifest
|
||||||
$(Q) echo "Generated: nuttx.merged.bin"
|
$(Q) echo "Generated: nuttx.merged.bin"
|
||||||
endef
|
endef
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ else
|
|||||||
ESPTOOL_WRITEFLASH_OPTS := -fs $(FLASH_SIZE) -fm dio -ff $(FLASH_FREQ)
|
ESPTOOL_WRITEFLASH_OPTS := -fs $(FLASH_SIZE) -fm dio -ff $(FLASH_FREQ)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ESPTOOL_FLASH_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ)
|
||||||
|
|
||||||
ifdef ESPTOOL_BINDIR
|
ifdef ESPTOOL_BINDIR
|
||||||
BL_OFFSET := 0x1000
|
BL_OFFSET := 0x1000
|
||||||
PT_OFFSET := 0x8000
|
PT_OFFSET := 0x8000
|
||||||
@@ -85,8 +87,7 @@ define ELF2IMAGE
|
|||||||
echo "Missing Flash memory size configuration for the ESP32-S2 chip."; \
|
echo "Missing Flash memory size configuration for the ESP32-S2 chip."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
$(eval ESPTOOL_ELF2IMG_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ))
|
esptool.py -c esp32s2 elf2image $(ESPTOOL_FLASH_OPTS) -o nuttx.bin nuttx
|
||||||
esptool.py -c esp32s2 elf2image $(ESPTOOL_ELF2IMG_OPTS) -o nuttx.bin nuttx
|
|
||||||
$(Q) echo "Generated: nuttx.bin (ESP32-S2 compatible)"
|
$(Q) echo "Generated: nuttx.bin (ESP32-S2 compatible)"
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@@ -103,8 +104,7 @@ define MERGEBIN
|
|||||||
echo "Missing Flash memory size configuration for the ESP32-S2 chip."; \
|
echo "Missing Flash memory size configuration for the ESP32-S2 chip."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
$(eval ESPTOOL_MERGEBIN_OPTS := -fs $(FLASH_SIZE) -fm $(FLASH_MODE) -ff $(FLASH_FREQ))
|
esptool.py -c esp32s2 merge_bin --output nuttx.merged.bin $(ESPTOOL_FLASH_OPTS) $(ESPTOOL_BINS)
|
||||||
esptool.py -c esp32s2 merge_bin --output nuttx.merged.bin $(ESPTOOL_MERGEBIN_OPTS) $(ESPTOOL_BINS)
|
|
||||||
$(Q) echo nuttx.merged.bin >> nuttx.manifest
|
$(Q) echo nuttx.merged.bin >> nuttx.manifest
|
||||||
$(Q) echo "Generated: nuttx.merged.bin"
|
$(Q) echo "Generated: nuttx.merged.bin"
|
||||||
endef
|
endef
|
||||||
|
|||||||
Reference in New Issue
Block a user