eclipse script runing problem [message #1817907] |
Mon, 02 December 2019 18:19  |
Eclipse User |
|
|
|
hello
i am working on an ESP32 program using eclipse and ESP-IDF.
i have a file named component.mk which contains a script that create a heder for keys to connect to AWS platform.
here is the script form:
COMPONENT_EXTRA_CLEAN := certs.h
main.o: certs.h
certs.h: $(COMPONENT_PATH)/certs/root-CA.crt $(COMPONENT_PATH)/certs/certificate.pem.crt $(COMPONENT_PATH)/certs/private.pem.key
$(Q) rm -f certs.h
$(Q) echo "const char *rootCA =" >> certs.h
$(Q) cat $(COMPONENT_PATH)/certs/root-CA.crt | tr -d "\r" | awk '{ print "\""$$0"\\r\\n\""}' >> certs.h
$(Q) echo ";" >> certs.h
$(Q) echo "const char *devicePrivateKey =" >> certs.h
$(Q) cat $(COMPONENT_PATH)/certs/private.pem.key | tr -d "\r" | awk '{ print "\""$$0"\\r\\n\""}' >> certs.h
$(Q) echo ";" >> certs.h
$(Q) echo "const char *deviceCert =" >> certs.h
$(Q) cat $(COMPONENT_PATH)/certs/certificate.pem.crt | tr -d "\r" | awk '{ print "\""$$0"\\r\\n\""}' >> certs.h
$(Q) echo ";" >> certs.h
is there a maner to run this script while compiling the program.
regards.
Zakaria.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.19783 seconds