I am using Make. I have several projects that share a few certificates that I want to relocate to a folder say common_files. I tried a few times to do this but couldn't get it to work, although I managed to keep common files such as code and include to work.
Currently I have in component.mk in the same folder as the main code, this line:
COMPONENT_EMBED_TXTFILES += BaltimoreCyberTrustRoot.pem
This embeds the cert so I don't have to mess with saving it to spiffs or sd card. I wonder what to do to share it with other projects.
Desired:
./common_files/
BaltimoreCyberTrustRoot.pem
./iot_project/
main.c
How do we help Make do this? Thanks.
Share embedded certificates between projects
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: Share embedded certificates between projects
You could make common_files into a component (by dropping a component.mk into the dir), then use EXTRA_COMPONENT_DIRS in the project makefile to refer to that path.
Re: Share embedded certificates between projects
I think I did that since I am compiling fine with all my common files in that common folder and an empty component.mk. Should I include the cert in common_files's component.mk or in my project main folder's component.mk? I tried the latter with relative path etc. and that didn't work. Make couldn't find the cert.ESP_Sprite wrote: ↑Mon Feb 03, 2020 8:49 amYou could make common_files into a component (by dropping a component.mk into the dir), then use EXTRA_COMPONENT_DIRS in the project makefile to refer to that path.
A better way is to turn it into a .h or .c file and change my code
Who is online
Users browsing this forum: cdollar and 97 guests