Mbed TLS is now part of TrustedFirmware.org.

Using mbedTLS with Keil projects


Aug 7, 2017 14:56
Sutton Mehaffey

In setting up to test functionality with a test Keil project, I downloaded and extracted the mbed files. I tried putting my Keil project in various places within the folder arrangement. But, I keep getting errors as far as finding the .h files. Where should the Keil project reside, so that the compiles work correctly? I tried finding write-ups on this, but haven't found any.

For testing purposes, I would really like to dump all the files in one folder along with my test Keil project to see how some of the functionality works, but I decided that wasn't good, because the include files have a certain hierarchy to them. And, to edit the include files would be tedious.

So, for this type of test project, where should my project go?

Thanks.

Sutton

 
Aug 8, 2017 10:46
Noam Weissman

Hi,

I have used polarSSL and later mBedTLS and was able to run it etc...

The directory where you put the files is not significant as you point to the files in your project.

mBedTLS has a network interface named net_sockets.c and need re targeting for printf or STDIO.

I suggest taking an example from ST and see how they did it.

In regards to your question a general tree for a project can be something like this:

project_root \

                 startupfile.s

                 main.c

                 stm32xxx_it.c



                 \ Application (your own code)

                 \ Include (your own H files)

                 \ Bin (output for obj files etc...)

                 \ mbetTLS (put here your latest mbedTLS library etc...)

Good luck, Noam.

 
Aug 9, 2017 19:17
Sutton Mehaffey

Thanks. I got it compiled and working for a simple parse certificate function. A simple use of only 'mbedtls_x509_crt_parse()' on one of my raw data packets takes 50K+ of code space. Not happy with that!