You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/02/04 03:19:17 UTC
[incubator-nuttx] branch master updated: tools/esp32: Remove some
duplicated output.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 0e8cce4 tools/esp32: Remove some duplicated output.
0e8cce4 is described below
commit 0e8cce4dee8b592552b378c12badb57bb5626023
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Wed Feb 3 23:12:14 2021 +0100
tools/esp32: Remove some duplicated output.
Redirect the first check of esptool to /dev/null as it will be printed
twice when esptool is called to convert the binary.
Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
tools/esp32/Config.mk | 14 +++++---------
tools/esp32/mk_qemu_img.sh | 6 +++---
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/tools/esp32/Config.mk b/tools/esp32/Config.mk
index 04b63b6..219a4ae 100644
--- a/tools/esp32/Config.mk
+++ b/tools/esp32/Config.mk
@@ -39,18 +39,14 @@ else
endif
define POSTBUILD
- @echo "MKIMAGE: ESP32 binary"
- $(Q) if ! esptool.py version ; then \
+ $(Q)echo "MKIMAGE: ESP32 binary"
+ $(Q) if ! esptool.py version 1>/dev/null 2>&1; then \
echo ""; \
- echo "Please install ESP-IDF tools"; \
+ echo "esptool.py not found. Please run: \"pip install esptool.py\""; \
+ echo "Or run: \"make -C tools/esp32\" to install all IDF tools."; \
echo ""; \
- echo "Check https://docs.espressif.com/projects/esp-idf/en/v4.0/get-started/index.html#installation-step-by-step or run the following command"; \
- echo ""; \
- echo "cd tools/esp32 && make && cd ../.."; \
- echo ""; \
- echo "run make again to create the nuttx.bin image."; \
+ echo "Run make again to create the nuttx.bin image."; \
else \
- echo "Generating: $(NUTTXNAME).bin (ESP32 compatible)"; \
esptool.py --chip esp32 elf2image --flash_mode dio --flash_size 4MB -o $(NUTTXNAME).bin nuttx; \
echo "Generated: $(NUTTXNAME).bin (ESP32 compatible)"; \
fi
diff --git a/tools/esp32/mk_qemu_img.sh b/tools/esp32/mk_qemu_img.sh
index 2e81360..9c3b750 100755
--- a/tools/esp32/mk_qemu_img.sh
+++ b/tools/esp32/mk_qemu_img.sh
@@ -44,9 +44,9 @@ printf "\tBootloader: %s\n" "${BOOTLOADER}"
printf "\tPartition Table: %s\n" "${PARTITION_TABLE}"
dd if=/dev/zero bs=1024 count=4096 of=esp32_qemu_image.bin && \
- dd if="${BOOTLOADER}" bs=1 seek="$(printf '%d' 0x1000)" of=esp32_qemu_image.bin conv=notrunc && \
- dd if="${PARTITION_TABLE}" bs=1 seek="$(printf '%d' 0x8000)" of=esp32_qemu_image.bin conv=notrunc && \
- dd if="${NUTTXNAME}".bin bs=1 seek="$(printf '%d' 0x10000)" of=esp32_qemu_image.bin conv=notrunc
+dd if="${BOOTLOADER}" bs=1 seek="$(printf '%d' 0x1000)" of=esp32_qemu_image.bin conv=notrunc && \
+dd if="${PARTITION_TABLE}" bs=1 seek="$(printf '%d' 0x8000)" of=esp32_qemu_image.bin conv=notrunc && \
+dd if="${NUTTXNAME}".bin bs=1 seek="$(printf '%d' 0x10000)" of=esp32_qemu_image.bin conv=notrunc
if [ ${?} -ne 0 ]; then
printf "Failed to generate esp32_qemu_image.bin.\n"