patacongo commented on a change in pull request #437: Support to run NuttX on
ESP32 QEMU
URL: https://github.com/apache/incubator-nuttx/pull/437#discussion_r388419906
##########
File path: tools/Makefile.unix
##########
@@ -501,6 +501,23 @@ ifeq ($(CONFIG_UBOOT_UIMAGE),y)
cp -f uImage /tftpboot/uImage; \
fi
endif
+ifeq ($(CONFIG_ESP32_BINARY),y)
+ @echo "MKIMAGE: ESP32 binary"
+ $(Q) if ! esptool.py version | grep "v2[.]"; then \
+ echo ""; \
+ echo "Please install ESP-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."; \
+ else \
+ echo "Generating: $(NUTTXNAME).bin (ESP32 compatible)"; \
+ esptool.py --chip esp32 elf2image --flash_mode dio --flash_size
4MB -o nuttx.bin nuttx && \
+ echo "Generated: $(NUTTXNAME).bin (ESP32 compatible)"; \
+ fi
+endif
Review comment:
> Sorry to hear that, I don't wanted to cause trouble. But in my defense, if
something is not good in the first place, it generates a dilemma on new
additions: should we care more about consistency with existing practices (even
bad ones) or should we do the correct one despite that will create
inconsistencies.
Yes, that is exactly the dilemma. If one bad example is permitted into the
architecture, then it provides a precedent and justification for perpetuating
that bad example. The only solution is to be more diligent in reviewing
changes in the first place. But that is not humanly possible, at least not
with the people involved now. Bad things will slip in unnoticed and once they
have slipped in, then the problems really begin.
I don't have a good solution to that. But we also can't allow one bad
implementation to justify its propagation.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services