Page 2 of 2
Re: CreateCerts Directory missing
Posted: Tue Mar 02, 2021 12:39 pm
by SeeCwriter
So, I added the following include files to my project:
Code: Select all
#include <crypto/ssl.h>
#include <crypto/certgen.h>
#include <hal.h>
#include <ssh/ssh.h>
The system libraries have been rebuilt with NB_SSL_SUPPORTED and NB_SSH_SUPPORTED uncommented.
And I added function EnableOnboardCertificateCreation() to my project, before initializing Ethernet.
I get an "undefined reference" linker error for 4 functions such as HalSaveNewDeviceCert.
Was there something else I needed to do?
I'm using v2.9.4 of the tools.
Re: CreateCerts Directory missing
Posted: Tue Mar 02, 2021 3:44 pm
by Jon
Hi SeeCwriter,
In predef.h, is ONBOARD_CERT_GEN defined?
Re: CreateCerts Directory missing
Posted: Wed Mar 03, 2021 9:50 am
by SeeCwriter
Yes, it's defined whenever NB_SSL_SUPPORTED is defined. Plus, I verified it by adding a #warning message when it's defined.
Also, I created example program SslOnboardCertGeneration and it threw the same errors and then some.
Update:
Searching around for one of the files that is flagged as "undefined" I found it in the system directory of the module (MOD54415), but it looks like none of the files were compiled because there are no object files present. In fact, I have 3-module types installed, MOD5441X, MOD5234, NANO54415, and only the MOD5234 system directory was compiled. There are no object files in the others. Does this seem correct?
Re: CreateCerts Directory missing
Posted: Wed Mar 03, 2021 10:31 am
by SeeCwriter
The issue was that the module system files, other than the default module of MOD5234, were not compiled when I "rebuilt all system files" from Eclipse. I opened a command prompt and used the make file in each module's system directory to build them. No more linker errors.
Re: CreateCerts Directory missing
Posted: Wed Mar 03, 2021 11:16 am
by Jon
Hi SeeCwriter,
Thank you very much for that update, and I'm glad to hear that you got everything working. The module files should definitely be compiled when rebuilding all system files. I'll bring that up to our tools folks and see if we can figure out what's going on there.
Re: CreateCerts Directory missing
Posted: Wed Mar 03, 2021 12:15 pm
by TomNB
Since Eclipse manages the project, it relies on the selected project and platform to rebuild all system files. It will not build system files that are not used by that project. So if you do have multiple platforms, then you would have to do a rebuild all/ rebuild modified with a project selected for each platform. The command line commands use a makefile under our control, so everything can be rebuilt that way.